You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): N/A
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): from nightly-devel-gpu-py3 and nightly-gpu-py3 docker images
TensorFlow installed from (source or binary): from nightly-devel-gpu-py3 and nightly-gpu-py3 docker images
TensorFlow version (use command below): from nightly-devel-gpu-py3 and nightly-gpu-py3 docker images
Python version: from nightly-devel-gpu-py3 and nightly-gpu-py3 docker images
Bazel version (if compiling from source): from nightly-devel-gpu-py3 and nightly-gpu-py3 docker images
GCC/Compiler version (if compiling from source): from nightly-devel-gpu-py3 and nightly-gpu-py3 docker images
CUDA/cuDNN version: 9.0
GPU model and memory: tesla k80
Exact command to reproduce: N/A
Describe the problem
Running with nightly (both nightly-devel-gpu-py3 and nightly-gpu-py3) is not possible load weights on the keras model.
In the example belowe I have saved the weights, they are saved correctly in the file system and then I have tryed to load them, but I've got an error.
Source code / logs
Here the snippet:
import tensorflow as tf
from tensorflow import keras as ks
def main():
input_rgb = ks.layers.Input(shape=(1, 5, 5, 3), name="input_rgb")
x = ks.layers.Dense(1, activation='relu', name="Dense_1")(input_rgb)
x = ks.layers.Dense(1, activation='sigmoid', name="sigmoid")(x)
model = ks.models.Model(inputs=[input_rgb], outputs=[x])
model.compile(
loss={'sigmoid': 'binary_crossentropy'},
optimizer=tf.keras.optimizers.Adam())
model.save_weights('/tmp/test_weights.h5')
model.load_weights('/tmp/test_weights.h5', by_name=True)
if __name__ == "__main__":
main()
And here the output:
2018-05-15 09:56:21.404382: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open /tmp/test_weights.h5: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
The text was updated successfully, but these errors were encountered:
System information
Describe the problem
Running with nightly (both nightly-devel-gpu-py3 and nightly-gpu-py3) is not possible load weights on the keras model.
In the example belowe I have saved the weights, they are saved correctly in the file system and then I have tryed to load them, but I've got an error.
Source code / logs
Here the snippet:
And here the output:
The text was updated successfully, but these errors were encountered: