error:
eq() received an invalid combination of arguments - got (numpy.ndarray), but expected one of:
- (Tensor other)
didn’t match because some of the arguments have invalid types: (!numpy.ndarray!) - (Number other)
didn’t match because some of the arguments have invalid types: (!numpy.ndarray!)
remove = (g_pids[order] == q_pid) & (g_camids[order] == q_camid)
TypeError: eq() received an invalid combination of arguments - got (numpy.ndarray), but expected one of:
- (Tensor other)
didn’t match because some of the arguments have invalid types: (numpy.ndarray) - (Number other)
didn’t match because some of the arguments have invalid types: (numpy.ndarray)
solution:
You are trying to compare predicted and labels. However, your predicted is an np.array while labels is a torch.tensor therefore eq() (the == operator) cannot compare between th