如何使用自定义ops恢复元图,以便在Tensorflow中重新训练?

如何使用自定义ops恢复元图,以便在Tensorflow中重新训练?,tensorflow,Tensorflow,我正在使用Tensorflow 1.15,我想训练一个有一些自定义操作的模型。但是,当我使用tf.train.import\u meta\u graph从检查点导入MetaGraphDef时,它失败了: tensorflow.python.framework.errors_impl.NotFoundError: Op type not registered 'MyCustomOp' in binary running on f30a7a69-2688-4ccf-b4bd-fd0373ccf8a

我正在使用Tensorflow 1.15,我想训练一个有一些自定义操作的模型。但是,当我使用
tf.train.import\u meta\u graph
从检查点导入MetaGraphDef时,它失败了:

tensorflow.python.framework.errors_impl.NotFoundError: 
Op type not registered 'MyCustomOp' in binary running on f30a7a69-2688-4ccf-b4bd-fd0373ccf8a0. 
Make sure the Op and Kernel are registered in the binary running in this process. 
Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
一句话,有没有办法解决这个问题,并使用自定义op从检查点恢复MetaGraphDef