notebooks
notebooks copied to clipboard
Error in image_classification.ipynb
@Rocketknight1 @NielsRogge @NimaBoscarino I got an issue
val_transforms = Compose(
[
Resize(feature_extractor.size),
CenterCrop(feature_extractor.size),
ToTensor(),
normalize,
]
)
I got the following error TypeError: Size should be int or sequence. Got <class 'dict'> It can easily solved by changing
val_transforms = Compose(
[
Resize((feature_extractor.size['height'],feature_extractor.size['width']) ),
CenterCrop(feature_extractor.size),
ToTensor(),
normalize,
]
)
train_transforms = Compose(
[
RandomResizedCrop((feature_extractor.size['height'],feature_extractor.size['width'])),
RandomHorizontalFlip(),
ToTensor(),
normalize,
]
)
This looks like an issue in the Torch notebook rather than the TF one - @amyeroberts do you know who wrote the original torch version?
@lilyaYAHIAOUI Thanks for reporting and opening a PR!
@Rocketknight1 No idea - probably @NielsRogge :)
The image classification notebooks require an update as they still rely on feature extractors.
@NielsRogge I updated image_classification.ipynb and image_classification_albumentation.ipynb,I will take for the remaining notebooks.