Apply gaussian filter to input. Arguments: input (torch.Tensor): Input to apply gaussian filter on. Returns: filtered (torch.Tensor): Filtered output.
(self, input)
| 942 | raise RuntimeError("Only 1, 2 and 3 dimensions are supported. Received {}.".format(dim)) |
| 943 | |
| 944 | def forward(self, input): |
| 945 | """ |
| 946 | Apply gaussian filter to input. |
| 947 | Arguments: |
| 948 | input (torch.Tensor): Input to apply gaussian filter on. |
| 949 | Returns: |
| 950 | filtered (torch.Tensor): Filtered output. |
| 951 | """ |
| 952 | return self.conv(input, weight=self.weight.to(input.dtype), groups=self.groups, padding="same") |
| 953 | |
| 954 | |
| 955 | def get_attention_scores( |