Skip to content

chaipangpang/OctaveConv_Caffe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OctaveConv_Caffe

This repository contains a Caffe implementation of the paper Drop an Octave: Reducing Spatial Redundancy in Convolutional Neural Networks with Octave Convolution.

OctaveUpsample

Provide octaveupsample layer to support octave convolution.
Forward:
forward
Backward:
backward

Example

Here is a performance on the scene classification task of resnet18 in AI Challenger.The experiment in GTX1080Ti*2, batchsize=128, did not use any data augmentation without mirror, and did not load the pre-training model.
More other models are coming soon.
top-3 acc

Usage

Prerequisites

Caffe
CUDA8.0
cudnn5.0

How to build

Modify caffe.proto like this:
Add option in LayerParameter.

message LayerParameter {
optional OctaveUpsampleParameter octaveupsample_param = Your last ID;
}

Add message at the end.

message OctaveUpsampleParameter {
  // DEPRECATED. No need to specify upsampling scale factors when
  // exact output shape is given by upsample_h, upsample_w parameters.
  optional uint32 scale = 1 [default = 2];
  // DEPRECATED. No need to specify upsampling scale factors when
  // exact output shape is given by upsample_h, upsample_w parameters.
  optional uint32 scale_h = 2;
  // DEPRECATED. No need to specify upsampling scale factors when
  // exact output shape is given by upsample_h, upsample_w parameters.
  optional uint32 scale_w = 3;
  // DEPRECATED. Specify exact output height using upsample_h. This
  // parameter only works when scale is 2
  optional bool pad_out_h = 4 [default = false];
  // DEPRECATED. Specify exact output width using upsample_w. This
  // parameter only works when scale is 2
  optional bool pad_out_w = 5 [default = false];
  optional uint32 upsample_h = 6;
  optional uint32 upsample_w = 7;
}

How to use

Reference OctaveUpsample layer in resnet18_octave_0.5_train.prototxt.

Reference

1.Caffe:pooling layer
2.caffe-segnet-cudnn5:upsample layer
3.OctaveConv_pytorch
4.OctaveConv

About

A Caffe Implementation for Octave Convolution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published