wenet-e2e / wespeaker

Research and Production Oriented Speaker Verification, Recognition and Diarization Toolkit
Apache License 2.0
598 stars 104 forks source link

训练报错 #280

Closed wcqy-ye closed 4 months ago

wcqy-ye commented 4 months ago

请问这个问题怎么解决或者代码该怎么修改呢: RuntimeError: Expected integer literal for index. ModuleList/Sequential indexing is only supported with integer literals. Enumeration is supported, e.g. 'for index, v in enumerate(self): ...': File "/memory/wespeaker/wespeaker/models/ds_tdnn.py", line 265 y_i = x_i elif i == 1: y_i = self.blocksi - 1


            else:
                y_i = self.blocks[i - 1](x_i + y_i)
![image](https://github.com/wenet-e2e/wespeaker/assets/46421217/90af51cf-ca1f-406c-8050-bc99819b67ab)
这里本来用的就是enumerate呀。。
JiJiJiang commented 4 months ago

如果你不需要训练后导出script model,可以直接注释掉train.py里面的这两行格式检查的代码 image

wcqy-ye commented 4 months ago

如果你不需要训练后导出script model,可以直接注释掉train.py里面的这两行格式检查的代码 image

好的 谢谢!