freeCodeCamp/curriculum/challenges/chinese/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-training-the-model.md
Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

54 lines
841 B
Markdown

---
id: 5e8f2f13c4cdbe86b5c72da2
challengeType: 11
videoId: hEUiK7j9UI8
dashedName: natural-language-processing-with-rnns-training-the-model
---
# --question--
## --text--
Fill in the blanks below to save your model's checkpoints in the `./checkpoints` directory and call the latest checkpoint for training:
```py
checkpoint_dir = __A__
checkpoint_prefix = os.path.join(checkpoint_dir, 'ckpt_{epoch}')
checkpoint_callback = tf.keras.callbacks.__B__(
filepath=checkpoint_prefix,
save_weights_only=True
)
history = model.fit(data, epochs=2, callbacks=[__C__])
```
## --answers--
A: `'./training_checkpoints'`
B: `ModelCheckpoint`
C: `checkpoint_prefix`
---
A: `'./checkpoints'`
B: `ModelCheckpoint`
C: `checkpoint_callback`
---
A: `'./checkpoints'`
B: `BaseLogger`
C: `checkpoint_callback`
## --video-solution--
2