image_featurizer_test.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pic2vec 作者: datarobot 项目源码 文件源码
def compare_featurizer_class(featurizer,
                             scaled_size,
                             featurized_data,
                             downsample_size,
                             image_column_headers,
                             automatic_downsample,
                             csv_path,
                             image_list,
                             depth,
                             featurized=False):
    """Check the necessary assertions for a featurizer image."""
    assert featurizer.scaled_size == scaled_size
    assert np.allclose(featurizer.features, featurized_data, atol=ATOL)
    assert featurizer.downsample_size == downsample_size
    assert featurizer.image_column_headers == image_column_headers
    assert featurizer.auto_sample == automatic_downsample
    assert featurizer.csv_path == csv_path
    assert featurizer.image_list == image_list
    assert featurizer.depth == depth
    if featurized:
        assert filecmp.cmp('{}_full'.format(csv_path), CHECK_CSV.format(featurizer.model_name))
        assert featurizer.full_dataframe == pd.read_csv(CHECK_CSV.format(featurizer.model_name))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号