Reputation: 21
I verified that the path to the binary protobuf file (inception_v3_2016_08_28_frozen.pb) is correct. In the LoadGraph
function, ReadBinaryProto
appears to succeed (load_graph_status
passes the ok check), but the call to Session->Create using the resulting graph_def throws an exception:
"Exception thrown: read access violation session->_Mypair._Myval2 was nullptr."
If I examine the graph_def
object, it doesn't really appear to contain anything (version_
is 0, _cached_size_
is 0, all pointers appear to be NULL, etc.).
Upvotes: 0
Views: 176
Reputation: 21
Resolving this required adding the Visual Studio /WHOLEARCHIVE flag to a bunch of the TF libary files. The ones I ended up whole archiving (some may not be strictly necessary) were:
/WHOLEARCHIVE:tf_protos_cc.lib
/WHOLEARCHIVE:tf_c.lib
/WHOLEARCHIVE:tf_cc.lib
/WHOLEARCHIVE:tf_cc_framework.lib
/WHOLEARCHIVE:tf_cc_ops.lib
/WHOLEARCHIVE:tf_cc_while_loop.lib
/WHOLEARCHIVE:tf_core_cpu.lib
/WHOLEARCHIVE:tf_core_direct_session.lib
/WHOLEARCHIVE:tf_core_framework.lib
/WHOLEARCHIVE:tf_core_kernels.lib
/WHOLEARCHIVE:tf_core_lib.lib
/WHOLEARCHIVE:tf_core_ops.lib
Upvotes: 1