Spaces:
Runtime error
Runtime error
File size: 369 Bytes
d6d554d 2476c9f d6d554d 2476c9f |
1 2 3 4 5 6 7 8 9 10 11 |
import tensorflow as tf
# Assume you have a trained model already (replace with your own model code)
model = tf.keras.Sequential([
tf.keras.layers.Dense(128, activation='relu', input_shape=(784,)),
tf.keras.layers.Dense(10, activation='softmax')
])
# Save the model to a file
model.save('my_model.h5') # Save in HDF5 format
print("Model saved successfully!") |