I think this is a general problem with ops defined in the tf.contrib
namespace, because they are lazily registered on the first use of any tf.contrib
module. If you add the statement dir(tf.contrib)
(or something else that uses tf.contrib
) before calling tf.train.import_meta_graph()
, it should work.
tensorflow.python.framework.errors.InvalidArgumentError: Cannot assign a device to node 'box_encodings': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available
config = tf.ConfigProto(allow_soft_placement=True)