Thank you, but unfortunately that wasn’t that mistake(or rather not only that one). The model accuracy, when I used your suggestion, is exactly the same - about 10%.
I think that code with changing tensor size(using “view”) might be problematic, but I am too beginner in PyTorch and I can’t find any mistake.
I tried:
self.conv = Parameter(torch.rand(self.out_channels, self.n_channels, self.kernal_size_number))

,
self.conv = Parameter(torch.Tensor(self.out_channels, self.n_channels, self.kernal_size_number))
torch.nn.init.xavier_uniform_(self.conv)

or
self.conv = Parameter(torch.Tensor(self.out_channels, self.n_channels, self.kernal_size_number))

n = self.n_channels
for k in self.kernel_size:
    n *= k
stdv = 1. / math.sqrt(n)
self.conv.data.uniform_(-stdv, stdv)