【发布时间】:2018-09-23 09:17:39
【问题描述】:
我已经训练了一个网络来检测 14x14 像素灰度图像中的“气泡”。我用包含气泡的图像和不包含气泡的图像训练了网络。网络运行良好。
现在,我有一个带有很多气泡的大图像(我从这个大图像生成了训练数据)1。
我希望网络使用 14x14 内核扫描大图像以检测气泡的位置。我该怎么做?
下面是我的网络:
model = keras.Sequential([
keras.layers.Flatten(input_shape=(14, 14)),
keras.layers.Dense(128, activation=tf.nn.relu),
keras.layers.Dense(64, activation=tf.nn.relu),
keras.layers.Dense(32, activation=tf.nn.relu),
keras.layers.Dense(16, activation=tf.nn.relu),
keras.layers.Dense(8, activation=tf.nn.relu),
keras.layers.Dense(2, activation=tf.nn.softmax)
])
model.compile(optimizer=tf.train.AdamOptimizer(),
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
【问题讨论】:
标签: image tensorflow keras