Closed jackietung1219 closed 4 years ago
I don't get how you are getting model loading problems. I am able to load and save the model without issue in the example
Hi, I saved trained model in HDF5 format. This problem happened when I used "tf.keras.models.load.model" to load trained model. Also, I needed to define a custom object for "tf.keras.models.load.model".
I'm really sorry if I misunderstood something.
[image: image.png]
Somshubra Majumdar notifications@github.com 於 2020年7月13日 週一 下午11:36寫道:
I don't get how you are getting model loading problems. I am able to load and save the model without issue in the example
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://mailtrack.io/trace/link/cf729449b8b0a0f563089dc067ea70d9a6383a2c?url=https%3A%2F%2Fgithub.com%2Ftitu1994%2Ftf_SIREN%2Fpull%2F8%23issuecomment-657632085&userId=4238406&signature=b4128b19a35892ab, or unsubscribe https://mailtrack.io/trace/link/7d8f7f9db8951b68c1fbb89926c922d8e88837e3?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKNXE3Y43YHNL3DO6KA2MWDR3MSWTANCNFSM4OYNOZZA&userId=4238406&signature=4ef0e6225cf931a8 .
The recommended way to save models in TF is using Saved Models, not HDFS.
Great! It solved all my problems, thanks a lot.
Glad I could help.
Sorry to bother again, there were some error occur (TypeError: init() got an unexpected keyword argument 'scale') when I loaded the model based on tf_siren. Now tf_siren can work without error on my machine after modified.