rwth-i6 / pytorch-to-returnn

Make PyTorch code runnable within RETURNN
3 stars 6 forks source link

Non-tensor module outputs #108

Closed vieting closed 2 years ago

vieting commented 2 years ago

I have a case where the output of a module is not a tensor. A simple example could be:

class DummyModule(torch.nn.Module):
  def forward(self, y):
    return {"a": 1, "b": y + 1}

I'm not exactly sure about all the logic in CallEntry, but just focusing on the Tensor outputs seems to work here.