Exemplo n.º 1
0
 def forward(self, inputs, history=None, **kwargs) -> Distribution:
     """
     Note that history is ignored.
     """
     outputs = self.conditioner(inputs, **kwargs)
     return parameterize_conditional(self.dist_type, outputs,
                                     self.event_size)
Exemplo n.º 2
0
 def forward(self, inputs, **kwargs) -> Distribution:
     """
     :param inputs: [..., input_size]
     :return: a parameterized Distribution
     """
     outputs = self.conditioner(inputs, **kwargs)
     return parameterize_conditional(self.dist_type, outputs, self.event_size)
Exemplo n.º 3
0
 def forward(self, inputs, history, **kwargs) -> Distribution:
     """
     Note that history is required.
     """
     if inputs is None:
         h = history
     else:
         h = torch.cat([history, inputs], -1)
     outputs = self.conditioner(h, **kwargs)
     return parameterize_conditional(self.dist_type, outputs,
                                     self.event_size)