-
Mostly, there are many models saved by pytorch. So, does the burn have the converter to help this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes! We have Since PyTorch saves a (flattened) state dictionary without any model structure definition, you need to define the model in Burn to import the weights you want to reuse. Shameless plug: if you're looking to port your model over to Burn, take a look at this tutorial to port the If you don't want to redefine the model in Burn, you can also try to import the ONNX model directly. Since ONNX captures the weights and operations graph, we can automatically generate the module definition. |
Beta Was this translation helpful? Give feedback.
-
Also, on the main currently made my improvements. Here are the summary what's on the main but not in the released version: Notable enhancements to importing PyTorch weights and configs:
The book is updated which is on the main too and currently not published. |
Beta Was this translation helpful? Give feedback.
Yes! We have
PyTorchFileRecorder
(see reference in the book).Since PyTorch saves a (flattened) state dictionary without any model structure definition, you need to define the model in Burn to import the weights you want to reuse.
Shameless plug: if you're looking to port your model over to Burn, take a look at this tutorial to port the
torchvision
ResNet weights to the Burn implementation.If you don't want to redefine the model in Burn, you can also try to import the ONNX model directly. Since ONNX captures the weights and operations graph, we can automatically generate the module definition.