DingXiaoH / ACNet

ACNet: Strengthening the Kernel Skeletons for Powerful CNN via Asymmetric Convolution Blocks
MIT License
831 stars 133 forks source link

can not find the models #46

Closed 3deepvision closed 3 years ago

3deepvision commented 3 years ago

In your TUDOS, I did not find the following models : from acnet import AsymConvBlock, acnet_fuse_and_load, acnet_switch_to_deploy Where are they? Can you introduce the function of them ,please?

TUDOS: from acnet import AsymConvBlock, acnet_fuse_and_load, acnet_switch_to_deploy

build model, replace regular Conv2d with AsymConvBlock

class YourNet(nn.module): ... self.conv1 = AsymConvBlock(in_channels=..., out_channels=..., ...) self.conv2 = AsymConvBlock(in_channels=..., out_channels=..., ...)

train

model = YourNet(...) train(model) model.save_checkpoint(SAVE_PATH) # use just the same PyTorch functions

deploy

acnet_switch_to_deploy() deploy_model = YourNet(...) # here deploy_model should be of the same structure as baseline acnet_fuse_and_load(deploy_model, SAVE_PATH) # use the converted weights to initliaze it test(model)

DingXiaoH commented 3 years ago

Please check the latest version.

DingXiaoH commented 3 years ago

Released