TypeError: Size should be int or sequence. Got <class 'dict'>

#1
by surprisedPikachu007 - opened

TypeError Traceback (most recent call last)

in
21 val_transforms = Compose(
22 [
---> 23 Resize(feature_extractor.size),
24 CenterCrop(feature_extractor.size),
25 ToTensor(),

/usr/local/lib/python3.9/dist-packages/torchvision/transforms/transforms.py in init(self, size, interpolation, max_size, antialias)
319 _log_api_usage_once(self)
320 if not isinstance(size, (int, Sequence)):
--> 321 raise TypeError(f"Size should be int or sequence. Got {type(size)}")
322 if isinstance(size, Sequence) and len(size) not in (1, 2):
323 raise ValueError("If size is a sequence, it should have 1 or 2 values")

TypeError: Size should be int or sequence. Got <class 'dict'>

Sign up or log in to comment