Remove the curly braces:
transforms_train = T.Compose([
    T.RandomCrop(224),
    T.RandomHorizontalFlip(),
    myTrasform(0.3,0.3,0.4,0.3,random.randint(0, 6) ),
    T.ToTensor(),
    T.Normalize(mean,std)
])

transforms_val = T.Compose([
    T.Resize(256),
    T.RandomCrop(224),
    T.RandomHorizontalFlip(),
    myTrasform(0.3,0.3,0.4,0.3,random.randint(0, 6) ),
    T.ToTensor(),
    T.Normalize(mean, std)
])