NVIDIA / DIGITS

Deep Learning GPU Training System
https://developer.nvidia.com/digits
BSD 3-Clause "New" or "Revised" License
4.12k stars 1.38k forks source link

Enable loading TF models serialized with SavedModel format #1775

Open edgimar opened 7 years ago

edgimar commented 7 years ago

There should be a way to load a TensorFlow model that has been serialized as a SavedModel and use it as a model within DIGITS (for both training and inference).

Ideally, an interface might at least have the following options:

I'm probably missing details of what else would be required, but this would be a good start.

If I could accomplish this by modifying the model.py file, I would, but it is difficult if not impossible to replace the input placeholder nodes in a loaded SavedModel graph with the x and y attributes that DIGITS defines in the Tower class). If there were a way for Tower to have methods like get_x_placeholder(), then these could be overridden in subclasses, allowing them to determine which TF tensor to use as the placeholder.

ethantang95 commented 7 years ago

It should be possible if you redefine it as a model property. Currently when you write tensorflow models for DIGITS, the inference and loss function both acts as properties. If possible, you can then redefine X and Y to be model properties and have that function in the background

edgimar commented 7 years ago

@ethantang95 Do you mean by this that it's currently possible (if so, can you provide a minimal example that demonstrates how), or do you mean that it would be a way forward if such a capability were to be implemented?