lua51 headers should be installed, ie something like sudo apt-get install lua5.1 liblua5.1-dev
Run:
pip install -r requirements.txt
To be able to run tests, also do:
pip install -r test/requirements.txt
Procedure
Run:
git clone https://github.com/hughperkins/pytorch.git
cd pytorch
source ~/torch/install/bin/torch-activate
./build.sh
Unit-tests
Run:
source ~/torch/install/bin/torch-activate
cd pytorch
./run_tests.sh
Python 2 vs Python 3?
pytorch is developed and maintained on python 3
you should be able to use it with python 2, but there might be the occasional oversight. Please log an issue
for any python 2 incompatibilities you notice
Addons, for using cuda tensors and opencl tensors directly from python (no need for this to train networks. could be useful if you want to manipulate cuda tensor
directly from python)
Please note that currently, right now, I'm focused 100.000% on cuda-on-cl, so please be patient during this period
Recent news
12 September:
Yannick Hold-Geoffroy added conversion of lists and tuples to Lua tables
8 September:
added PyTorchAug.save(filename, object) and PyTorchAug.load(filename), to save/load Torch .t7 files
26 August:
if not deploying to a virtual environment, will install with --user, into home directory
14 April:
stack trace should be a bit more useful now :-)
17 March:
ctrl-c works now (tested on linux)
16 March:
uses luajit on linux now (mac os x continues to use lua)
6 March:
all classes should be usable from nn now, without needing to explicitly register inside pytorch
you need to upgrade to v3.0.0 to enable this, which is a breaking change, since the nn classes are now in PyTorchAug.nn, instead of directly
in PyTorchAug
5 March:
added PyTorchHelpers.load_lua_class(lua_filename, lua_classname) to easily import a lua class from a lua file
can pass parameters to lua class constructors, from python
can pass tables to lua functions, from python (pass in as python dictionaries, become lua tables)
can return tables from lua functions, to python (returned as python dictionaries)
2 March:
removed requirements on Cython, Jinja2 for installation
请发表评论