Burn Image Models
This is a Rust crate for image models, inspired by the Python timm package.
Examples of loading pre-trained ResNet-18 model:
use fetch_model_weights;
use ;
use Wgpu;
type B = Wgpu;
let device = Defaultdefault;
let source =
"https://download.pytorch.org/models/resnet18-f37072fd.pth";
let source_classes = 1000;
let weights_path= fetch_model_weights.unwrap;
let my_classes = 10;
let model: = resnet18
.to_structure
.init
.load_pytorch_weights
.expect
.with_classes
// Enable (drop_block_prob) stochastic block drops for training:
.with_stochastic_drop_block
// Enable (drop_path_prob) stochastic depth for training:
.with_stochastic_path_depth;
- bimm::cache - weight loading cache.
- bimm::layers - reusable neural network modules.
- bimm::layers::activation - activation
layers.
- bimm::layers::activation::Activation
- activation layer abstraction wrapper.
- bimm::layers::activation::Activation
- bimm::layers::blocks - miscellaneous
blocks.
- bimm::layers::blocks::conv_norm -
Conv2d + BatchNorm2dblock.
- bimm::layers::blocks::conv_norm -
- bimm::layers::drop - dropout layers.
- bimm::layers::drop::drop_block - 2d drop block / spatial dropout.
- bimm::layers::drop::drop_path - drop path / stochastic depth.
- bimm::layers::patching - patching layers.
- bimm::layers::patching::patch_embed - 2d patch embedding layer.
- bimm::layers::activation - activation
layers.
- bimm::models - complete model families.
- bimm::models::resnet -
ResNet - bimm::models::swin - The SWIN Family.
- bimm::models::swin::v2 - The SWIN-V2 Model.
- bimm::models::resnet -
Recent Changes
- 0.3.3
- Preview of ResNet-18 support.
- 0.3.2
- Fixed visibility for
DropBlock3d/drop_block_3dsupport.
- Fixed visibility for
- 0.3.1
- added
DropBlock2d/drop_block_2dsupport.
- added
- 0.2.0
- bumped
burndependency to0.18.0.
- bumped