Hi,
Thanks for your reply.
this works ok
dists[train]=((x_train[train].reshape(-1,C,H,W) - x_test)**2).sum().sqrt()
but I have errors with
                    
            
           25


dists[train]=((x_train[train].reshape(-1,C,H,W) - x_test)**2).sum(axis=1).sqrt()'

RuntimeError: expand(torch.DoubleTensor{[10, 16, 16]}, size=[10]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (3)

for axis=1, we’re collapsing along the rows rather than columns right?
Thank you once again.