File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ def get_model_instance_segmentation(num_classes):
356
356
os .system ("wget https://raw.githubusercontent.com/pytorch/vision/main/references/detection/coco_eval.py" )
357
357
os .system ("wget https://raw.githubusercontent.com/pytorch/vision/main/references/detection/transforms.py" )
358
358
359
+ ######################################################################
359
360
# Since v0.15.0 torchvision provides `new Transforms API <https://pytorch.org/vision/stable/transforms.html>`_
360
361
# to easily write data augmentation pipelines for Object Detection and Segmentation tasks.
361
362
#
@@ -373,7 +374,7 @@ def get_transform(train):
373
374
transforms .append (T .ToPureTensor ())
374
375
return T .Compose (transforms )
375
376
376
-
377
+ ######################################################################
377
378
# Testing ``forward()`` method (Optional)
378
379
# ---------------------------------------
379
380
#
@@ -466,8 +467,8 @@ def get_transform(train):
466
467
gamma = 0.1
467
468
)
468
469
469
- # let's train it for 5 epochs
470
- num_epochs = 5
470
+ # let's train it just for 2 epochs
471
+ num_epochs = 2
471
472
472
473
for epoch in range (num_epochs ):
473
474
# train for one epoch, printing every 10 iterations
You can’t perform that action at this time.
0 commit comments