You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flux uses sequences for recurrent layers while ONNX wants 3D input.
Current workaround is to
Specify inputs to recurrent as 3D
Reshape/ flatten time dimension as batch dimension if hitting a Dense layer with 3D input
1 is not so good as the general API is to specify input shapes in the Flux format.
2 is ok-ish, but it is not really an honest representation of what is going on in flux and it does create a fair bit of look-ahead-a-few-layers-and-figure-out-if-a-few-OPs-shall-be-ignored wonderfulness.
Also, Dense -> Recurrent does not work iirc.
Perhaps something can be done with sequences, although I dread trying to figure out in deserialization if something is wrapped in a for loop over elements of a sequence or whatever one needs to do to feed a sequence into GEMM.
Perhaps the easiest way out is to just give in and use a 3D->sequence wrapper around recurrent layers but I can't imagine this being good for performance.
The text was updated successfully, but these errors were encountered:
Flux uses sequences for recurrent layers while ONNX wants 3D input.
Current workaround is to
1 is not so good as the general API is to specify input shapes in the Flux format.
2 is ok-ish, but it is not really an honest representation of what is going on in flux and it does create a fair bit of look-ahead-a-few-layers-and-figure-out-if-a-few-OPs-shall-be-ignored wonderfulness.
Also, Dense -> Recurrent does not work iirc.
Perhaps something can be done with sequences, although I dread trying to figure out in deserialization if something is wrapped in a for loop over elements of a sequence or whatever one needs to do to feed a sequence into GEMM.
Perhaps the easiest way out is to just give in and use a 3D->sequence wrapper around recurrent layers but I can't imagine this being good for performance.
The text was updated successfully, but these errors were encountered: