Skip to content

wh-forker/pytorch-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It is a repo that contains scripts that makes using PyTorch on Windows easier.

Easy Installation

If you just want to install PyTorch as soon as possible. You'll need Anaconda with Python 3 first. And then type in the following commands.

# for Windows 10 / Server 2016
conda install -c peterjc123 pytorch

# for Windows 7,8,8.1 / Server 2008,2012
conda install -c peterjc123 pytorch-legacy

Compiling Examples

You can download it and put it in the PyTorch directory or use it in a standalone way.

# If you don't want to override the default settings
auto.bat

# If you don't want to compile with CUDA
cpu.bat

# If you want to compile with CUDA 8
cuda8.bat

# If you want to compile with CUDA 9
cuda9.bat

Using Examples

# The main difference in Python between Windows and Unix systems is multiprocessing
# So please refactor your code into the following structure if you use DataLoader
import torch
def main()
    for i, (x, y) in dataloader:
        # do something here

if __name__ == '__main__':
    main()

About

A few Windows specific scripts for PyTorch

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Batchfile 100.0%