Comments (12)
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:
- https://github.com/mephistopheies/Recipes/blob/resnet50/modelzoo/resnet50.py
- https://github.com/mephistopheies/Recipes/blob/resnet50/examples/ImageNet%20Pretrained%20Network%20(ResNet-50).ipynb
I also added "files" folder into "examples".
If you have any comments, plz write, I will fix.
from recipes.
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.
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.
here is pull request #76
ane new smaller serialization of the model: https://drive.google.com/file/d/0B4bl7YMqDnViRDNIbmtWaWR6ems/view?usp=sharing
from recipes.
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.
+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.
Are you also planning on providing the extracted weight file? (like other models in modelzoo)
from recipes.
@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.
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.
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.
no, it is same
from recipes.
Hello,
Where can I download resnet50.pkl pre-trained model as none of the links seem to be working
from recipes.
Related Issues (20)
- 3D UNet implementation HOT 7
- reason behind low value of parameters in VGG19 HOT 1
- error when set values for vgg-19 HOT 2
- modelzoo resnet50.py incompatible to Python 3 HOT 3
- Implementation of Convolutional Spatial Transformer and Siamese network HOT 3
- no sandbox.cuda
- Bad argument to Theano: No. of dimensions changes in the error after reshaping
- Question not an Issue: fliping the arrays HOT 1
- cifar100 with resnet HOT 1
- pretrained network for small images HOT 1
- https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg16.pkl HOT 6
- vgg16.pkl without aws cli
- Need help with S3 Browser based downloads HOT 1
- Dice coeff is not changing since the first epoch and binary accuracy changes and is increased to 1?
- Problem with op.grad in OpFromGraph - Guided Backpropagation
- Wrong order of stride and pad arguments in build_simple_block HOT 3
- Broken links in Video features with C3D.ipynb example HOT 5
- Training C3D
- Wrong pretrained weights for UNet example HOT 1
- DICE coefficient loss function HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recipes.