Closed GaoFengs closed 2 years ago
Please help me!!!
Have you tried torch.square(y)
?
Yeah I remember this to be a puny PyTorch version error. I tested the code last with Torch 1.7.1. Perhaps square has been removed in the newer version or the other way around. I'll add the dependency requirements soon. :+1:
For now, either switch to a version which has this function, or replace in the code y ** 2 or equivivalent.
AttributeError: 'Tensor' object has no attribute 'square'
y = torch.reshape(x, [group_size, -1, channels, height, width]) y = torch.sqrt(y.square().mean(dim=0, keepdim=False) + alpha)
square() not exist?