瑞芯微Rockchip开发者社区
直播中

五斤麻辣油

8年用户 1185经验值
擅长:电源/新能源
私信 关注
[问答]

pytorch模型Syntax error in input!是什么原因导致的




回帖(4)

贾桂林

2022-4-2 14:23:35
pytorch版本是多少?
rknn那边只能支持1.2的
举报

五斤麻辣油

2022-4-2 14:24:20
pytorch是1.2的

rknn 1.3
举报

juju宇哥

2022-4-2 14:25:01
  您好 我也遇到了相同的问题

  .load_pytorch时出错 提示Syntax error in input! LexToken(NAMED_IDENTIFIER,‘str’,

  后边build报 IndexError: list index out of range
举报

jjll652

2022-4-2 14:25:25
  你好,torch1.2也遇到相同的错误

  --》 config model

  done

  --》 Loading model

  /home/user/.local/lib/python3.6/site-packages/onnx_tf/common/__init__.py:87: UserWarning: FrontendHandler.get_outputs_names is deprecated. It will be removed in future release.。 Use node.outputs instead.

  warnings.warn(message)

  。/fire.pt ********************

  WARNING: Token ‘COMMENT’ defined, but not used

  WARNING: There is 1 unused token

  Syntax error in input! LexToken(《,‘《’,3,101)

  done

  --》 Building model

  W Genreate input meta fail, please check model.

  W External input meta file “/tmp/tmpzzzps_ss/fire_inputmeta.yml” is not exists.

  Traceback (most recent call last):

  File “/home/user/wuzhe/fire/model_trans.py”, line 51, in 《module》

  trans_model()

  File “/home/user/wuzhe/fire/model_trans.py”, line 36, in trans_model

  ret = rknn.build(do_quantization=True, dataset=‘。/dataset.txt’)

  File “/home/user/.local/lib/python3.6/site-packages/rknn/api/rknn.py”, line 238, in build

  ret = self.rknn_base.build(do_quantization=do_quantization, dataset=dataset, pack_vdata=pre_compile, batch_size=rknn_batch_size)

  File “rknn/api/rknn_base.py”, line 719, in rknn.api.rknn_base.RKNNBase.build

  File “rknn/api/rknn_base.py”, line 2249, in rknn.api.rknn_base.RKNNBase._generate_inputmeta

  IndexError: list index out of range
举报

更多回帖

发帖
×
20
完善资料,
赚取积分