Open tomassams opened 4 years ago
also having this issue after going through the previous imsave and image_dim_ordering
if anyone knows a fix please share
i think i fixed it
in util.py, replace the get_input_config
function with this one:
`def get_input_config(model): ''' returns a tuple (inputDimensions, numChannels) '''
return (
model.get_config(0),
model.get_config(0)
) if K.image_data_format() == 'th' else (
#tf ordering
model.get_layer(index=0).get_config(),
model.get_layer(index=0).get_config()
)`
probably needs more debuggin, but it doesn't throw an exception and it opens the localhost server
the correct fix seems to be as follows:
def get_input_config(model):
return (
model.get_layer(index=0).get_config()["batch_input_shape"][0:3],
model.get_layer(index=0).get_config()["batch_input_shape"][3]
) if K.image_data_format() == 'th' else (
#tf ordering
model.get_layer(index=0).get_config()["batch_input_shape"][0:3],
model.get_layer(index=0).get_config()["batch_input_shape"][3]
)
model = load_model('my_model.h5') model(tf.keras.Input((28, 28, 1))) #必须有输入才能得到输出
just like this you can run
I'm trying to install and run quiver to visualize a Keras model I've trained.
Running Windows 10 and Anaconda.
I installed quiver with git on a fresh conda environment
When I tried to launch, I got the imsave error from #78
After fixing that, I got the following error:
After fixing that (replacing image_dim_ordering as noted in this issue in util.py) I'm getting the following:
Here's my launch code:
Is there a specific Tensorflow/Keras version I need to use or what am I doing wrong?