Skip to content

Commit

Permalink
Simplified example
Browse files Browse the repository at this point in the history
  • Loading branch information
DrejcPesjak committed Feb 15, 2024
1 parent 99fc8fd commit f2ed7dd
Showing 1 changed file with 5 additions and 79 deletions.
84 changes: 5 additions & 79 deletions configs/resnet_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ model:
inputs:
- ResNet

- name: SegmentationHead
inputs:
- ResNet

losses:
- name: CrossEntropyLoss
attached_to: ClassificationHead
Expand All @@ -23,100 +19,30 @@ model:
is_main_metric: true
attached_to: ClassificationHead

tracker:
project_name: coco_test
save_directory: output
is_tensorboard: True
is_wandb: False
wandb_entity: luxonis
is_mlflow: False

dataset:
name: coco_test
train_view: train
val_view: val
test_view: test

trainer:
accelerator: auto
devices: auto
strategy: auto

num_sanity_val_steps: 1
profiler: null
verbose: True
batch_size: 4
accumulate_grad_batches: 1
epochs: &epochs 1
num_workers: 8
train_metrics_interval: -1
validation_interval: 1
epochs: &epochs 200
num_workers: 4
validation_interval: 10
num_log_images: 8
skip_last_batch: True
main_head_index: 0
log_sub_losses: True
save_top_k: 3

preprocessing:
train_image_size: [&height 256, &width 320]
train_image_size: [&height 224, &width 224]
keep_aspect_ratio: False
train_rgb: True
normalize:
active: True
augmentations:
- name: Defocus
params:
p: 0.1
- name: Sharpen
params:
p: 0.1
- name: Flip
- name: RandomRotate90
- name: Mosaic4
params:
out_width: *width
out_height: *height

callbacks:
- name: LearningRateMonitor
params:
logging_interval: step
- name: MetadataLogger
params:
hyperparams: ["trainer.epochs", trainer.batch_size]
- name: EarlyStopping
params:
patience: 3
monitor: val/loss
mode: min
verbose: true
- name: DeviceStatsMonitor
- name: ExportOnTrainEnd
- name: TestOnTrainEnd

optimizer:
name: SGD
params:
lr: 0.02
momentum: 0.937
nesterov: True
weight_decay: 0.0005

scheduler:
name: CosineAnnealingLR
params:
T_max: *epochs
eta_min: 0

exporter:
onnx:
opset_version: 11
blobconverter:
active: True
shaves: 8

tuner:
params:
trainer.optimizer.name_categorical: ["Adam", "SGD"]
trainer.optimizer.params.lr_float: [0.0001, 0.001]
trainer.batch_size_int: [4, 16, 4]
name: ConstantLR

0 comments on commit f2ed7dd

Please sign in to comment.