GithubHelp home page GithubHelp logo

huangleibuaa / iternorm-pytorch Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 7.0 66 KB

This is the pytorch re-implementation of the IterNorm

License: BSD 2-Clause "Simplified" License

Python 95.92% Shell 4.08%

iternorm-pytorch's People

Contributors

andhuanglei1 avatar dnvtmf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iternorm-pytorch's Issues

About error β€œmore than one element of the written-to tensor refers to a single memory location.”

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()).

DBN implementation may cause gpu memory leaks.

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

Tuple index error

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.