MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / InceptionV3

Class InceptionV3

tools/test_reconstruction_hf.py:127–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 from torch.nn.functional import adaptive_avg_pool2d
126
127 class InceptionV3(nn.Module):
128 def __init__(self):
129 super().__init__()
130 model = inception_v3(weights='IMAGENET1K_V1', transform_input=False)
131 model.fc = nn.Identity()
132 model.aux_logits = False
133 self.model = model
134
135 def forward(self, x):
136 x = nn.functional.interpolate(x, size=(299, 299), mode='bilinear', align_corners=False)
137 return self.model(x)
138
139 def get_activations(path, model, batch_size, dims, device, num_workers):
140 model.eval()

Callers 1

_calculate_fid_manualFunction · 0.85

Calls

no outgoing calls

Tested by 1

_calculate_fid_manualFunction · 0.68