/deep-learning-playground

Run experiments and try different models on GCP GPU instance

Primary LanguageJupyter Notebook

Deep Learning Playground

TODO

  • Parallel batch encoding for all models
  • Data augmentation logic
  • Tensorboard Visualizer
  • Implement NMS for decoding
  • SSD
    • Anchor Generator
    • Encoder
    • Decoder
    • Loss
    • Training Loop
  • CenterNet
    • Keypoint Encoder
    • Keypoint Decoder
    • Loss
    • Training Loop
  • Swin Transformer
    • Model Architecture
    • Detection Head
  • ResNeXT

Parallel Encoding Example

import torch.multiprocessing as mp

def encode_sample(sample):
    # This function encodes a single sample.
    # Add your own encoding logic here.
    return encoded_sample

def encode_batch(batch):
    with mp.Pool() as pool:
        encoded_batch = pool.map(encode_sample, batch)
    return torch.stack(encoded_batch)

PyTorch Details

  • Use view (in PyTorch) or reshape (in numpy) to change the shape of the data without changing the order of the axes. view requires that Tensor is contiguous.
  • Use permute (in PyTorch) or transpose/swapaxes (in numpy) to rearrange the axes of your data.