GithubHelp home page GithubHelp logo

amirhfarzaneh / lsoftmax-pytorch Goto Github PK

View Code? Open in Web Editor NEW
186.0 5.0 39.0 141 KB

The Pytorch Implementation of L-Softmax

Python 100.00%
deep-learning softmax softmax-classifier softmax-layer lsoftmax-loss pytorch machine-learning convolutional-neural-networks classification mnist

lsoftmax-pytorch's People

Contributors

amirhfarzaneh 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  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  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  avatar

lsoftmax-pytorch's Issues

why not use torch.acos

hi, very thanks for your contributions.
when i read calculate_cos_m_theta function in LSoftmaxLinear implementions,
i notice that torch.cos(2*torch.acos(cos_theta)) can simply compute cos_m_theta , why not use it ?
maybe i have some misunderstands

target becoming None

Hi,
I am unable to understand why target would become None in line 55 of lsoftmax.py.

When I run your model, there will be this error, is there any solution? Thank you very much!

When I run your model, there will be this error, is there any solution? Thank you very much!

one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [256, 10]], which is output 0 of MmBackward, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

Model implementation diff from paper

thanks for your work,but maybe there is some problems in models.py.
In paper,conv_2 is 3 conv2d
image
while in your implementation there are 4 conv2d
self.conv_2 = nn.Sequential( nn.Conv2d(64, 64, 3, padding=1), nn.PReLU(), nn.BatchNorm2d(64), nn.Conv2d(64, 64, 3, padding=1), nn.PReLU(), nn.BatchNorm2d(64), nn.Conv2d(64, 64, 3, padding=1), nn.PReLU(), nn.BatchNorm2d(64), nn.Conv2d(64, 64, 3, padding=1), nn.PReLU(), nn.BatchNorm2d(64), nn.MaxPool2d(2, 2) )

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.