ptrblck:

with torch.no_grad()


Thanks a lot.
Is it ok?
class Net(Module):
    def __init__(self):
        super(Net, self).__init__()	
        self.convZ = nn.Conv2d(...)
        with torch.no_grad():
             self.convZ.weight = Parameter(filter)        
        self.pool = nn.AvgPool2d(...)
        self.fc1 = nn.Linear(....)

    def forward(self, x):
        out = torch.atan(self.convZ(x))
        out = self.pool(out)
        out = torch.atan(self.fc1(out))
        return out


Best Regards