質問編集履歴

1

前提の追記、コードの修正

2018/02/11 15:52

投稿

chain
chain

スコア11

test CHANGED
File without changes
test CHANGED
@@ -9,6 +9,10 @@
9
9
  でも実際は[100,]も[100,1]も100x1の行列なのですが・・・
10
10
 
11
11
  どうすればよいでしょうか。
12
+
13
+
14
+
15
+ MNISTチュートリアルを行いたいわけではないのですが、今後出力を1次元にするプログラムを考えていて、MNISTで試したらエラーが出たということです。
12
16
 
13
17
 
14
18
 
@@ -76,11 +80,11 @@
76
80
 
77
81
  for i in range(1000):
78
82
 
79
- batch_xs,batch_ys=mnist.train.next_batch(100)
83
+ batch_xs,batch_ys=mnist.train.next_batch(100)
80
84
 
81
- batch_ys=batch_ys[:,0]
85
+ batch_ys=batch_ys[:,0]
82
86
 
83
- sess.run(train_step,feed_dict={x:batch_xs,y_:batch_ys})
87
+ sess.run(train_step,feed_dict={x:batch_xs,y_:batch_ys})
84
88
 
85
89
  ```
86
90