-
Notifications
You must be signed in to change notification settings - Fork 56
Can't convert model.t7 to mlmodel #18
Comments
You need to prepare your model for inference. Loss layer is not needed for inference, you can safely remove it from the model. I made a script for fast-neural-style which modifies models: https://github.com/prisma-ai/torch2coreml/blob/master/example/fast-neural-style/prepare_model.lua You can implement something similar for your model. Please note, that currently not all torch7 layers are supported and you cannot convert model with custom Lua layers inside. Please refer to example with custom layer implementation https://github.com/prisma-ai/torch2coreml/blob/master/example/fast-neural-style/convert-fast-neural-style.py#L12 if you need some unknown layers to be converted. |
Hi @opedge , The command which I used to run the code for preparing model is: Please guide me in this. |
Great open source project.
I trained some .t7 model form the DmitryUlyanov texture nets, it's same method with Justin Johnson's fast feed forward.
https://github.com/DmitryUlyanov/texture_nets#credits
Here is a sample model download link:
https://yadi.sk/d/GwL9jNJovBwQg
When I tried to convert it to mlmodel using convert-fast-neural-style.py, it shows me NotType Error, or unknown Torch class <nn.TVLoss>...
The text was updated successfully, but these errors were encountered: