-
I'm trying to port a model from pytorch to burn. I want to use pytorch pre-calculated tensors & model weights to test if the burn implementation of the same model components works identically as the torch counterpart. This requires me to load tensors. I haven't seen such an example in the documentation, issues, discussions, or in the examples folder. Any help on how to do this idiomatically is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
We should have a special book section on this. Please file an issue and mentione me. Meanwhile you can use the following resources:
https://github.com/antimora/face-onnx/blob/main/src/bin/with_weights_test_outputs.rs This uses outputs from pytorch saved as pt file. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the info. The example from face-onnx helps me deserialize tensors. Further investigation suggests this might be caused by That explains why we must derive If they can modify these lines to handle not only |
Beta Was this translation helpful? Give feedback.
We should have a special book section on this. Please file an issue and mentione me. Meanwhile you can use the following resources:
Book section https://burn.dev/burn-book/import/pytorch-model.html
Use this repo to test model output:
https://github.com/antimora/face-onnx/blob/main/src/bin/with_weights_test_outputs.rs
This uses outputs from pytorch saved as pt file.