casperkaae / parmesan

Variational and semi-supervised neural network toppings for Lasagne
Other
208 stars 31 forks source link

Python 3.5 compatibility #43

Open rfarouni opened 8 years ago

rfarouni commented 8 years ago

Hi,

Can I run parmesan using Python 3.5? Although I am able to run Lasagne, I get this error when I try to run the example

python examples/iw_vae.py -eq_samples 1 -iw_samples 1 -lr 0.001 -nhidden 500 -nlatent 100 -nonlin_dec very_leaky_rectify -nonlin_enc rectify -batch_size 250 -anneal_lr_epoch 2000
  File "examples/iw_vae.py", line 118
    print "Using real valued MNIST dataset to binomial sample dataset after every epoch "
                                                                                     ^
SyntaxError: Missing parentheses in call to 'print'

I realize that I need to add the parenthesis for the print function to make the code compatible with Python 3, but are there many other modifications that need to be made to the code to make it run ?

System configuration: Ubuntu 16.04, GeForce GTX 960, Cuda 8.1, CuDDN 5.1, Lasagne 0.2.dev1, Theano 0.8.2.

Thanks

casperkaae commented 8 years ago

Hi @rfarouni

The main branch is not python3 compatible. There is a @ferrine have done some work on converting it to python3 here https://github.com/ferrine/parmesan/tree/py2py3, but i'm not completely sure what the status is. Pull requests are more than welcome :)

ferrine commented 8 years ago

@rfarouni I had no free resources to run all examples, I was just waiting the moment when some work is done and then aborted the process. You can try out examples from my brunch, It would be great

rfarouni commented 8 years ago

Hi @casperkaae @ferrine

I have forked the main branch and made it Python 3.5 compatible. I tested some of the examples- but not all - on the following system configuration: Ubuntu 16.04, CUDA 8.0, CuDNN v5.1, Theano 0.8.2, Lasagne 0.2.