Description
- Adding model(ModernTCN, Mamba) request
- Question about the adding method
- review comment
Use case
- I would like to ask to add model ModernTCN(IRIC 2024), and Mamba.
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.'
- 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:
def forward(self, windows_batch): # <<--- Receives windows_batch dictionary
# Parse windows_batch
insample_y = windows_batch['insample_y'].clone()
# MLP
y_pred = self.mlp(insample_y)
# Reshape and map to loss domain
y_pred = y_pred.reshape(batch_size, self.h, self.loss.outputsize_multiplier)
y_pred = self.loss.domain_map(y_pred)
return y_pred
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.
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.