我在冻结 Tensorflow 中的模型时遇到问题。我想在 Unity 中使用它,但它们需要将冻结图作为 .bytes 文件而不是 .pb。除了 freeze_graph.py 之外,还有其他方法获取字节文件吗?我不断收到此错误:
类型错误:names_to_saveables 必须是将字符串名称映射到张量/变量的字典。不是变量: Tensor("BoxPredictor_0/BoxEncodingPredictor/biases:0", shape=(12,), dtype=float32)
这是我目前正在使用的:
freeze_graph.freeze_graph(input_graph = 'ssd_mobilenet_v1_coco_11_06_2017/frozen_inference_graph.pb',
input_binary = True,
input_checkpoint = 'ssd_mobilenet_v1_coco_11_06_2017/model.ckpt',
output_node_names = "num_detections,detection_boxes,detection_scores,detection_classes",
output_graph = 'BytesModel/bytesModel.bytes',
clear_devices = True, initializer_nodes = "",input_saver = "",
restore_op_name = "save/restore_all", filename_tensor_name = "save/Const:0")
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)