suppose this is my neural network training and i made a loop for choose number of neuron in each hidden layer. how can I save each result for every loop and print all the result for all loop in the end of (i) loop:
import tensorflow as tf
import numpy as np
from tensorflow import keras
for i in range(1,9):
model=tf.keras.Sequential([keras.layers.Dense(units =i, input_shape=[1]),
(keras.layers.Dense(units =i, input_shape=[1)])
model.compile(optimizer='sgd',loss='mean_squared_error')
xs=np.array([2,3,4], dtype=float)
ys=np.array([100,200,300],dtype=float)
model.fit(xs,ys,epochs=4000)
result= (model.predict([1]))
print(result)