Code Monkey home page Code Monkey logo

Comments (3)

shunk031 avatar shunk031 commented on September 25, 2024

File "/home/ram/sanaa/workspace/style_occasion/sanaa/train_conv/train_conv_multi/chainer-center-loss-master/center_loss.py", line 39, in forward
y = xp.sum(xp.square(features - centers_batch)) / batch_size / 2

Please check the dimension of features and centers_batch. If the dimension mismatched, above error is raised.
This code is written in Python 3.5.1, so I recommend that you use Python3.5 or higher.

from chainer-center-loss.

dotaa avatar dotaa commented on September 25, 2024

hello! yes, i solved that error.
its running but my cost values are exploding to NaN when i use center loss. when i disable it, the values are fine.
also, there is an issue with the script when passing
center_loss = self.center_loss_function(h, t, self.alpha_ratio)
it gives the error, Can take only 3 arguments, 4 given. so i removed self.alpha_ratio. is that why my values are going to Nan?
Can anybody help me with this?
Thanks!

from chainer-center-loss.

dotaa avatar dotaa commented on September 25, 2024

I tried debugging. but i am not able to understand...i printed out the centers, and after sometime, the center values are really very high and they go to Nan. is this a bug in the code. I print out the centers and they look like,
screenshot from 2018-03-01 15 59 27
Can you help pls?

update:
i am using SGD momentum instead of adam. the cost values of just center loss is as high as 700.0 , now it isnt going to Nan.

from chainer-center-loss.

Related Issues (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.