martinsbruveris / tensorflow-image-models

TensorFlow port of PyTorch Image Models (timm) - image models with pretrained weights.
https://tfimm.readthedocs.io/en/latest/
Apache License 2.0
286 stars 25 forks source link

support tensorflow version 2.0-2.4 #55

Closed llpin1992 closed 2 years ago

llpin1992 commented 2 years ago

when i install tfimm, it need tensorflow version <3.0,>=2.5 , please support tf version 2.0-2.4

martinsbruveris commented 2 years ago

It could be that I am more restrictive with the TF version than I have to be. At the same time several of the models are using grouped convolutions and those were only introduced fairly recently in TF. I will see what happens if I run the unit tests with TF 2.4 or lower.

llpin1992 commented 2 years ago

ok, thanks, expect your results!

martinsbruveris commented 2 years ago

Unfortunately, there are a bunch of things that go wrong when I try TF 2.4.

In short, I won't be able to support TF <2.5 for tfimm officially. It should be possible to build a custom version of tfimm by changing the version requirements in pyproject.toml, and finding the right version of numpy. Then poetry build will generate a wheel that can be installed with earlier versions of TF. Models that don't use grouped convolutions will probably work. But I can't make any guarantees.