ml-research / rational_activations

Rational Activation Functions - Replacing Padé Activation Units
MIT License
77 stars 17 forks source link

Readme says by default PyTorch==1.9.0 supported, but internally it requires PyTorch==1.7.1 #20

Open tatban opened 3 years ago

tatban commented 3 years ago

I have created an environment with python 3.9 and installed all the requirements ( numpy scipy matplotlib torch==1.9.0 tqdm termcolor) separately with cuda 11.1. But then when I am trying to only install rational activation function (pip3 install rational_activations) it starts installing PyTorch 1.7.1 and messing up with already prepared environment. So, please clarify the confusion. Whether it needs PyTorch 1.7.1 or 1.9.0? And fix it accordingly. PS: I was not building from source, I just wanted to install it from the binary which is supposed to support PyTorch 1.9.0 by default as per the readme. Architecture: Windows 10 64bit Environment: conda

k4ntz commented 3 years ago

Hi ! You can always clone and use python3 setup.py install to install it. The problem is that the compiled version that is on pypi has been compiled with a specific pytorch version, and that to avoid having heavy package (that couldn't be upload), we need this specific pytorch dependency.

I think the version from on pypi (installed with pip) has been compiled with 1.7.1. If you don't use the PyTorch version compiled with for this version, you'll get error (FileNotFoundError).

Would you like a 1.9.0 compatible version ?

I could create one, but the simplest is to use

tatban commented 3 years ago

Thanks for the quick response. I have no issues to use it with any stable version of PyTorch as long as it works there. But I was confused as the readme says it supports by default 1.9.0, so I prepared my environment accordingly. No issues, I will go with the other simpler approach that you mentioned just now in the comment.

tatban commented 3 years ago

I have just tried your approach, but does that need specific cpp backend / compiler for windows? As it is throwing tons of errors in cpp headers while compiling