MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / forward

Method forward

diffusers/src/diffusers/models/upsampling.py:63–73  ·  view source on GitHub ↗
(self, inputs: torch.Tensor)

Source from the content-addressed store, hash-verified

61 self.conv = nn.Conv1d(self.channels, self.out_channels, 3, padding=1)
62
63 def forward(self, inputs: torch.Tensor) -> torch.Tensor:
64 assert inputs.shape[1] == self.channels
65 if self.use_conv_transpose:
66 return self.conv(inputs)
67
68 outputs = F.interpolate(inputs, scale_factor=2.0, mode="nearest")
69
70 if self.use_conv:
71 outputs = self.conv(outputs)
72
73 return outputs
74
75
76class Upsample2D(nn.Module):

Callers

nothing calls this directly

Calls 1

interpolateMethod · 0.45

Tested by

no test coverage detected