GithubHelp home page GithubHelp logo

Comments (11)

colesbury avatar colesbury commented on May 3, 2024

Yes, you can reverse it:

running_std = running_var:add(self.eps):pow(0.5)

Or even better, add support for running_var to fb-caffe-exts 😃

from fb.resnet.torch.

omkarparkhi avatar omkarparkhi commented on May 3, 2024

Thanks. Ok. Let me try it first. If it works, we can think about a pull request on fb-caffe-exts :)

from fb.resnet.torch.

omkarparkhi avatar omkarparkhi commented on May 3, 2024

Sam, another quick question, how did you plot the training error curves? I couldn't find that being saved anywhere.

from fb.resnet.torch.

colesbury avatar colesbury commented on May 3, 2024

I log a bunch of stats in JSON format and then plot using ipython and bokeh:

Around https://github.com/facebook/fb.resnet.torch/blob/master/main.lua#L61:

my_json_log(epoch, opt, trainer.optimState, {
      train_err = trainTop1,
      train_err5 = trainTop5,
      train_accuracy = 100 - trainTop1,
      train_loss = trainLoss,
      test_err = testTop1,
      test_err5 = testTop5,
      test_accuracy = 100 - testTop1,
      best_err = bestTop1,
      best_err5 = bestTop5,
      best_accuracy = 100 - bestTop1,
      finished = false,
   })

I'm not sure how the Torch community typically plots these curves. If there's a good way, I'd be glad to support it directly in this project.

from fb.resnet.torch.

omkarparkhi avatar omkarparkhi commented on May 3, 2024

May be @soumith, knows about torch plotting, but atleast I can save things using your input. Thanks!!

from fb.resnet.torch.

szagoruyko avatar szagoruyko commented on May 3, 2024

The best way is to parse the log file in ipython notebook converting to pandas frame, then it's trivial to visualize it with bokeh. I can post an example if there is interest.

from fb.resnet.torch.

omkarparkhi avatar omkarparkhi commented on May 3, 2024

Sure. Please do.

from fb.resnet.torch.

omkarparkhi avatar omkarparkhi commented on May 3, 2024

Sam, have you tried converting a model to caffe? I fixed the std/var problem but there are still errors in the code I am not able to get around. E.g. Code errors while converting nn.Identity layer as it isn't handled. I am trying to see if I can add support for that myself. But if you have tried this before, would be great to have your input.

from fb.resnet.torch.

colesbury avatar colesbury commented on May 3, 2024

No, I haven't tried converting the models to caffe

from fb.resnet.torch.

miquelmarti avatar miquelmarti commented on May 3, 2024

@omkarparkhi Did you finally have any luck with that?

I want to convert ResNet-18 and Resnet-34.
There is a tool to create the prototxt files for ResNets but I am not sure they will match exactly the models here and I don't want to lose too much time tinkering around with the weights and I really want to avoid training the models from scratch.

from fb.resnet.torch.

KevinYuk avatar KevinYuk commented on May 3, 2024

@miquelmarti
Hi miquelmarti,

How about the tool from jay-mahadeokar/pynetbuilder? Have you successfully got the good accuracy by that tool?

Thanks.

from fb.resnet.torch.

Related Issues (20)

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.