I have had no problems downloading and using a model downloaded from Microsoft Custom Vision. However when I transfer the model and python code to another computer, the program crashes at this line:
graph_def.ParseFromString(f.read())
Windows throws an error saying something to the effect of: "A problem has occurred, the program is not working correctly. The program will be closed and Windows will notify you if a solution to the problem is found."
I haven't been able to figure out what is wrong and the debugging methods that I know of are not helping. The program doesn't proceed far enough to get to pdb.pm(), and python -m -trace --trace name.py halts at position 0 of the program saying it can't decode unicode.
full code to the area in question is:
graph_def = tf.compat.v1.GraphDef()
try:
with tf.io.gfile.GFile(path_to_custom_vision_model, "rb") as f:
try:
print("Parsing string...")
graph_def.ParseFromString(f.read())
except:
pdb.pm()
tf.import_graph_def(graph_def, name="")
except EnvironmentError as err:
print(err)
print("Custom Visionのモデルを読み取ろうとした時にエラーが起きました。パスはあってるか確認してください。プログラムを終わらせます。")
input("続けるにはenterを押してください")
exit(-1)
Any solutions or suggestions of things to try to figure out the problem are much appreciated!