huangleibuaa / iternorm-pytorch Goto Github PK
View Code? Open in Web Editor NEWThis is the pytorch re-implementation of the IterNorm
License: BSD 2-Clause "Simplified" License
This is the pytorch re-implementation of the IterNorm
License: BSD 2-Clause "Simplified" License
If I use ./extension/normalization/iterative_normalization.py
directly, I get the error - "more than one element of the written-to tensor refers to a single memory location". This error occurs due to the PyTorch version update. I could find the solution here.
Basically,
change self.register_buffer('running_wm', torch.eye(num_channels).expand(num_groups, num_channels, num_channels)
to self.register_buffer('running_wm', torch.eye(num_channels).expand(num_groups, num_channels, num_channels).clone())
.
I tried to run DBN, but the implementation cause gpu memory leaks in my computer whose torch version is 0.4.1. I fix this by changing the following lines of codes
self.running_mean = (1. - self.momentum) * self.running_mean + self.momentum * mean
self.running_projection = (1. - self.momentum) * self.running_projection + self.momentum * wm
to
self.running_mean = (1. - self.momentum) * self.running_mean + self.momentum * mean.data
self.running_projection = (1. - self.momentum) * self.running_projection + self.momentum * wm.data
Thanks for the implementation! I get the following error when using a 2D vector as input Bxd. Am I using this layer wrong? I also tried reshaping to Bxdx1x1 (d=256)
xc = saved[0] # centered input
IndexError: tuple index out of range
with the following construction
self.norm = IterNorm(256, num_groups=8, affine=False, momentum=1)
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.