buriburisuri / sugartensor

A slim tensorflow wrapper that provides syntactic sugar for tensor variables. This library will be helpful for practical deep learning researchers not beginners.
MIT License
372 stars 63 forks source link

Python 3 compatibility #4

Open chanil1218 opened 7 years ago

chanil1218 commented 7 years ago

Sugartensor is not compatible with Python 3(in my case, Python 3.5.2). Is there way to use sugartensor with Python 3?

buriburisuri commented 7 years ago

I have the plan to add some features in Dec.

  1. Document
  2. Python 3 support.
  3. Docker support.

Sorry but you need python 2.7 interpreter now.

buriburisuri commented 7 years ago

@chanil1218

Now, we support python3 at sugartensor v0.0.2.1.

chanil1218 commented 7 years ago

That's nice. Thank you for your efforts! 2016년 12월 6일 (화) 오후 2:17, Namju Kim notifications@github.com님이 작성:

@chanil1218 https://github.com/chanil1218

Now, we support python3 at sugartensor v0.0.2.1.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/buriburisuri/sugartensor/issues/4#issuecomment-265063129, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWrZU72-moF24Fk9QUefCf5tIF725hDks5rFO_mgaJpZM4K9IpS .

nikparth commented 7 years ago

I still have compatability issues with python3. Installing sugartensor 0.0.2.3 with tensorflow 0.12 I get the following error:

Traceback (most recent call last):
  File "train.py", line 51, in <module>
    .sg_periodic_shuffle(factor=2))
  File "/home/vision/anaconda3.5/lib/python3.5/site-packages/sugartensor/sg_main.py", line 151, in wrapper
    out = func(tensor, tf.sg_opt(kwargs))
  File "/home/vision/anaconda3.5/lib/python3.5/site-packages/sugartensor/sg_transform.py", line 556, in sg_periodic_shuffle
    for i in range(channel_target):
TypeError: 'float' object cannot be interpreted as an integer

I assume this has to do with the division in python 3 returning floats.

LukasMosser commented 7 years ago

Yes, that's correct. @buriburisuri pointed this out in another issue. Should be fixed soon. Maybe add a Pr?

buriburisuri commented 7 years ago

@nikparth I've patched this at ver 0.0.2.4. Sorry for late reply.