Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Training] Strange training model created with crossEntropyLoss #17875

Closed
elephantpanda opened this issue Oct 10, 2023 · 1 comment
Closed

[Training] Strange training model created with crossEntropyLoss #17875

elephantpanda opened this issue Oct 10, 2023 · 1 comment
Labels
ep:CUDA issues related to the CUDA execution provider training issues related to ONNX Runtime training; typically submitted using template

Comments

@elephantpanda
Copy link

elephantpanda commented Oct 10, 2023

Describe the issue

Trying out the training model creation on the MNIST-12 from here, when I set the loss to artifacts.LossType.CrossEntropyLoss,
it does something strange.

Even though the output label is of shape (1,10), it creates an input node called "labels" with shape of size (1)

Surely the labels shape should also be of size (1,10) ?

When using artifacts.LossType.MSELoss is creates an input node called "target" of shape (1,10) which is correct.

Is this a bug?

snapshot5

Edit:
I just realised that perhaps the label is not of the form (0,0,0,1,0,0,0,0,0,0) but just the index 4, in this case. Is this correct?

OK, I think I get it. you can delete this post.

To reproduce

AS above

Urgency

No response

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.15.1

PyTorch Version

1.13.1

Execution Provider

CUDA

Execution Provider Library Version

1.13.1

@elephantpanda elephantpanda added the training issues related to ONNX Runtime training; typically submitted using template label Oct 10, 2023
@github-actions github-actions bot added the ep:CUDA issues related to the CUDA execution provider label Oct 10, 2023
@baijumeswani
Copy link
Contributor

I just realised that perhaps the label is not of the form (0,0,0,1,0,0,0,0,0,0) but just the index 4, in this case. Is this correct?

This is correct. Thanks for checking. Closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:CUDA issues related to the CUDA execution provider training issues related to ONNX Runtime training; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants