Hi,
I’m trying to replace the "for loop " with indexing.
This the code :
dataset=torch.randn(200,1000,64).cuda()
t=torch.zeros(200,4,64)
for i in range(200):
centers, codes = cluster(dataset[i],4)
t[i]=centers