diff --git a/tutorial.ipynb b/tutorial.ipynb index e830496..4751bf7 100644 --- a/tutorial.ipynb +++ b/tutorial.ipynb @@ -563,7 +563,7 @@ "clear_output()\n", "print('Setup complete. Using torch %s %s' % (torch.__version__, torch.cuda.get_device_properties(0) if torch.cuda.is_available() else 'CPU'))" ], - "execution_count": 1, + "execution_count": null, "outputs": [ { "output_type": "stream", @@ -689,7 +689,7 @@ "torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017val.zip', 'tmp.zip')\n", "!unzip -q tmp.zip -d ../ && rm tmp.zip" ], - "execution_count": 2, + "execution_count": null, "outputs": [ { "output_type": "display_data", @@ -729,7 +729,7 @@ "# Run YOLOv5x on COCO val2017\n", "!python test.py --weights yolov5x.pt --data coco.yaml --img 640" ], - "execution_count": 3, + "execution_count": null, "outputs": [ { "output_type": "stream", @@ -852,7 +852,7 @@ "torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip', 'tmp.zip')\n", "!unzip -q tmp.zip -d ../ && rm tmp.zip" ], - "execution_count": 4, + "execution_count": null, "outputs": [ { "output_type": "display_data", @@ -916,7 +916,7 @@ "# Train YOLOv5s on COCO128 for 3 epochs\n", "!python train.py --img 640 --batch 16 --epochs 3 --data coco128.yaml --weights yolov5s.pt --nosave --cache" ], - "execution_count": 5, + "execution_count": null, "outputs": [ { "output_type": "stream", @@ -1160,9 +1160,10 @@ "%%shell\n", "export PYTHONPATH=\"$PWD\" # to run *.py. files in subdirectories\n", "\n", + "rm -rf runs # remove runs/\n", "for m in yolov5s; do # models\n", " python train.py --weights $m.pt --epochs 3 --img 320 --device 0 # train pretrained\n", - " python train.py --cfg $m.yaml --epochs 3 --img 320 --device 0 # train scratch\n", + " python train.py --weights '' --cfg $m.yaml --epochs 3 --img 320 --device 0 # train scratch\n", " for d in 0 cpu; do # devices\n", " python detect.py --weights $m.pt --device $d # detect official\n", " python detect.py --weights runs/train/exp/weights/best.pt --device $d # detect custom\n",