Fix spelling in neural_network/convolution_neural_network.py (#849)

* Fix spelling in neural_network/convolution_neural_network.py

* fix import

Signed-off-by: cedric.farinazzo <cedric.farinazzo@epita.fr>
This commit is contained in:
cedricfarinazzo 2019-05-30 02:47:00 +02:00 committed by John Law
parent fc95e7a91a
commit 9037abae11

View File

@ -17,6 +17,7 @@
'''
from __future__ import print_function
import pickle
import numpy as np
import matplotlib.pyplot as plt
@ -50,7 +51,6 @@ class CNN():
def save_model(self, save_path):
#save model dict with pickle
import pickle
model_dic = {'num_bp1':self.num_bp1,
'num_bp2':self.num_bp2,
'num_bp3':self.num_bp3,
@ -73,7 +73,6 @@ class CNN():
@classmethod
def ReadModel(cls, model_path):
#read saved model
import pickle
with open(model_path, 'rb') as f:
model_dic = pickle.load(f)
@ -190,7 +189,7 @@ class CNN():
pd_all.append(pd_conv2)
return pd_all
def trian(self,patterns,datas_train, datas_teach, n_repeat, error_accuracy,draw_e = bool):
def train(self, patterns, datas_train, datas_teach, n_repeat, error_accuracy, draw_e = bool):
#model traning
print('----------------------Start Training-------------------------')
print((' - - Shape: Train_Data ',np.shape(datas_train)))