pyiqa.archs.inception ===================== .. py:module:: pyiqa.archs.inception .. autoapi-nested-parse:: File from: https://github.com/mseitzer/pytorch-fid Module Contents --------------- .. py:data:: FID_WEIGHTS_URL .. py:class:: InceptionV3(output_blocks=(DEFAULT_BLOCK_INDEX, ), resize_input=True, normalize_input=True, requires_grad=False, use_fid_inception=True) Bases: :py:obj:`torch.nn.Module` Pretrained InceptionV3 network returning feature maps .. py:method:: forward(inp, resize_input=False, normalize_input=False) Get Inception feature maps :param inp: Input tensor of shape Bx3xHxW. Values are expected to be in range (0, 1) :type inp: torch.autograd.Variable :returns: * *List of torch.autograd.Variable, corresponding to the selected output* * *block, sorted ascending by index* .. py:function:: fid_inception_v3() Build pretrained Inception model for FID computation The Inception model for FID computation uses a different set of weights and has a slightly different structure than torchvision's Inception. This method first constructs torchvision's Inception and then patches the necessary parts that are different in the FID Inception model. .. py:class:: FIDInceptionA(in_channels, pool_features) Bases: :py:obj:`torchvision.models.inception.InceptionA` InceptionA block patched for FID computation .. py:method:: forward(x) .. py:class:: FIDInceptionC(in_channels, channels_7x7) Bases: :py:obj:`torchvision.models.inception.InceptionC` InceptionC block patched for FID computation .. py:method:: forward(x) .. py:class:: FIDInceptionE_1(in_channels) Bases: :py:obj:`torchvision.models.inception.InceptionE` First InceptionE block patched for FID computation .. py:method:: forward(x) .. py:class:: FIDInceptionE_2(in_channels) Bases: :py:obj:`torchvision.models.inception.InceptionE` Second InceptionE block patched for FID computation .. py:method:: forward(x)