Skip to content

Conversation

Yeaseen
Copy link

@Yeaseen Yeaseen commented Mar 28, 2024

Torch version: 1.12.0+cu102
Google Colab CPU runtime.
First error:
part_1

so, torch._C._nn.cross_entropy_loss function accepts a tensor.
solve: pass the tensor while calculating loss.
part_2

Then, another error occurred:
part_3

solve: the loss variable must be float type as it handles float type data
part4

Then, another error occurred:
part_6

So, again, pass the tensor while calculating accuracy:
part7

Finally, it's running successfully:
part_8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant