python-3.x - 在 tensorflow 1.12 中读取 uint16 图像的奇怪问题
问题描述
我目前正在做一个光流项目,我遇到了一个奇怪的错误。
我的 TFrecords 中有 uint16 图像以字节形式存储。当我从本地机器读取 TFrecords 时,它给了我 uint16 值,但是当我部署相同的代码并从 docker 读取它时,即使我的 dtype 是 uint16,我也会得到 uint8 值。我的意思是 uint16 值正在减少到像 32768 --> 128 这样的 uint8。
是什么导致了这个错误?
我的本地机器有:Tensorflow 1.10.1 和 python 3.6 我的 Docker 映像有:Tensorflow 1.12.0 和 python 3.5
我正在研究 tensorflow 对象检测 API 在创建我使用的 TF 记录时:
with tf.gfile.GFile(flows, 'rb') as fid:
flow_images = fid.read()
在读回来时,我正在使用:tf.image.decoderaw
数据集:KITTI FLOW 2015
解决方案
推荐阅读
- python - 如何确定滤波器功能是否适用于半幅度或半功率截止
- android - 找不到 baseLibrary.jar (com.android.databinding:baseLibrary:3.1.2)
- vba - 在所有工作表上应用 VBA 代码
- reactjs - Draft-js 编辑器只显示原生表情符号
- c# - C# 项目中的第三方 DLL 引用
- javascript - 无法设置固定宽度和居中自定义滚动条
- tensorflow - 从 [., 3] 到 [., 2] 预测的神经网络
- google-tag-manager - 带有 FB Bot 的 Google 跟踪代码管理器中出现无效的 HTML、CSS 或 JavaScript 错误
- angular - 在安装 'sudo npm install -g @angular/cli' 时,它在 ubuntu 中出现错误
- ios - 在 IOS Storyboard 中单击时如何更改部分布局