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

请问LOSS是怎么反向传播的? #12

Open
a897456 opened this issue Dec 28, 2023 · 1 comment
Open

请问LOSS是怎么反向传播的? #12

a897456 opened this issue Dec 28, 2023 · 1 comment

Comments

@a897456
Copy link

a897456 commented Dec 28, 2023

loss是在training_step和validation_step产生,但是在main()中好像没有loss的字眼。请问是怎么back的?

@ldlbest
Copy link

ldlbest commented Dec 28, 2023

lightning 需要在模型类中定义training_step函数,在training_step函数中进行反向传播,详见文档:https://lightning.ai/docs/pytorch/stable/model/train_model_basic.html

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

No branches or pull requests

2 participants