且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

运行 object_detection_tutorial TypeError 的问题:load() 缺少 2 个必需的位置参数

更新时间:2023-02-19 19:08:52

我遇到了同样的问题,现在我正在努力解决这个问题 1 周.我想解决方案应该是这样的;

I had the same problem and i'm trying to solve this for 1 week now. I guess the solution should be this;

model = tf.compat.v2.saved_model.load(str(model_dir), None)

更多细节将是(来自官方网站);

More detail would be (from the official website) ;

从 export_dir 加载 SavedModel.

Load a SavedModel from export_dir.

tf.saved_model.load(
    export_dir,
    tags=None
)

别名:

tf.compat.v1.saved_model.load_v2

tf.compat.v2.saved_model.load