Albert Zeyer

Results 972 comments of Albert Zeyer

> I tried exporting again the RF demo model with the current changes, and the graph is much smaller now! Basically almost equal to the PyTorch graph: [onnx_rf_graph_new.txt](https://github.com/rwth-i6/returnn/files/11528190/onnx_rf_graph_new.txt) 🥳 The...

I think I reopen this to keep track of the remaining issues. One remaining issue now is that we do not really check `model_outputs`, whether that matches what the user...

I would maybe extend `init_forward_step_run_ctx` to pass a `model_outputs` template. Then in `mark_as_output`, it would check for that and follow the logic I described above. Also in the end, some...

Another thing: This script `export_to_onnx.py`, this is actually PT specific, right? We should then rename it, to `torch_export_to_onnx.py` or so.

> > some function check_outputs_match or so, which checks whether the all outputs are given > > And if they don't match, which is what we're seeing here, what to...

> [3c22503](https://github.com/rwth-i6/returnn/commit/3c22503434305f1f0593317ed0e077cf1420b3b2) addresses "Check `model_outputs`" in the main checklist. There were some problems with that. See my updated commit. In this commit, I also already overtake the dims in case...

That's certainly also an option. But it's also limited in other ways. But you could combine it with such mechanism I was proposing here. E.g. I often also have grown...

To extend a bit on `step_callback`: When exactly do we want this to be executed? Right before a train step? Right after a train step? Only train or also forward?...

For other use cases (e.g. adapting the gradient accumulation or other settings), I'm also thinking about a `train_epoch_callback` or similar. The question is also here when exactly to call this,...

(Btw, about naming: in PyTorch, the forward hook is called afterwards, so it could also have been named "post forward hook", and then there is a pre forward hook, which...