GithubHelp home page GithubHelp logo

Comments (12)

mephistopheies avatar mephistopheies commented on June 9, 2024 1

I made changes, @f0k you were right about overcomplicated code, I found out what pattern is used in building deep residual network, and now conf dictionaries are removed. Now I have one function for "conv -> bn -> (relu)" and one for creation residual block. As for 1e-4, I tried it before, and difference is not sufficient.

Here is new files:

I also added "files" folder into "examples".

If you have any comments, plz write, I will fix.

from recipes.

f0k avatar f0k commented on June 9, 2024 1

Cool, nice work!

Now I have one function for "conv -> bn -> (relu)" and one for creation residual block.

Looks correct, skimming over http://ethereon.github.io/netscope/#/gist/db945b393d40bfa26006.

If you have any comments, plz write, I will fix.

Instead of lasagne.layers.get_output_shape(incoming_layer), you can just do incoming_layer.output_shape. But I don't know if it's worth fixing, it does the same. In the notebook, you sometimes write residial or resudual.

Instead of a files subdirectory, could you create a resnet50 subdirectory in examples and just move all your files (including the notebook) there? I think this is a bit tidier. examples/files/images/resnet50 is a hierarchy we probably don't want to start :) You can also move the notebook to examples/resnet50 and the images to examples/resnet50/images if you want to reduce clutter -- just make sure to keep everything in examples/resnet50.

do you have any shared place to store binary files (I noticed that all models are stored somewhere in amazon), or I can upload it anywhere?

If you upload it somewhere I can download it, I (or @ebenolson) can upload it to our amazon S3 store so you can add a link to it.

from recipes.

f0k avatar f0k commented on June 9, 2024 1

All right, it's uploaded at: https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/resnet50.pkl
Just add a link to it at the top of the modelzoo file (just like the other modelzoo files have it), and also include a link to the license if applicable (check Kaiming's repository again). Then send us a pull request. Thank you!

PS: When pickling, you should always add protocol=-1 to the dump() call. For your file, this reduced the size from 281 MB to 99 MB and the loading (unpickling) time from 10 seconds to 40 milliseconds!

from recipes.

mephistopheies avatar mephistopheies commented on June 9, 2024 1

here is pull request #76

ane new smaller serialization of the model: https://drive.google.com/file/d/0B4bl7YMqDnViRDNIbmtWaWR6ems/view?usp=sharing

from recipes.

ebenolson avatar ebenolson commented on June 9, 2024

Absolutely! Your ipython notebook looks like a great addition to the examples, and if you also want to extract just the model building function into a python script that would be good for modelzoo.

from recipes.

f0k avatar f0k commented on June 9, 2024

+1 for porting the pretrained weights and comparing results of the implementations!

A minor comment on the batch normalization: When you call inv_std.set_value, you should add epsilon inside of the square root. Often this is 1e-4, but I don't know what was used in the original model. This could make a small difference for the predictions, check if they get closer with this modification.

And a larger comment on the code: Your setup for recreating the layers seems a bit complicated. Can't you base your code on https://github.com/Lasagne/Recipes/blob/master/papers/deep_residual_learning/Deep_Residual_Learning_CIFAR-10.py#L93? If the architecture hasn't drastically changed for the caffe model, there's no need to specify each complex block on its own; the architecture follows some simple rules that can be cast as helper functions!

from recipes.

erfannoury avatar erfannoury commented on June 9, 2024

Are you also planning on providing the extracted weight file? (like other models in modelzoo)

from recipes.

mephistopheies avatar mephistopheies commented on June 9, 2024

@erfannoury do you have any shared place to store binary files (I noticed that all models are stored somewhere in amazon), or I can upload it anywhere?

from recipes.

mephistopheies avatar mephistopheies commented on June 9, 2024

done: https://github.com/mephistopheies/Recipes/tree/resnet50

here is binary with model: https://drive.google.com/file/d/0B4bl7YMqDnViZF90WGd0dG5ZTlE/view?usp=sharing

from recipes.

f0k avatar f0k commented on June 9, 2024

ane new smaller serialization of the model

Is this any different from the one I uploaded? I had already re-pickled your file with protocol=-1.

from recipes.

mephistopheies avatar mephistopheies commented on June 9, 2024

no, it is same

from recipes.

nshreyasvi avatar nshreyasvi commented on June 9, 2024

Hello,
Where can I download resnet50.pkl pre-trained model as none of the links seem to be working

from recipes.

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.