【发布时间】:2021-06-19 01:35:04
【问题描述】:
我已经准备了一个用于图像着色的 CNN 模型:
"""Encoder - Input grayscale image (L)"""
model = Sequential()
model.add(Conv2D(32, (3, 3), activation='relu', padding='same', input_shape=(256, 256, 1)))
...
"""Latent space"""
model.add(Conv2D(512, (3,3), activation='relu', padding='same'))
"""Decoder - output (A,B)"""
...
model.add(Conv2D(2, (3, 3), activation='tanh', padding='same'))
现在我想使用 ResNet 作为特征提取器并将输出合并到潜在空间。
我已经将 ResNet 模型导入为:
resnet50_imagnet_model = tf.keras.applications.resnet.ResNet50(weights = "imagenet",
include_top=False,
input_shape = (256, 256, 3),
pooling='max')
【问题讨论】:
标签: tensorflow keras resnet