MXFusion icon indicating copy to clipboard operation
MXFusion copied to clipboard

Bug in passing scalar as value to Variable

Open meissnereric opened this issue 6 years ago • 0 comments

When a constant primitive scalar is passed in as a value to a Variable, we don't handle it well during inference. There is a bug in get_num_samples that attempts to get the samples from it there. The issue with converting it to an mx.nd.array during Variable definition time is that we don't know the dtype.

I think the right way to fix this is in the get_num_samples, etc. code, for that to accept scalars and just move forward since mxnet operators are ok with broadcasting a scalar usually.

meissnereric avatar Oct 18 '18 16:10 meissnereric