general_x = general_x / norm.expand_as(general_x)
RuntimeError: The expanded size of the tensor (64) must match the existing size (32) at non-singleton dimension 1. Target sizes: [32, 64]. Tensor sizes: [32]
if I change torch.norm(keepdim= True), the code can run.
but the accuracy is still 60%, not 90%.
Have anyone solve this problem, thanks a lot.
RuntimeError: The expanded size of the tensor (64) must match the existing size (32) at non-singleton dimension 1. Target sizes: [32, 64]. Tensor sizes: [32]
if I change torch.norm(keepdim= True), the code can run.
but the accuracy is still 60%, not 90%.
Have anyone solve this problem, thanks a lot.