Hello I d like to stack models .
For example:
class m1(nn.Module):
def __init__(self, n_wire):
super(m1, self).__init__()
...
def forward(self,):
...
class m2(nn.Module):
def __init__(self, n_wire):
super(m2, self).__init__()
...
def forward(self,):
...
class m3(nn.Module):
def __init__(self, n_wire):
super(m3, self).__init__()
...
def forward(self,):
...
and then optimise a cost between label and m3(m2(m1(x)))
PS: I want to keep them separatedbecause some of them are usual nn and other are using an interface specific for qml.
What are the condition in order not to break the backprop ?
Best regards,
B