Fetch Hopfield projected pattern matrix gathered by passing through the specified data. :param input: data to be passed through the Hopfield association :param stored_pattern_padding_mask: mask to be applied on stored patterns :param association_mask: mask to be app
(self, input: Union[Tensor, Tuple[Tensor, Tensor]],
stored_pattern_padding_mask: Optional[Tensor] = None,
association_mask: Optional[Tensor] = None)
| 809 | association_mask=association_mask) |
| 810 | |
| 811 | def get_projected_pattern_matrix(self, input: Union[Tensor, Tuple[Tensor, Tensor]], |
| 812 | stored_pattern_padding_mask: Optional[Tensor] = None, |
| 813 | association_mask: Optional[Tensor] = None) -> Tensor: |
| 814 | """ |
| 815 | Fetch Hopfield projected pattern matrix gathered by passing through the specified data. |
| 816 | |
| 817 | :param input: data to be passed through the Hopfield association |
| 818 | :param stored_pattern_padding_mask: mask to be applied on stored patterns |
| 819 | :param association_mask: mask to be applied on inner association matrix |
| 820 | :return: pattern projection matrix as computed by the Hopfield core module |
| 821 | """ |
| 822 | with torch.no_grad(): |
| 823 | return self.hopfield.get_projected_pattern_matrix( |
| 824 | input=self._prepare_input(input=input), |
| 825 | stored_pattern_padding_mask=stored_pattern_padding_mask, |
| 826 | association_mask=association_mask) |
| 827 | |
| 828 | @property |
| 829 | def batch_first(self) -> bool: |
nothing calls this directly
no test coverage detected