DirectML/PyTorch
inisis ceb702c3e2
fix typo (#325)
* fix typo
* change master -> main
2022-11-16 15:44:05 -08:00
..
classification Add pytorch yolov3 sample (#183) 2021-12-29 09:34:33 -08:00
data Add object detection sample (#228) 2022-04-25 16:25:44 -07:00
objectDetection Add object detection sample (#228) 2022-04-25 16:25:44 -07:00
resnet50 fix typo (#325) 2022-11-16 15:44:05 -08:00
squeezenet Add object detection sample (#228) 2022-04-25 16:25:44 -07:00
torchvision_classification Add object detection sample (#228) 2022-04-25 16:25:44 -07:00
yolov3 Add pytorch yolov3 sample (#183) 2021-12-29 09:34:33 -08:00
.gitignore Add object detection sample (#228) 2022-04-25 16:25:44 -07:00
README.md Add object detection sample (#228) 2022-04-25 16:25:44 -07:00

README.md

PyTorch with DirectML Samples

For detailed instructions on getting started with PyTorch with DirectML, see GPU accelerated ML training.

Setup

Follow the steps below to get set up with PyTorch on DirectML.

  1. Download and install Python 3.8.

  2. Clone this repo.

  3. Install prerequisites

    pip install torchvision==0.9.0
    pip uninstall torch
    pip install pytorch-directml

Note: The torchvision package automatically installs the torch==1.8.0 dependency, but this is not needed and will cause collisions with the pytorch-directml package. We must uninstall the torch package after installing requirements.

  1. (optional) Run pip list. The following packages should be installed:
pytorch-directml        1.8.0a0.dev211019
torchvision             0.9.0

Samples

The following sample models are included in this repo to help you get started. The sample includes both inference and training scripts, and you can either train the models from scratch or use the supplied pre-trained weights.