Closed Dee61298 closed 1 year ago
Thing you can add : normlization from minmax -> meanstd
import torch
import aloscene
x = torch.rand(3,10,10)
x = aloscene.Frame(x,mean_std=((0.333,0.333,0.333),(0.333,0.333,0.333)))
x = x.norm_minmax_sym()
x = x.mean_std_norm(mean=(0.333,0.333,0.333), std=(0.333,0.333,0.333), name="custom") # Exception raised
Duplicated in #317 with the correct commits. Closing this one.
x=torch.rand(3,600,600) x=aloscene.Frame(x,mean_std=((0.333,0.333,0.333),(0.333,0.333,0.333)))
x=x.norm_meanstd() print("normalization de x ",x.normalization) print("Mean_std de x",x.mean_std)
x=x.norm_meanstd(name="resnet") print("normalization de x ",x.normalization) print("Mean_std de x",x.mean_std)
x=x.norm_meanstd(mean_std=((0.440,0.220,0.880),(0.333,0.333,0.333)), name="my_norm") print("normalization de x ",x.normalization) print("Mean_std de x",x.mean_std)
This pull request includes