spidyDev commented on issue #10425: [MXNET-175] NdArrayiterator dict fix
URL: https://github.com/apache/incubator-mxnet/pull/10425#issuecomment-380904371
 
 
   @piiswrong  I agree. But user can create a NDIterator with multiple 
key-value but bind only few of them. For example,
   ```
       train_iter = mx.io.NDArrayIter({
           'i2': mx.nd.ones((5, 4, 3, 3)),
           'i0': mx.nd.zeros(5, ),
           'i1': mx.nd.ones(5, ),
           'i3': mx.nd.ones((5, 4, 3, 3))
       }, batch_size=5)
   
       net = mx.sym.add_n(mx.sym.var('i2'), mx.sym.var('i3'))
       mod = mx.module.Module(net, ['i2', 'i3'], None)
       mod.bind([('i2', (5, 4, 3, 3)), ('i3', (5, 4, 3, 3))])
       mod.init_params()
       mod.predict(train_iter)
       assert_almost_equal(mod.get_outputs()[0].asnumpy(), 2*np.ones(shape=(5, 
4, 3, 3)))
   ```
   
   This might not be ideal , but valid ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to