Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 months ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
输入图像是3个通道,但灰度尺度有一个通道。
输出:
如果您需要在(H,W,1)尺寸中馈送图像到TensorFlow,则通过扩展尺寸在TF中更改您的尺寸:
此代码为数据的最后一个维度添加了一个通道:
Input images are 3 channels but gray scales have one channel.
output:
If you need to feed images in (H, W, 1) dimension to TensorFlow, so change your dimension by expanding dimension in TF:
This code adds a one channel to last dimension of data: