Skip to content

Commit fd8fd30

Browse files
committed
Minor fixes to comments and logging
1 parent ceeee2b commit fd8fd30

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sagemaker_neo_compilation_jobs/gluoncv_yolo_darknet/gluoncv_yolo_darknet_neo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"\n",
2828
"This is an end-to-end example of GluonCV YoloV3 model training inside of Amazon SageMaker notebook and then compile the trained model using Neo runtime. In this demo, we will demonstrate how to train and to host a darknet53 model on the [Pascal VOC dataset](http://host.robots.ox.ac.uk/pascal/VOC/) using the YoloV3 algorithm. We will also demonstrate how to optimize this trained model using Neo.\n",
2929
"\n",
30-
"***This is notebook is for demostration purpose only. Please fine tune the training parameters based on your own dataset.***"
30+
"***This notebook is for demonstration purpose only. Please fine tune the training parameters based on your own dataset.***"
3131
]
3232
},
3333
{

sagemaker_neo_compilation_jobs/gluoncv_yolo_darknet/train_yolo.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,9 @@ def model_fn(model_dir):
434434
"""
435435
logging.info('Invoking user-defined model_fn')
436436

437-
import neomxnet
437+
import neomxnet # noqa: F401
438438

439-
#check if GPUs area available
439+
#select GPU context
440440
ctx = mx.gpu()
441441

442442
net = gluon.SymbolBlock.imports(
@@ -457,6 +457,8 @@ def transform_fn(net, data, content_type, output_content_type):
457457
"""
458458
Transform incoming requests.
459459
"""
460+
logging.info('Invoking user-defined transform_fn')
461+
460462
import gluoncv as gcv
461463

462464
#decode json string into numpy array
@@ -465,7 +467,7 @@ def transform_fn(net, data, content_type, output_content_type):
465467
#preprocess image
466468
x, image = gcv.data.transforms.presets.yolo.transform_test(mx.nd.array(data), 320)
467469

468-
#check if GPUs area available
470+
#select GPU context
469471
ctx = mx.gpu()
470472

471473
#load image onto right context

0 commit comments

Comments
 (0)