Solved by Dan_Erez in post #2 
              
              
                ok - I went through the documentation and tried to stuff. I’m still not sure why this new version works but the following works for me ( for anyone who runs into the same issue ): 
import torch
from torch import nn
from torch.autograd import Function
from torch.optim import SGD


class BinaryActivat…