Closed zhimakaimen225xa closed 3 years ago
I've found the reason, the sensor created by my function:dataTransfer.OutputTensor, can only contain one sample a time, so the shape of sensor should look like:[1, channels, height, width], so I need to close this issue and open a new one.
Describe the bug
I trained a cnn model with keras and saved the model to h5 file, then I convert the h5 file to pb file. I opened my_model.pb file in python and predicted test data, it works ok. But when I try to load the pb file in c# (i use tensorflowsharp), the results from model prediction are always same, the probability for output are always 0.252, 0.385, 0.361, my code is as follows,
To Reproduce Include steps to reproduce the issue locally, include it as a zip file.
Note: I do not have time to create models, train models, create samples from scratch and then adding your 3-4 lines of code to a sample to debug your problem. You need to provide a complete test case.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.