_BASE_: base.yaml

MODEL:
  META_ARCHITECTURE: PcbOnline

  PCB:
    PART_NUM: 3
    PART_DIM: 512
    EMBEDDING_DIM: 2048
    
    HEAD:
      FULL_DIM: 2048
      PART_DIM: 512
      EMBEDDING_DIM: 512
  
  BACKBONE:
    PRETRAIN: True
    PRETRAIN_PATH: /home/apps/.cache/torch/hub/checkpoints/se_resnext101_32x4d-3b2fe3d8.pth
    NAME: build_senet_pcb_backbone
    DEPTH: 101x
    NORM: BN
    LAST_STRIDE: 1
    FEAT_DIM: 512
    PRETRAIN: True
    WITH_IBN: True
    WITH_SE: True

  HEADS:
    NAME: PcbHead
    WITH_BNNECK: False
    EMBEDDING_DIM: 128
    POOL_LAYER: FastGlobalAvgPool
    CLS_LAYER: Linear
    NUM_CLASSES: 2

  LOSSES:
    NAME: ("CrossEntropyLoss",)
    
    CONTRASTIVE:
      MARGIN: 2.0
      SCALE: 1.

INPUT:
  SIZE_TRAIN: [310, 300]
  SIZE_TEST: [310, 300]

  CROP:
    ENABLED: True
    SIZE: [270, 260]
    SCALE: [0.8, 1.2]
    RATIO: [0.75, 1.33333333]

DATALOADER:
  NUM_WORKERS: 8

SOLVER:
  OPT: SGD
  SCHED: CosineAnnealingLR

  BASE_LR: 0.001
  MOMENTUM: 0.9
  NESTEROV: False

  BIAS_LR_FACTOR: 1.
  WEIGHT_DECAY: 0.0005
  WEIGHT_DECAY_BIAS: 0.
  ETA_MIN_LR: 0.00003

  WARMUP_FACTOR: 0.1
  WARMUP_ITERS: 1000

  MAX_EPOCH: 200
  IMS_PER_BATCH: 150

TEST:
  IMS_PER_BATCH: 512

DATASETS:
  NAMES: ("PairDataset",)
  TESTS: ("PairDataset", "ExcelDataset")

OUTPUT_DIR: projects/FastShoe/logs/online-pcb
