MCPcopy Create free account
hub / github.com/baegwangbin/surface_normal_uncertainty / __init__

Method __init__

models/baseline.py:36–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34# Encoder
35class Encoder(nn.Module):
36 def __init__(self):
37 super(Encoder, self).__init__()
38
39 basemodel_name = 'tf_efficientnet_b5_ap'
40 print('Loading base model ()...'.format(basemodel_name), end='')
41 basemodel = torch.hub.load('rwightman/gen-efficientnet-pytorch', basemodel_name, pretrained=True)
42 print('Done.')
43
44 # Remove last layer
45 print('Removing last two layers (global_pool & classifier).')
46 basemodel.global_pool = nn.Identity()
47 basemodel.classifier = nn.Identity()
48
49 self.original_model = basemodel
50
51 def forward(self, x):
52 features = [x]

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected