尝试使用tensorfow\u to将.pb转换为.nn时出现问题_梭鱼.py

2024-04-26 06:40:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我得到以下错误

Converting C:\Users\qwerty\Documents\saved_model.pb to output.nn
Sorting model, may take a while.... Done!
IGNORED: GatherV2 unknown layer
Traceback (most recent call last):
  File "tensorflow_to_barracuda.py", line 26, in <module>
    tf2bc.convert(args.source_file, args.target_file, args.trim_unused_by_output, args)
  File "C:\Repos\ml-agents\ml-agents\mlagents\trainers\tensorflow_to_barracuda.py", line 1552, in convert
    i_model, args
  File "C:\Repos\ml-agents\ml-agents\mlagents\trainers\tensorflow_to_barracuda.py", line 1377, in process_model
    process_layer(n, o_context, args)
  File "C:\Repos\ml-agents\ml-agents\mlagents\trainers\tensorflow_to_barracuda.py", line 1220, in process_layer
    assert all_elements_equal(input_ranks)
AssertionError

我需要怎么做才能解决这个问题?或者有没有其他方法可以将.pb文件转换成.nn文件来运行Unity推理机中的预训练模型


Tags: toinpylayermodeltensorflowlineargs
1条回答
网友
1楼 · 发布于 2024-04-26 06:40:50

如果您使用的是TensorFlowV2,则需要一个较旧的Tensorflow版本。(x<;2)即使有修补程序,它们仍然可能是与Tensorflow v2.相关的bug卸载它并安装1.15rc2(例如)。你知道吗

相关问题 更多 >