# jp0926/dl-tl architecture

> Architecture diagram of the GitHub repository jp0926/dl-tl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jp0926/dl-tl
- Repository: https://github.com/jp0926/dl-tl

## Overview

DL-TL is a collection of deep-learning time-series forecasting and transfer-learning experiments, with river monitoring data represented in CSV collections. The clearest evidenced workflow is the fine-tuning script loading a location’s CSV, interpolating missing values, preparing sequences and training a Temporal Fusion Transformer; the excerpts do not establish that pretraining is invoked by fine-tuning. The repository also contains standalone recurrent, convolutional-attention and Transformer model scripts. The README provides no further capability description, and unsampled script sections limit confidence about additional connections.

Main entry points: [`FINE_TUNE_S1TO4.py`](https://github.com/jp0926/dl-tl/blob/main/FINE_TUNE_S1TO4.py) (TFT fine-tuning), [`DATA`](https://github.com/jp0926/dl-tl/tree/main/DATA) (River observations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["River datasets"]
  node_river_data[("River observations")]
  node_tft_data[("TFT observations")]
end

subgraph group_transfer["TFT transfer learning"]
  node_pretrain_tft["TFT pretraining<br/>[PRETRAIN_TFT.py]"]
  node_fine_tune["TFT fine-tuning<br/>[FINE_TUNE_S1TO4.py]"]
  node_before_tl["Before transfer<br/>[BEFORE_TL.py]"]
end

subgraph group_models["Forecasting models"]
  node_transformer["Transformer forecast<br/>[TRANSFORMER.py]"]
  node_cla["CNN-LSTM attention<br/>[CLA.py]"]
end

subgraph group_sequence["Sequence models"]
  node_lstm["LSTM forecast<br/>[LSTM.py]"]
  node_bilstm["BiLSTM forecast<br/>[BILSTM.py]"]
  node_gru["GRU experiment<br/>[GRU.py]"]
end

node_fine_tune -->|"loads CSV"| node_river_data

click node_river_data "https://github.com/jp0926/dl-tl/tree/main/DATA"
click node_tft_data "https://github.com/jp0926/dl-tl/tree/main/TFT_DATA"
click node_pretrain_tft "https://github.com/jp0926/dl-tl/blob/main/PRETRAIN_TFT.py"
click node_fine_tune "https://github.com/jp0926/dl-tl/blob/main/FINE_TUNE_S1TO4.py"
click node_before_tl "https://github.com/jp0926/dl-tl/blob/main/BEFORE_TL.py"
click node_transformer "https://github.com/jp0926/dl-tl/blob/main/TRANSFORMER.py"
click node_cla "https://github.com/jp0926/dl-tl/blob/main/CLA.py"
click node_lstm "https://github.com/jp0926/dl-tl/blob/main/LSTM.py"
click node_bilstm "https://github.com/jp0926/dl-tl/blob/main/BILSTM.py"
click node_gru "https://github.com/jp0926/dl-tl/blob/main/GRU.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_river_data,node_tft_data toneBlue
class node_pretrain_tft,node_fine_tune,node_before_tl toneAmber
class node_transformer,node_cla toneMint
class node_lstm,node_bilstm,node_gru toneRose
```

## Components

### River datasets

- [River observations](https://github.com/jp0926/dl-tl/tree/main/DATA): `DATA`
- [TFT observations](https://github.com/jp0926/dl-tl/tree/main/TFT_DATA): `TFT_DATA`

### TFT transfer learning

- [TFT pretraining](https://github.com/jp0926/dl-tl/blob/main/PRETRAIN_TFT.py): `PRETRAIN_TFT.py`
- [TFT fine-tuning](https://github.com/jp0926/dl-tl/blob/main/FINE_TUNE_S1TO4.py): `FINE_TUNE_S1TO4.py`
- [Before transfer](https://github.com/jp0926/dl-tl/blob/main/BEFORE_TL.py): `BEFORE_TL.py`

### Forecasting models

- [Transformer forecast](https://github.com/jp0926/dl-tl/blob/main/TRANSFORMER.py): `TRANSFORMER.py`
- [CNN-LSTM attention](https://github.com/jp0926/dl-tl/blob/main/CLA.py): `CLA.py`

### Sequence models

- [LSTM forecast](https://github.com/jp0926/dl-tl/blob/main/LSTM.py): `LSTM.py`
- [BiLSTM forecast](https://github.com/jp0926/dl-tl/blob/main/BILSTM.py): `BILSTM.py`
- [GRU experiment](https://github.com/jp0926/dl-tl/blob/main/GRU.py): `GRU.py`

## Connections

- TFT fine-tuning → River observations: loads CSV (evidence: `FINE_TUNE_S1TO4.py`)
