TensorFlow: Difference between revisions

Line 68: Line 68:
You can write your own training loop by doing the following:
You can write your own training loop by doing the following:
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
import tensorflow as tf
from tensorflow import keras


my_model= keras.Sequential([
my_model = keras.Sequential([
     keras.layers.Dense(400, input_shape=400, activation='relu'),
     keras.layers.Dense(400, input_shape=400, activation='relu'),
     keras.layers.Dense(400, activation='relu'),
     keras.layers.Dense(400, activation='relu'),