You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried to add ModernTCN in my local environment but I found that the document 'Adding models To NeuralForecast' is quite outdated and limited. Nonetheless, I tried to refer existed ipynb files in 'nbs.' According to the document, forward function must be added like this below:
The problem is that MordernTCN class has already this function, and I think most model would be like that.
def forward(self, x, te=None):
# instance norm
if self.revin:
x = x.permute(0, 2, 1)
x = self.revin_layer(x, 'norm')
x = x.permute(0, 2, 1)
x = self.forward_feature(x,te)
x = self.head(x)
# de-instance norm
if self.revin:
x = x.permute(0, 2, 1)
x = self.revin_layer(x, 'denorm')
x = x.permute(0, 2, 1)
return x
I wonder how to fix the function in this case? and when I look at the TimeLLM and TimeMixer ipynb files, their foward functions in the model name class were different from the guide document.
The inverse transformation for mixture of sliding window, scaling and complicated dimensions is quite difficult than I thought when I tried to do it alone only to fail and waste time. One of the reasons that I prefer to use this library is that it provides inverse transformation of the outputs while time-series library does not.
The text was updated successfully, but these errors were encountered:
Hello! Didn't look into it in much detail (I will get more time soon), but basically, your forward function should take self and windows_batch and then the x in the forward function is windows_batch['insample_y']. Maybe this can help you get unstuck.
Otherwise, thanks for raising this issue! You're right we should:
Update the documentation on adding a model
Include Mamba (I think it's a good addition to the library)
Read the paper on ModernTCN and see if it's worth including
Description
Use case
Modern TCN Github repo
This model uses CNN but the architecture is Transformer.
Simple Mamba for Time Series forecasting
Mamba for Time Series forecasting
Mamba was released as a 'Transformer substitute.'
The problem is that MordernTCN class has already this function, and I think most model would be like that.
I wonder how to fix the function in this case? and when I look at the TimeLLM and TimeMixer ipynb files, their foward functions in the model name class were different from the guide document.
The text was updated successfully, but these errors were encountered: