muellerzr / fastinference

A collection of inference modules for fastai2
https://muellerzr.github.io/fastinference
Apache License 2.0
89 stars 16 forks source link

ModuleAttributeError: 'SequentialRNN' object has no attribute 'intrinsic_attention' #40

Closed randywreed closed 3 years ago

randywreed commented 3 years ago

I'm running a classifer using AWD_LSTM on fastai2 in Colab. Fastinference is ver .38 installed off of github with pip. The code: learn_class.predict(test) ('FALSE', tensor(0), tensor([0.9983, 0.0017])) learn_class.intrinsic_attention(test) ModuleAttributeError Traceback (most recent call last)

in () ----> 1 learn_class.intrinsic_attention(test) 1 frames /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __getattr__(self, name) 777 return modules[name] 778 raise ModuleAttributeError("'{}' object has no attribute '{}'".format( --> 779 type(self).__name__, name)) 780 781 def __setattr__(self, name: str, value: Union[Tensor, 'Module']) -> None: ModuleAttributeError: 'SequentialRNN' object has no attribute 'intrinsic_attention'
muellerzr commented 3 years ago

I need a full reproducer ideally. Did you import the fastinference library?

from fastinference.inference import *

randywreed commented 3 years ago

Maybe not, I musted have deleted the import. However when I do import it I get it a different error. I'll close this error and open a new one.