TypeError: 'bool' object is not callable in Computer vision training code #864
Unanswered
The-Ali-Sher
asked this question in
Q&A
Replies: 1 comment
-
How can we help when there is no snippet of your code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Video: https://www.youtube.com/watch?v=Z_ikDlimN6A&t=54634s 03 pytorch computer vision
I'm getting this error when running the training and test loop code:
TypeError Traceback (most recent call last)
in <cell line: 12>()
45 model_0.eval()
46 with torch.inference_mode():
---> 47 for X, y in test_dataloader:
48 # 1. Forward pass
49 test_pred = model_0(X)
4 frames
/usr/local/lib/python3.10/dist-packages/torchvision/datasets/mnist.py in getitem(self, index)
146
147 if self.target_transform is not None:
--> 148 target = self.target_transform(target)
149
150 return img, target
TypeError: 'bool' object is not callableI even tried copying the code directly from learnpytorch.io but still getting the same error
Beta Was this translation helpful? Give feedback.
All reactions