You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the denormalize function, the range for clamping the tensor should be between 0 and 1. This is because the input tensors to the function include one tensor processed by the ToTensor function and another tensor generated by the network. The valid value range for both of these tensors is between 0 and 1. Therefore, the denormalize function should be modified accordingl. Modify it as follows:
def denormalize(tensors):
''' channel in the second dim'''
for c in range(3):
tensors[:, c].mul_(std[c]).add_(mean[c]) # Underscores are in-place operations
return torch.clamp(tensors, 0, 1)
The text was updated successfully, but these errors were encountered:
In the denormalize function, the range for clamping the tensor should be between 0 and 1. This is because the input tensors to the function include one tensor processed by the ToTensor function and another tensor generated by the network. The valid value range for both of these tensors is between 0 and 1. Therefore, the denormalize function should be modified accordingl. Modify it as follows:
The text was updated successfully, but these errors were encountered: