<PyTorch: Results & Trouble Shooting>
Date: 2023.05.14
* The PyTorch series will mainly touch on the problem I faced. For actual code, check out my github repository.
[Results of Multiclass Classification]
The results of the “make_blobs” classification problem is as the following.
Call it a day.
[Trouble Shooting]
While training the model, I ran into some fundamental PyTorch issues.
It would’ve taken a long time to fix this data type issue. From the Runtime Error message I could tell that the input value for the loss function, which in this case was Cross Entropy Loss, is not compatible with the build-in type. Referencing to the PyTorch documentation I found the following.
As you can see, the “target” input for the cross entropy loss function is type “long.” Thus, the y data should be data type long the for the loss function to work.
'Tech Development > Computer Vision (PyTorch)' 카테고리의 다른 글
PyTorch: DataLoaders & Batches (0) | 2023.05.18 |
---|---|
PyTorch: Classification Metrics (0) | 2023.05.18 |
PyTorch: Multiclass Classification Model (0) | 2023.05.15 |
PyTorch: Visualizing Non-linearity (0) | 2023.05.15 |
PyTorch: More details about torch.nn.Module & Imports (0) | 2023.05.15 |
댓글