LoginSignup
1
1

More than 5 years have passed since last update.

Tensorflow > TensorFlowを遊び倒す! 2-1. MNIST For Experts > コードの間違い

Last updated at Posted at 2016-10-09
動作環境
Ubuntu 14.04 LTS desktop amd64

http://blog.brainpad.co.jp/entry/2016/02/25/153000
に記載のコード。

    return tf.nn.max_pool(x,
                          ksize=[1, 2, 2, 1],
                          strides=[1, 2, 2, 1], # 真ん中2つが縦横のストライド
                          padding='SAME')

のコメント#の前に全角の空白があるので、そのまま実行するとエラーになる。

$ python sample02.py
File "sample02.py", line 36
strides=[1, 2, 2, 1], # 真ん中2つが縦横のストライド
^
SyntaxError: invalid syntax

全角の空白を半角空白に変えたらエラーがなくなった。

もし応用編の要望や間違いがあった場合は、弊社Twitterアカウントの@BrainPad_PRまでご連絡をお願いいたします。

twitterアカウントは取らない方針なので、連絡手段は不明。

1
1
1

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
1
1