nfnets-keras
nfnets-keras copied to clipboard
'NFNet' object has no attribute 'variant'
Hello Sir,
I am trying to use NFNET model, but I am encountering, the aforementioned error. Code:
Error:
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!
Hi!
As mentioned by @prateekkrjain in https://github.com/ypeleg/nfnets-keras/issues/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
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"
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.
I have the some problem..
@joonjeon I tried your solution, it still gives the same error
Buggy, untested release !
Steve