Keras model.summary() object to string
问题 I want to write a *.txt file with the neural network hyperparameters and the model architecture. Is it possible to write the object model.summary() to my output file? (...) summary = str(model.summary()) (...) out = open(filename + 'report.txt','w') out.write(summary) out.close It happens that I'm getting "None" as you can see below. Hyperparameters ========================= learning_rate: 0.01 momentum: 0.8 decay: 0.0 batch size: 128 no. epochs: 3 dropout: 0.5 ------------------------- None