-
Notifications
You must be signed in to change notification settings - Fork 1.6k
VGG19 Implementation with example #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@OwenLiuzZ Thank you so much for your PR. Please update the changelog with your contribution and add your name to the contributor list. I let @zsdonghao reviewing your work ;) |
Hi, please also update the docs https://github.com/tensorlayer/tensorlayer/blob/master/docs/modules/models.rst and the changelog https://github.com/tensorlayer/tensorlayer/blob/master/CHANGELOG.md |
A better coding style can be found here https://github.com/tensorlayer/tensorlayer/blob/master/tensorlayer/models/squeezenetv1.py, instead of using |
|
||
raise Exception("unknown layer name (end_with): {}".format(end_with)) | ||
|
||
def restore_params(self, sess): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One simple solution is that we train all the models and store theses models in the libraryof the TL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got a "This site can’t be reached" error when I tried to download the npy of VGG'19 from the website given.
How large is the npy file? Can we host it in our pre-trained model repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is about 570MB for this npy file. The public repo maximum limit for the file is 100 MB. However, I do not know what the limit is in the private repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original download link is for browser download only.
I've uploaded it to tensorlayer/pretrained-models, you can now use this download link in the program:
https://media.githubusercontent.com/media/tensorlayer/pretrained-models/master/models/vgg19.npy
You can use ‘git lfs’ for uploading large file.
________________________________
From: Sichao Liu <notifications@github.com>
Sent: Thursday, June 14, 2018 5:10:38 PM
To: tensorlayer/tensorlayer
Cc: LG; Mention
Subject: Re: [tensorlayer/tensorlayer] [WIP] VGG19 Implementation with example (#698)
@OwenLiuzZ commented on this pull request.
________________________________
In tensorlayer/models/vgg19.py<#698 (comment)>:
+ lambda net: MaxPool2d(net, filter_size=(2, 2), strides=(2, 2), padding='SAME', name='pool5'),
+ lambda net: FlattenLayer(net, name='flatten'),
+ lambda net: DenseLayer(net, n_units=4096, act=tf.nn.relu, name='fc1_relu'),
+ lambda net: DenseLayer(net, n_units=4096, act=tf.nn.relu, name='fc2_relu'),
+ lambda net: DenseLayer(net, n_units=1000, act=tf.identity, name='fc3_relu'),
+ ]
+ net = net_in
+ for l in layers:
+ net = l(net)
+ # if end_with in net.name:
+ if net.name.endswith(end_with):
+ return net
+
+ raise Exception("unknown layer name (end_with): {}".format(end_with))
+
+ def restore_params(self, sess):
Yes, it is about 570MB for this npy file. The public repo maximum limit for the file is 100 MB. However, I do not know what the limit is in the private repo.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#698 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AB8ydOuPFO-sYon3M0JU9R09BJHzIG9yks5t8iiOgaJpZM4Um-Q1>.
|
@zsdonghao for vgg16 we used the pre-trained weights provided by http://www.cs.toronto.edu/~frossard/post/vgg16/. |
modify the change log and model API for PR698
add the function of automatically download the model in vgg19
Hi, @OwenLiuzZ I've tested this PR on a clean VM, it works! |
Hi, @lgarithm I have resolve the conflicts. Thanks for reminding. |
* add vgg19 pre-trained model and the example of tutorial * modify the change log and model API for PR698 * add the function of automatically download the model in vgg19
Checklist
Motivation and Context
Description