-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add option to use multiple pretrained networks #498
Conversation
That's a neat idea. Can you link to a blog post or walkthrough that would let me test this out?
|
@gheinrich is this feasible for Torch as well? |
I needed this a few days ago so I added it and trained a MNIST network with it. I don't have it written down, but I could link a set of simple MNIST classifiers that can be used. As for the tooltip, I'll try to update it tomorrow. |
@lukeyeager it is a challenge to implement this for Torch since Torch doesn't have named layers/parameters. |
@lukeyeager I have updated the tooltip. Here is a link to three neural network models that can be used to test the added functionality: http://www.igorsevo.com/File.ashx?type=res&resType=0&title=source+code%5cMNIST-Double.zip. |
@@ -256,7 +256,7 @@ def validate_custom_network_snapshot(form, field): | |||
if form.method.data == 'custom': | |||
snapshot = field.data.strip() | |||
if snapshot: | |||
if not os.path.exists(snapshot): | |||
if not all(map(lambda x: os.path.exists(x), snapshot.split(';'))): |
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.
Let's strip the whitespace around the separator.
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.
And use :
instead of ;
.
@lukeyeager I added the whitespace stripping and changed the delimiter and the tooltip. |
This looks OK to me. Thanks for the updates! I don't have a signed CLA from you yet, do I? Please follow the instructions here: https://github.com/NVIDIA/DIGITS/blob/master/CONTRIBUTING.md#pull-requests |
Add option to use multiple pretrained networks
Oops, I forgot to ask you to squash your commits into one! Next time. |
Rats. That was a bad choice of separator on Windows machines. My bad.
We should probably use # Linux
>>> os.path.pathsep
':'
# Windows
>>> os.path.pathsep
';' |
@lukeyeager: Fixed this and created a pull request #854. |
Oh, @lukeyeager has already pushed a fix with #851... |
I synced with the master branch, but the changes were not there. Also, there were issues when trying to use this because someone had overwritten the modifications to the |
I've added an option to copy weights from multiple pretrained networks so that ensembles can be built easily. Multiple pretrained networks can be added as semicolon delimited paths.