Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: could not broadcast input array #16

Open
emilaz opened this issue May 5, 2019 · 0 comments
Open

ValueError: could not broadcast input array #16

emilaz opened this issue May 5, 2019 · 0 comments

Comments

@emilaz
Copy link

emilaz commented May 5, 2019

Hey,
I'm trying to run your wrapper on a batch of the Imagenet Dataset. However, I'm getting the following error:

################################################################################
Batch Size: 64
Number of Examples: 857
Number of Batches: 14
Extracting features for layer 'resnet_v2_101/logits' with shape [896, 1, 1, 1001]
################################################################################
Traceback (most recent call last):
  File "example_feat_extract.py", line 152, in <module>
    args.batch_size, args.num_classes)
  File "example_feat_extract.py", line 86, in feature_extraction_queue
    feature_dataset[layer_name][start:end] = outputs[layer_name]
ValueError: could not broadcast input array from shape (3,1,1,1001) into shape (64,1,1,1001)

I ran
python example_feat_extract.py --network resnet_v2_101 --checkpoint ../checkpoints/resnet_v2_101.ckpt --image_path ../images/curr_batch/ --out_file ../features/features.h5 --layer_names resnet_v2_101/logits --preproc_func inception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant