szymonmaszke / torchlayers

Shape and dimension inference (Keras-like) for PyTorch layers and neural networks
MIT License
568 stars 46 forks source link

Support for Python 3.6 #4

Closed goingtosleep closed 4 years ago

goingtosleep commented 4 years ago

torchlayers is currently not usable on Python 3.6, specifically Python 3.6.9 on Google Colab. Installing from github repo gave me this:

ERROR: Package 'torchlayers' requires a different Python: 3.6.9 not in '>=3.7

Using pip install torchlayers, I got torchlayers 0.1.0 but there are no Conv or Dense or even ReLU in torchlayers imported module.

Btw, thank you for the brilliant library.

szymonmaszke commented 4 years ago

@goingtosleep Unfortunately that is not possible as torchlayers relies on PEP 562 (module-wide __getattr__ which is essential for this project, see torchlayers.__init__).

This feature is available on versions higher than 3.7 and I don't see a clear workaround for Python 3.6 although I'm open for eventual pull requests resolving this issue.

Closing for now, will update if anything changes (or if colab finally supports Python 3.7).