简体   繁体   中英

OSError: SavedModel file does not exist

I saved a model as trained_model.h5 and loaded the model in different file was easily able to run it, it was working until today, it has started showing error

OSError: SavedModel file does not exist at: C:\Users\harsh\AppData\Local\Temp\tfhub_modules\602d30248ff7929470db09f7385fc895e9ceb4c0\{saved_model.pbtxt|saved_model.pb}

directory

I load the model using

model = tf.keras.models.load_model(('trained_model.h5'), custom_objects={'KerasLayer':hub.KerasLayer})

why is it showing error today and was working before?

I just deleted all the Temp files and it has started working fine again, I think it is some Windows flaw.

Instead of using .h5 extension use .pd .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM