Tensorflow.strided_slice 缺少参数“步幅"? [英] Tensorflow.strided_slice missing argument 'strides'?
问题描述
我正在尝试根据教程运行 cifar10_train.py
,但我得到了
I am trying to run cifar10_train.py
according to tutorials, but I got
"cifar10_input.py", line 87, in read_cifar10
tf.strided_slice(record_bytes, [0], [label_bytes]), tf.int32)
TypeError: strided_slice() missing 1 required positional argument: 'strides'
文档说strides
是可选的,之前在Ubuntu上也能正常工作.
The document says that strides
is optional, and it did work properly on Ubuntu before.
我的 tensorflow 版本是 0.12.0rc1-cp35-cp35m-win_amd64.我已经安装了最新版本.
My tensorflow version is 0.12.0rc1-cp35-cp35m-win_amd64. I have already installed the newest release.
我可以通过这个论点吗?我不知道它...
May I have to pass this argument? I have no idea about it...
更新:我用 slice 替换了 strided_slice,它有效.根据问题#754,strides
在 1.0 版本中将是可选的.(也许?)
UPDATE: I replaced strided_slice with slice, and it works. According to issue#754, strides
will be optional at 1.0 release. (maybe?)
推荐答案
替换一行
tf.strided_slice(record_bytes, [0], [label_bytes]), tf.int32)
到线:
tf.strided_slice(record_bytes, [0], [label_bytes], [1]), tf.int32)
和下一个运算符中的一行
and a line in the next operator
[label_bytes + image_bytes]),
到线
[label_bytes + image_bytes], [1]),
它对我有用.
这篇关于Tensorflow.strided_slice 缺少参数“步幅"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!