跑clip特征输出后:
xx= image_features_list.cpu()
xx2=xx.numpy()
print("cpu norm",xx.norm(dim=-1))
print("npy norm",np.linalg.norm(xx2,axis=-1))
print("gpu norm",image_features_list.norm(dim=-1))
相关
Overflow error in torch.linalg uncaught · Issue #65815 · pytorch/pytorch · GitHub
网友猜测与计算中多线合并时大数据(相比数据类型)溢出有关