Skip to content

kynk94/torch-firewood

Repository files navigation

Firewood

Implementation of custom torch layers and models.
All layers are compatible with official pytorch nn.Module and support ddp strategy, onnx exporting.

Models & Trainers

(nn.Module model & pytorch-lightning trainer)

GAN

Semantic Segmentation

  • BiSeNetV1
  • BiSeNetV2
Layers

Separable Convolution

  • Depthwise - Pointwise Convolution
    • weight shape: Conv(in, out, K, K)Conv(in, 1, K, K) X Conv(1, out, 1, 1)
  • Spatialwise Convolution
    • weight shape: Conv(in, out, K, K)Conv(in, smaller, K, 1) X Conv(smaller, out, 1, K)

Denormalizations

  • AdaIN
  • SPADE

Introduced in PGGAN

  • Learning rate Equalizer hooks

Introduced in StyleGAN

  • Weight Gradient Fixable Convolution
    • All options are compatible with tensorflow convolution. (e.g. "same" padding)
    • Can implement exactly same with tensorflow.
  • Fused Activation (biased activation, cuda extension)
  • Up Fir Down filter 1D, 2D, 3D (only 2D support cuda extension)
  • Weight Demodulation hooks
    • Support Conv and Linear

Callbacks

  • Latent Interpolator
  • Latent Sampler
  • Condition Interpolator (Multi-Condition)
  • Image to Image Translation Sampler
  • Save Last K ModelCheckpoint

Metrics

  • FID
    • selectable resizing method
      • default: antialiased torchvision
      • original: tf1

Dataset

  • NoClassImageFolder for single class model
  • PairedImageFolder for I2I model
  • ConditionImageFolder for multi-condition(multi-class) model

About

Implementation of custom torch layers and models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published