4 ms·
For comparison, here's a solution in torch with a torchscript derocator: https://gist.github.com/bethebunny/1319b96e412d6a68488b7cb35a095e35 https://gist.github
by nevermore 5y ago
For comparison, here's a solution in torch with a torchscript derocator: https://gist.github.com/bethebunny/1319b96e412d6a68488b7cb35a095e35 https://gist.github.com/bethebunny/1319b96e412d6a68488b7cb35...
IMO it's a huge advantage to be able to write torch model code that looks like how you'd write the same program in pure python, and still have them be serializable.
- albertzeyer 5y agoWell, almost exactly the same would work in TensorFlow as well. But the author choose to make the TF logic more explicitly visible, and use abstractions like tf.Module (like torch.nn.Module), the dataset, etc. I'm not sure this really makes so much sense. I guess this is more for just playing around.