Open whitmark opened 6 years ago
No model transformation is needed. However, please note that in Python data are row-major following numpy convention, while in C++/C# they are col-major and tensor axis are reversed. So in Python when you are feeding a tensor with row-major of [batch_size, seq_len, sample_dimA, sample_dimB], the corresponding C++/C# data tensor would be col-major [sample_dimB, sample_dimA, seq_len, batch_size]. Please check C# eval examples here as references, or search for C# source in GitHub for tests/examples.
Thanks @KeDengMS. I would prefer to train in C#, but there is so much more documentation, examples and perhaps functionality in Python, I am considering changing my development plans to train in Python but I still need to evaluate in C#. Are you suggesting the eval documentation and examples you recommended demonstrate how to make this tensor modification? If so, I didn't see a reference for this specifically but suspect it would be good to add to the C# Evaluation documentation along with how-to examples and any implementation caveats since others may take this path.
As for training in C#, you may create you model in Python and load in C# to train. We should definitely improve C# docs and examples. For the time being, please search for C# test code in repo that loads pretrained models.
@KeDengMS can u give a file path in this repo about C# load pretrained models, I can't find yet
I am looking to train non-image DNN model in Python (3.6) but evaluate in C#. Is there some documentation or examples on how best to do this? Unclear what transformation is needed, if any, before saving the model in Python or after loading the model in C#.