How did you pass in the weights to your module like ttqConv2D? I’m using nn.Sequential to build the model in a sequence like this:
self.convLayer = nn.Sequential(
            Conv2d(3, 128, kernel_size=3, stride=1, padding=1),
            nn.BatchNorm2d(128, momentum=momentum, eps=eps),
            BinaryTanh(),
            Conv2d(128, 128, kernel_size=3, stride=1, padding=1),
            nn.MaxPool2d(2))

I would like to pass the weights into BinaryTanh, which is subclassed from nn.module like your tqConv2D.