TensorFlow: Difference between revisions
Line 10: | Line 10: | ||
While you can train using <code>model.compile</code> and <code>model.fit</code>, using your own custom training loop is much more flexable and easier to understand. | While you can train using <code>model.compile</code> and <code>model.fit</code>, using your own custom training loop is much more flexable and easier to understand. | ||
You can write your own training loop by doing the following: | You can write your own training loop by doing the following: | ||
<syntaxhighlight | <syntaxhighlight lang="python"> | ||
my_model= keras.Sequential([ | my_model= keras.Sequential([ |