Skip to content

Commit fe47419

Browse files
author
Dhvani Patel
committed
Update keras
1 parent 9c6d0c4 commit fe47419

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

keras_model.py

+21
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def getOutputTen(allTrainData):
386386
#print b.shape
387387
#print a
388388
#yield a
389+
#print a.shape
389390
batchArr.append(a)
390391
batchInd += 1
391392
#toPass = np.concatenate((numpy.array(toPassOne).astype(int), numpy.array(toPassTwo).astype(int), numpy.array(toPassThree).astype(int)), axis=0)
@@ -1113,6 +1114,26 @@ def initData():
11131114
verbose=1
11141115
)
11151116

1117+
istory = model.fit(
1118+
x=izip(getInputTen(allTrainData), getOutputTen(allTrainData)),
1119+
#steps_per_epoch=42630, #Before: 42 630
1120+
y=izip(getInputValTen(allValData), getOutputValTen(allValData)),
1121+
#validation_steps=53300, #Before: 53 300
1122+
epochs=3000, # Any large number cuz early stopping
1123+
callbacks=[
1124+
ModelCheckpoint(
1125+
str(weight_path_pattern),
1126+
save_best_only=False,
1127+
save_weights_only=False,
1128+
mode='auto'
1129+
),
1130+
CSVLogger(str(log_path), append=True),
1131+
EarlyStopping(patience=3, mode='auto')
1132+
],
1133+
batch_size=66,
1134+
verbose=1
1135+
)
1136+
11161137
'''
11171138
callbacks=[
11181139
ModelCheckpoint(

0 commit comments

Comments
 (0)