Metalhead.jl icon indicating copy to clipboard operation
Metalhead.jl copied to clipboard

Tweak GoogLeNet and Inception family to match the torchvision implementations

Open theabhirath opened this issue 2 years ago • 1 comments

These changes will make it easier to port over pretrained weights for the models from PyTorch.

theabhirath avatar Aug 04 '22 05:08 theabhirath

A toggle would be a good idea so that the paper variant is still easily available.

darsnack avatar Aug 04 '22 13:08 darsnack

Hi, this issue seems like a good place to start contributing.

function convolution(kernel_size, inplanes, outplanes, batchNorm; kwargs...)
    if batchNorm
        return basic_conv_bn(kernel_size, inplanes, outplanes; kwargs...)
    else 
        return Conv(kernel_size, inplanes => outplanes; kwargs...)
    end
end

would implementing such a function and the calling it like this convolution((7, 7), inchannels, 64, batchNorm; stride = 2, pad = 3, bias = bias) be a good way to refactor code for the particular issue? Or do you have something else in mind?

pri1311 avatar Nov 15 '22 23:11 pri1311

We already have support for turning off the batch norm here. The remaining task on this issue it to update the code for GoogLeNet to use that functionality.

darsnack avatar Nov 15 '22 23:11 darsnack