OSDN Git Service

numpy shape
authoryamat0jp <yamat0jp@yahoo.co.jp>
Mon, 25 Dec 2017 21:28:50 +0000 (06:28 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Mon, 25 Dec 2017 21:28:50 +0000 (06:28 +0900)
network.py

index 5eb27cf..f9c6dbe 100644 (file)
@@ -36,7 +36,7 @@ class  Comp():
             metrics=['accuracy'])
 
     def sente_stone(self,X_train,Y_train):
-        X,Y = np.array(X_train),np.array(Y_train)
+        X,Y = np.array([X_train]),np.array([Y_train]) 
         self.model1.fit(X,Y)
         hdf5_file = './sente-model.hdf5'
         self.model1.save_weights(hdf5_file)
@@ -44,7 +44,7 @@ class  Comp():
         return [res % 8, res // 8]
 
     def gote_stone(self,X_train,Y_train):
-        X,Y=np.array(X_train),np.array(Y_train)
+        X,Y=np.array([X_train]),np.array([Y_train])
         self.model2.fit(X,Y)
         hdf5_file ='./gote-model.hdf5'
         self.model2.save_weights(hdf5_file)