Thanks it works l did the following :
x=dim(16,3,32)
 cl = nn.Linear(16, 32,3)
 x = cl(x)

but according to documentation  Output: (N,∗,out_features) is equivalent to cl = nn.Linear(16, 3,32) (in this case it doesn’t work. l permuted dim 2 and dim 1 like this and it works  cl = nn.Linear(16, 32,3)