-
Notifications
You must be signed in to change notification settings - Fork 4
Description
There are cases when some bigger Numpy array is part of your net dict, e.g. when you have some custom init for some parameter, e.g. like in the case of GammatoneV2.
When some bigger Numpy array is part of the net dict, it is currently serialized as is, via __repr__. This makes the produced net dict very difficult to read, when 99% of it is just the Numpy array.
So, should we do sth about it?
What are possible things we could do? Here some ideas:
We could at least move the definition to the top, similar as we do it for dim tags. Then the net dict itself stays readable. But still 99% of the resulting RETURNN config would be just the Numpy array.
We could move them outside, either as Numpy txt files and do numpy.loadtxt, or as Python files and import them. However, this means that any config serialization logic now needs extra logic to handle these cases. Although we are probably only writing this once anyway and then not care anymore about it.
Such external file handling of the serialization could also be done in a generic way, and maybe it becomes useful for other purpose as well.