yufuhuang

Results 4 comments of yufuhuang

你好,我在跑代码的时候出现下面的一个问题,不知道该怎么解决,想向您请教 RuntimeError: invalid argument 1: cannot perform reduction function min on tensor with no elements because the operation does not have an identity at C:/w/1/s/tmp_conda_3.7_104508/conda/conda-bld/pytorch_1572950778684/work/aten/src\THC/generic/THCTensorMathReduce.cu:64

@AsuradaYuci 代码中报错的是在loss.py中,即dist_an.append(dist[i][mask[i] == 0].min()), 为什么就会报错“无效参数1:无法在没有元素的张量上执行归约函数min”?十分感谢

@AsuradaYuci 你的pytorch版本是0.4.0.请问你的python版本是多少呢?我pytorch版本改成0.4.0,但是还是报错

@AsuradaYuci 你好 上述问题都是torch版本的问题 我改成了0.3.1 上述问题成功解决 但是在测试的时候又出现了 last_seq.append(index) AttributeError: 'range' object has no attribute 'append’