set(np.arange(0,10)) is of type numpy.int32
The dataloader loads tensor, converts it to np.array(index), and the output is of numpy.int64 type
So set(np.arange(0,10)) & set(np.array(index)) are empty,
需要 set( np.array(index).astype(np.int32) )
The set collections look the same, but the types are different