keras 输出模型某一层featuremap

import keras
import numpy as np
from keras.models import Model
 
x_test = np.random.rand(1,128,128,3)
model=keras.models.load_model('maymodel.model')
layer_model = Model(inputs=model.input, outputs=model.layers[7].output)
feature=layer_model.predict(x_test)
print(feature)

参考输出每一层检查模型:

https://blog.csdn.net/qq_36501182/article/details/100170818

你可能感兴趣的:(keras 输出模型某一层featuremap)