0

I change the code like below

model = models.efficientnet_b0(pretrained=False,num_classes=2)
model.features = nn.Conv2d(1, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), 
bias=False)

But what I got is below

EfficientNet(
(features): Conv2d(1, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
(avgpool): AdaptiveAvgPool2d(output_size=1)
(classifier): Sequential(
(0): Dropout(p=0.2, inplace=True)
(1): Linear(in_features=1280, out_features=2, bias=True)
)
)

It is not a full model.I want to change only the in_channels of efficientnet model.

0 Answers0