Why cannot hybrid forward accept None input?


#1

Hybrid forward supports None defaults, but not None inputs. I was wondering if there are fundamental differences - if I am still using the same static computation graph but only adding None input for convenience?

An minimal example is None default in rnn_layer. All I want to do is to call rnn_layer with explicit None as input.

rnn = mx.gluon.rnn.GRU(10)
rnn.hybridize()
rnn.collect_params().initialize()
rnn(mx.nd.zeros((3,2,10)), ) # this is okay
rnn(mx.nd.zeros((3,2,10)), None) # this is not okay

Thanks.


#2

Just confirmed with Sheng. I listed it as a feature request:


#3

Thanks for following up @yifeim