2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tensorflow0.12でcifar10を動かす時のエラー

Posted at

https://github.com/tensorflow/models/tree/master/tutorials/image/cifar10
ここのcifar10のコード動かす時にtensorflow0.12ではエラーをはいたので対処した。

TypeError: strided_slice() missing 1 required positional argument: 'strides'
cifar10_input.pyのstrided_slice()の引数が足りないので付け足してあげる。

cifar10_input.py
tf.strided_slice(record_bytes, [0], [label_bytes]), tf.int32)

cifar10_input.py
tf.strided_slice(record_bytes, [0], [label_bytes], [1]), tf.int32)

に変更

cifar10_input.py
tf.strided_slice(record_bytes, [label_bytes],
                       [label_bytes + image_bytes]),
                       [result.depth, result.height, result.width])

cifar10_input.py
tf.strided_slice(record_bytes, [0], [label_bytes], [1]), tf.int32)

に変更

contrib.deprecatedなんとかが軒並みエラーを吐いているので
全てcontrib.deprecatedを消してあげる
例えば
tf.contrib.deprecated.histogram_summary~

tf.histogram_summaryなど

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?