Skip to content

Commit 91c4e20

Browse files
andremoellerlaurenyu
authored andcommitted
fix code formatting for chainer readme (#214)
1 parent 5568568 commit 91c4e20

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sagemaker/chainer/README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ Saving models
237237
In order to save your trained Chainer model for deployment on SageMaker, your training script should save your model
238238
to a certain filesystem path called `model_dir`. This value is accessible through the environment variable
239239
``SM_MODEL_DIR``. The following code demonstrates how to save a trained Chainer model named ``model`` as
240-
``model.npz`` at the :
240+
``model.npz`` at the end of training:
241241

242242
.. code:: python
243-
import chainer
243+
244+
import chainer
244245
import argparse
245246
import os
246247
@@ -249,7 +250,7 @@ import chainer
249250
parser.add_argument('--model-dir', type=str, default=os.environ['SM_MODEL_DIR'])
250251
args, _ = parser.parse_known_args()
251252
252-
# ... train `model`, then save it to `model_dir`
253+
# ... train `model`, then save it to `model_dir` as file 'model.npz'
253254
chainer.serializers.save_npz(os.path.join(args.model_dir, 'model.npz'), model)
254255
255256
After your training job is complete, SageMaker will compress and upload the serialized model to S3, and your model data

0 commit comments

Comments
 (0)