I have the following model fit using python:
history_1 = model.fit(x_train, y_train, batch_size=32, epochs=10, verbose=True, validation_split=.1)
loss_1, accuracy_1 = model.evaluate(x_test, y_test, verbose=False)
and then the next line of code is
history_2 = model.fit(x_train, y_train, batch_size=60, epochs=10, verbose=True, validation_split=.1)
loss_2, accuracy_2 = model.evaluate(x_test, y_test, verbose=False)
I would rather want to put this in a function, specifying different parameters and indicate a num = 1 or 2 and then that gets added to the output/object names
e.g.
def XXX(s = , e = , num = )
where s will be the batch size, e will be the epochs and num gets placed next to history_num, loss_num and accuracy_num
I come from a SAS background where we would have specified it as history_%eval(&num)
EDIT: if you trying to do like I did, then the following definitely worth a read http://stupidpythonideas.blogspot.com/2013/05/why-you-dont-want-to-dynamically-create.html