fajwel's picture
Add config.yaml for PVTV2 model
3bfcdec verified
task_name: predict
tags:
- dev
train: true
test: true
ckpt_path: null
seed: 42
float32_matmul_precision: high
clean_pred: true
data:
_target_: src.data.canopy_datamodule.GEODataModule
geometry_path: ${paths.data_dir}canopy_height/geometries.geojson
imageside: 336
imagesize: 224
mean:
- 124
- 124
- 124
- 124
std:
- 124
- 124
- 124
- 124
mean_type: global
iinter: 1
batch_size: 64
pin_memory: true
num_workers: 0
sample_multiplier: 1
tsize_base: null
tsize_enum_sizes:
- 1
tsize_enum_probs:
- 1
tsize_range_frac: 0.5
tsize_range_sizes:
- 0.5
- 2
trot_prob: 0.5
trot_angle: 90
min_overlap: 0.2
test_overlap: 0.5
model:
_target_: src.models.regression_module.RegressionModule
optimizer:
_target_: torch.optim.Adam
_partial_: true
lr: 0.001
weight_decay: 0.0
scheduler:
_target_: torch.optim.lr_scheduler.ReduceLROnPlateau
_partial_: true
mode: min
factor: 0.5
patience: 1
threshold: 0.01
threshold_mode: rel
metric_monitored: val/RMSE
warmup_scheduler:
_target_: src.models.components.utils.WarmupScheduler
_partial_: true
min_lr: 1.0e-05
max_lr: ${model.optimizer.lr}
fract: 0.04
net:
_target_: src.models.components.timmNet.timmNet
img_size: ${data.imagesize}
num_channels: 4
num_classes: 1
backbone: pvt_v2_b3.in1k
pretrained: false
pretrained_path: datasets/Models/pvt_v2_b3.in1k.bin
segmentation_head:
_partial_: true
_target_: src.models.components.utils.SimpleSegmentationHead
decoder_stride: 32
save_eval_only: true
save_freq: 1000
test_overlap: ${data.test_overlap}
compile: false
num_classes: ${model.net.num_classes}
aux_loss_factor: 0.0
loss: l1
activation: none
callbacks:
model_checkpoint:
_target_: lightning.pytorch.callbacks.ModelCheckpoint
dirpath: ${paths.output_dir}/checkpoints
filename: epoch_{epoch:03d}
monitor: val/RMSE
verbose: false
save_last: true
save_top_k: 1
mode: min
auto_insert_metric_name: false
save_weights_only: false
every_n_train_steps: null
train_time_interval: null
every_n_epochs: null
save_on_train_epoch_end: null
early_stopping:
_target_: lightning.pytorch.callbacks.EarlyStopping
monitor: ${callbacks.model_checkpoint.monitor}
min_delta: 0.0
patience: 3
verbose: false
mode: min
strict: true
check_finite: true
stopping_threshold: null
divergence_threshold: null
check_on_train_epoch_end: null
model_summary:
_target_: lightning.pytorch.callbacks.RichModelSummary
max_depth: -1
rich_progress_bar:
_target_: lightning.pytorch.callbacks.RichProgressBar
learning_rate_monitor:
_target_: lightning.pytorch.callbacks.LearningRateMonitor
logging_interval: step
logger: null
trainer:
_target_: lightning.pytorch.trainer.Trainer
default_root_dir: ${paths.output_dir}
min_epochs: 10
max_epochs: 25
accelerator: gpu
devices: 1
reload_dataloaders_every_n_epochs: 1
check_val_every_n_epoch: 1
log_every_n_steps: 20
deterministic: false
paths:
root_dir: ${oc.env:PROJECT_ROOT}
data_dir: ${paths.root_dir}/datasets/
log_dir: ${paths.root_dir}/logs/
output_dir: ${hydra:runtime.output_dir}
work_dir: ${hydra:runtime.cwd}
extras:
ignore_warnings: false
enforce_tags: true
print_config: true