You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, this is a very great job, but i have some confusions, i want implement this equation:
(x1, x2) = x
y1 = x1 + Fm(x2)
y2 = x2 + Gm(y1)
y = (y1, y2)
and joint this again:
(x3, x4) = y
y3 = x3 + Fm(x4)
y4 = x4 + Gm(y3)
yy = (y3, y4)
and joint more of this,and how can i do this,can u tall me how to finish this work
The text was updated successfully, but these errors were encountered:
Hi, have a look at the memcnn.AdditiveCoupling class, which is essentially what you are trying to use. Now you can implement your example in the following manner:
importmemcnnFm=# TODO pick something niceGm=# TODO pick something niceFm2=# TODO pick something nice Gm2=# TODO pick something nicenetwork=torch.nn.Sequential(
memcnn.AdditiveCoupling(Fm=Fm, Gm=Gm),
memcnn.AdditiveCoupling(Fm=Fm2, Gm=Gm2),
)
x=# TODO define data that can be split into (x1, x2) along the channelsyy=network.forward(x)
For example values for Fm, Gm, Fm2, and Gm2 have a look at the example from the readme.
Finally, if you want to have memory savings you can wrap the additive couplings inside a memcnn.InvertibleModuleWrapper, e.g.:
Hello, this is a very great job, but i have some confusions, i want implement this equation:
(x1, x2) = x
y1 = x1 + Fm(x2)
y2 = x2 + Gm(y1)
y = (y1, y2)
and joint this again:
(x3, x4) = y
y3 = x3 + Fm(x4)
y4 = x4 + Gm(y3)
yy = (y3, y4)
and joint more of this,and how can i do this,can u tall me how to finish this work
The text was updated successfully, but these errors were encountered: