-
Notifications
You must be signed in to change notification settings - Fork 21
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
Features "successfully extracted", but not? #182
Comments
What's your batch size? |
Batch_size = 32 |
Could you try 8 or 16 and report back? |
I set batch_size = 16, 8, 4, 2. Not sure if it matters, but this results in the DataLoader "batches" having size 1,2,4,16, respectively. All produce the same behavior. For reference when I had used the old version (without issue) batch_size = 64. |
Another update, I ran this instead (also taken directly from your documentation): with extractor.batch_extraction(module_name, output_type="ndarray") as e: And I got the correct output (batch_size = 16); namely, an ndarray that was 16 x flattened features. |
Haven't used THINGSvision in a while (last time thingsvision.vision was still a thing) so I updated to the latest version to extract feature values for some images. I am doing this in vscode with output appearing in an interactive window. Everything seems to run fine (just copying and pasting the tutorial code and specifying the image and output directories) until I try extracting the feature weights (for vgg16_bn):
module_name= 'features.23'
features = extractor.extract_features(
batches=batches,
module_name=module_name,
flatten_acts=True,
output_type="ndarray", # or "tensor" (only applicable to PyTorch models)
)
The cell of code is seemingly executed successfully (little green "success" check mark in the interactive window). And I get the usual message saying that the features have been successfully extracted.
"...Features successfully extracted for all 16 images in the database."
However, there is no variable "features" that is generated as output. And if I try to execute anything else I get the pending clock. I then noticed that some of the cell output text was invisible for some reason and says:
"Batch: 0%| | 0/1 [00:00<?, ?it/s]"
So maybe something didn't execute correctly? Never had any issue with the older version so would appreciate any suggestions of what's going on (I assume it's something on my end).
The text was updated successfully, but these errors were encountered: