Skip to content

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

Description

@devinzkx123

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 "<array_function internals>", 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions