I got the following error while doing the forward pass in my network:
AssertionError: HybridBlock requires the first argument to forward be either Symbol or NDArray, but got <class 'list'>
Currently, I am passing in a list because in addition to the “actual input”, some of the custom layers in the network need some extra information to do their forward pass computation.
Is there an easy way to do this, i.e., to pass the extra information along in addition to the actual input?
Theoretically, I could somehow encode that extra information along with the actual input into a single NDArray and then have each layer separate out the extra information and the actual input. But, that would be a pain and possibly hit performance. In case there is any easy way to avoid that, can you please let me know?
AssertionError: HybridBlock input must be (nested) list of Symbol or NDArray, but got 32 of type <class 'int'>
Am I doing it wrong?
Thanks.
P.S. Interestingly, I noticed that the above code does work if the net.hybridize() line is commented out, but, gives the error mentioned above if the line is not commented out.