Matrix multiplication error during training TFT
See original GitHub issueEnvironment Details
- Python version: 3.7.10
- Operating System: Google Colab web platform
Error Description
I get a matrix multiplication error during training TFT
RuntimeError: mat1 and mat2 shapes cannot be multiplied (4608x2 and 1x32)
Steps to reproduce
- Open Colab https://colab.research.google.com/
- Run the code
!pip install pytorchts -q
!curl https://forecasters.org/data/m3comp/M3C.xls --create-dirs -o /root/.mxnet/gluon-ts/datasets/M3C.xls
from gluonts.dataset.repository.datasets import get_dataset
from pts.model.tft import TemporalFusionTransformerEstimator
from pts import Trainer
dataset = get_dataset("m3_monthly", regenerate=False)
estimator = TemporalFusionTransformerEstimator(
freq=dataset.metadata.freq,
prediction_length=dataset.metadata.prediction_length,
context_length=dataset.metadata.prediction_length,
dropout_rate=0.1,
num_outputs=15,
trainer=Trainer(device='cpu',
epochs=20,
learning_rate=1e-3,
num_batches_per_epoch=100,
batch_size=128))
predictor = estimator.train(dataset.train)
Issue Analytics
- State:
- Created 2 years ago
- Comments:13
Top Results From Across the Web
Pytorch GAN model doesn't train: matrix multiplication error
I'm trying to build a basic GAN to familiarise myself with Pytorch. I have some (limited) experience with Keras, but since I'm bound...
Read more >The 3 Most Common PyTorch Errors (And How To Solve Them)
Let's try matrix multiplication. Oh no! This is a shape error, as our two tensors (matrices) can't be matrix multiplied because their shapes ......
Read more >Overflow in matrix multiplication - SAS Support Communities
Solved: Hi, I have some code that tries to minimize a function. The code is below: start odr_yrly (matrix, year); yr_odr = j(nrow(matrix), ......
Read more >Incorrect dimensions for matrix multiplication. - MathWorks
Error using *. Incorrect dimensions for matrix multiplication. Check that the number. of columns in the first matrix matches the number of rows...
Read more >Straggler Mitigation through Unequal Error Protection for ...
As a remedy to this problem, we employ Unequal Error Protection (UEP) codes to obtain an approximation of the matrix product in the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nsoma97 @vpozdnyakov sorry i didnt get time to look into it… I will try to squeeze it in this week… the issue most probably is that I have some value hard-coded from the dataset I was testing with…
it works, thank you