TCN model code error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48.7k
- Forks
- 7.7k
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Description
qlib/contrib/model/pytorch_tcn_ts.py
line 171-line174
feature = data[:, :, 0:-1].to(self.device)
label = data[:, -1, -1].to(self.device)
pred = self.TCN_model(feature.float())
To Reproduce
Steps to reproduce the behavior:
- change seq len as 10, and run \examples\benchmarks\TCN\workflow_config_tcn_Alpha158.yaml
Expected Behavior
Screenshot

x as input with shape(batch,seq_len,feat), but right input should be as shape(batch,feat,seq_len,) so nn.Conv1d can be calculate
Environment
Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.
- Qlib version:
- Python version:
- OS (
Windows,Linux,MacOS): - Commit number (optional, please provide it if you are using the dev version):
Additional Notes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in qlib/contrib/model/pytorch_tcn_ts.py at lines 171–174 and inspect how the TCN receives feature data relative to nn.Conv1d’s expected shape. Reproduce with sequence length 10 using examples/benchmarks/TCN/workflow_config_tcn_Alpha158.yaml. Done means the workflow runs without the reported input-shape error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100