elife-asu / innlab Goto Github PK
View Code? Open in Web Editor NEWA python/pytorch package for invertible neural networks
License: GNU General Public License v3.0
A python/pytorch package for invertible neural networks
License: GNU General Public License v3.0
How do I train INN with my dataset?
I faced this problem "The algorithm failed to converge because the input matrix is ill-conditioned or has too many repeated singular values (error code: 767)" during the training of JacobianLinear layer. It seems that the input feature need to fit this requirement.
In utilities.default_net()
, we have a default activation function (currently, we use nn.SELU
). Which one works best?
When we need to add other loss components, the log(p) and log|det(J)| have to be averaged to make it easy to balance. This issue also make the https://github.com/ELIFE-ASU/Macro be hard to handle.
If we just want INN.Conv2d output the first value, where can we set the value of "compute_p" ?
We need a test program for checking Jacobian calculation.
Dear authors,
Thank you for creating such a great project. I would like to know how I can train an INN? Is the training process the same as normal pytorch?
Best,
Lin
In INN.BatchNorm1d
, the forward function is:
def forward(self, x, log_p=0, log_det_J=0):
if self.compute_p:
if not self.training:
# if in self.eval()
var = self.running_var # [dim]
else:
# if in training
# TODO: Do we need to add .detach() after var?
var = torch.var(x, dim=0, unbiased=False) # [dim]
x = super(BatchNorm1d, self).forward(x)
log_det = -0.5 * torch.log(var + self.eps)
log_det = torch.sum(log_det, dim=-1)
return x, log_p, log_det_J + log_det
else:
return super(BatchNorm1d, self).forward(x)
Do we need to requires var
has gradient information? It seems not training BatchNorm1d
, but training modules before it. Is there any references on this?
Hi @Zhangyanbo!
Thank you for creating this great package! Would you mind adding a license to it, so that the legal implications are clear when it is used by third party projects?
Christoph
The output of RealNVP can be very high. This is because it have torch.exp
is the forward process:
y = x * torch.exp(self.logs(x)) + self.t(s)
Is there any method that do all requirement below at the same time:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.