Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NFNet' object has no attribute 'variant' #10

Open
sourabhyadav999 opened this issue May 17, 2021 · 6 comments
Open

'NFNet' object has no attribute 'variant' #10

sourabhyadav999 opened this issue May 17, 2021 · 6 comments

Comments

@sourabhyadav999
Copy link

sourabhyadav999 commented May 17, 2021

Hello Sir,

I am trying to use NFNET model, but I am encountering, the aforementioned error.
Code:

image

Error:

image

AttributeError: 'NFNet' object has no attribute 'variant'

I believe The problem is in : https://github.com/ypeleg/nfnets-keras/blob/master/nfnets_keras/nfnet.py
The above said line (line :: 89 block_params = self.variant_dict[self.variant]) should be after line 103(self.group_pattern = block_params.get('group_width', [128] * 4)). So the self.variant used in line 89 will be declared before it is used.

Thank you!

@joonjeon
Copy link

Hi!

As mentioned by @prateekkrjain in #1, this is an issue due to having parameter 'variant' used before assignment within the function definition. You can refer to the fixed rep here: https://github.com/prateekkrjain/nfnets-keras

@maximus3219
Copy link

Hi!

As mentioned by @prateekkrjain in #1, this is an issue due to having parameter 'variant' used before assignment within the function definition. You can refer to the fixed rep here: https://github.com/prateekkrjain/nfnets-keras

How exactly can I use the fixed rep?
I have already installed nfnets with "pip3 install nfnets-keras"

@joonjeon
Copy link

joonjeon commented Jun 7, 2021

Hi!
As mentioned by @prateekkrjain in #1, this is an issue due to having parameter 'variant' used before assignment within the function definition. You can refer to the fixed rep here: https://github.com/prateekkrjain/nfnets-keras

How exactly can I use the fixed rep?
I have already installed nfnets with "pip3 install nfnets-keras"

Well, if that's the case,
I recommend you remove the previously installed NFNets library by executing pip3 uninstall nfnets-keras
After that, you can manually download the fixed repo at https://github.com/prateekkrjain/nfnets-keras,
and install that repo for using NFNets.

@silencessss
Copy link

I have the some problem..

@pratt3000
Copy link

pratt3000 commented Jul 6, 2021

@joonjeon I tried your solution, it still gives the same error

@thusinh1969
Copy link

Buggy, untested release !

Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants