The code you provided is correct and should work fine. The error message you are seeing suggests that the object you are trying to call the summary() method on is not a TensorFlow model object. Please make sure that the 'model.h5' file you are loading is a valid TensorFlow model saved using model.save('model.h5') and that it hasn't been modified or corrupted in any way.

from tensorflowkerasmodels import load_model model = load_modelmodelh5compile = Falsemodelsummary_UserObject object has no attribute summary

原文地址: http://www.cveoy.top/t/topic/h1jI 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录