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

yolox does not require loss creator when running on orca #4412

Open
zhanglirong1999 opened this issue Apr 13, 2022 · 3 comments
Open

yolox does not require loss creator when running on orca #4412

zhanglirong1999 opened this issue Apr 13, 2022 · 3 comments
Labels

Comments

@zhanglirong1999
Copy link

When train yolox on orca, there is no need to pass the 'loss creator' as parameter to initialize Estimator and calculate the loss after forward(). Because yolox can directly get the loss after forward().
https://github.com/Megvii-BaseDetection/YOLOX/blob/main/yolox/core/trainer.py#L106

The same is true when evaluate yolox on orca, there is no need to calculate the loss after forward()

@zhanglirong1999
Copy link
Author

Orca calculates loss after forward(When run yolox, there is no longer need to compute the loss function).
This is the link that orca calculate the loss:
https://github.com/intel-analytics/BigDL/blob/main/python/orca/src/bigdl/orca/learn/pytorch/training_operator.py#L285

@zhanglirong1999
Copy link
Author

So can Orca change loss to be optional ?

@hkvision
Copy link
Contributor

Probably we can make loss_creator optional. If so, they inputs and targets would all be fed into the model, and user should define a function to get the loss from the model forward result (and then to combine with loss.backward)?

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

No branches or pull requests

2 participants