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

AttributeError: 'InformerModel' object has no attribute '_use_revin' #493

Open
kachadx opened this issue May 9, 2024 · 0 comments
Open
Assignees

Comments

@kachadx
Copy link

kachadx commented May 9, 2024

使用from paddlets.models.model_loader import load
load()方法加载InformerModel报错
AttributeError: 'InformerModel' object has no attribute '_use_revin',为什么只有加载模型的时候用RevinWrapper,训练的时候好像没用到
def revin_norm(func):
@functools.wraps(func)
def wrapper(obj: BaseModel, *args, **kwargs):
"""
The core logic. The base modelout is been wrappered by the RevinWrapper.
"""
model = func(obj, *args, **kwargs)
if obj._use_revin:
logger.warning(
"Using reversible instance normalization (revin) to remove and restore the statistical information of a time-series instance"
)
model = RevinWrapper(model, obj._fit_params['target_dim'], **
obj._revin_params)
return model

return wrapper
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

2 participants