-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Upload Pre-trained Models for Fine Tuning. #896
Upload Pre-trained Models for Fine Tuning. #896
Conversation
a58a8fe
to
2f7f75c
Compare
This will be useful if we later need to store several pre-trained models in/alongside DIGITS. |
For sure! |
</tbody> | ||
<tbody ng-if="jobs.length == 0"> | ||
<tr> | ||
<td colspan="{[fields.length]}"> |
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.
This colspan needs to include the displayed optional columns.
Like
{[ colspan = (storage.pretrained_model_fields | filter:show(true)).length + (storage.model_output_fields | filter:show(true)).length;'' ]}
<td colspan="{[colspan]}">
If you remove the model_output.fields
from the page, remove them from this colspan as well.
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.
Good point! I will fix this in my next commit.
What is there a mechanism for adding the models to the pre-trained model list? |
Thanks Joe! I added an option in the New Model drop-down for uploading a pretrained model. There you select your weights, model def, and labels file. The data corresponds to the pretrained model job after uploading. |
Would it make sense to allow it to point to a tgz file, view the table, and have that as an option for uploading models? There might be too much to assume about the role of files, but if it's a model from DIGITS, it should work. Just a thought. |
That would definitely be a great option to have! I did think think about it, but decided against because of what you mentioned with external models, and also because it expects the original network prototxt file, and this wasn't saved into tar files prior to #891 . |
2f7f75c
to
2abae97
Compare
I added the suggested changes with my latest commit. Everything now should be good to go! :) |
@@ -0,0 +1,3 @@ | |||
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. |
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.
This should just be "2016" since it's a new file.
The file upload doesn't look very good. @jmancewicz figured out how to make this work for all browsers: #325 But I can't figure out how to add it to this PR because you're defining the form in javascript!? |
|
7181906
to
7b6fcdb
Compare
Thanks @lukeyeager ! I implemented your comments. |
I tried uploading tarballs from 2 different models and I just get a red "Upload Failed" with no more information. |
30412eb
to
b16f0fe
Compare
b16f0fe
to
1fbf9d7
Compare
@lukeyeager My bad! The problem should be fixed now. I added some better error messages for upload as well. |
45d4a17
to
0b094cb
Compare
@@ -84,7 +84,7 @@ def __init__(self, **kwargs): | |||
self.solver = None | |||
|
|||
self.solver_file = CAFFE_SOLVER_FILE | |||
self.original_file = CAFFE_ORIGINAL_FILE | |||
self.model_file = CAFFE_ORIGINAL_FILE |
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.
Can we use network_file
instead of model_file
here? I try to be consistent in calling the .prototxt file a "network description" and not calling it a model unless it has weights attached to it.
The nomenclature I'd like to migrate to (but don't fully support yet) is:
- "network" for a .prototxt file
- "model" or "trained model" for a .prototxt and a corresponding .caffemodel file
- "training" for a group of models
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.
Oh nevermind. We do the same for Torch. Rats.
However, you will want to be more careful with the upgrade path here.
- Bump the pickle version
- In
__setstate__
, upgrade fromoriginal_file
tomodel_file
appropriately
0b094cb
to
89bbd5f
Compare
Thanks @lukeyeager ! I made the changes, and tried out the download feature across different model jobs created at different times to test changing from the network name from original_file to model_file . |
changed os.rename to shutil.move
89bbd5f
to
d365d17
Compare
This still isn't perfect, but it's working well for me and @IsaacYangSLA and we need it to build other functionality on top, so I'm going to merge it as-is. TODOs:
|
Thanks @Lucaszw! |
…aining Upload Pre-trained Models for Fine Tuning.
Expects original model definitions from #891