duxy-me / AMR

This is our official implementation for the paper: Jinhui Tang, Xiaoyu Du, Xiangnan He, Fajie Yuan, Qi Tian, and Tat-Seng Chua, Adversarial Training Towards Robust Multimedia Recommender System.
https://github.com/duxy-me/AMR
33 stars 16 forks source link

numpy.AxisError: axis 0 is out of bounds for array of dimension 0 #5

Open devinzkx123 opened 2 years ago

devinzkx123 commented 2 years ago

Traceback (most recent call last): File "/home/zkx/recommendation/AMR/src/main.py", line 35, in s.train() File "/home/zkx/recommendation/AMR/src/solver/Solver.py", line 51, in train self.test('epoch %d' % i) File "/home/zkx/recommendation/AMR/src/solver/Solver.py", line 81, in test score5 = np.mean(map(self._score, zip(d,[5] len(d))), 0) File "", line 5, in mean File "/usr/local/anaconda3/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 3419, in mean return _methods._mean(a, axis=axis, dtype=dtype, File "/usr/local/anaconda3/lib/python3.9/site-packages/numpy/core/_methods.py", line 166, in _mean rcount = _count_reduce_items(arr, axis, keepdims=keepdims, where=where) File "/usr/local/anaconda3/lib/python3.9/site-packages/numpy/core/_methods.py", line 75, in _count_reduce_items items = arr.shape[mu.normalize_axis_index(ax, arr.ndim)] numpy.AxisError: axis 0 is out of bounds for array of dimension 0

进程已结束,退出代码1

devinzkx123 commented 2 years ago

能帮忙看一下吗?这个问题要怎么解决?求助大佬

duxy-me commented 2 years ago

能帮忙看一下吗?这个问题要怎么解决?求助大佬

我们没有遇到过这个问题。你看一下会不会是包的版本问题。