You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/23 08:18:24 UTC
[GitHub] lightingghost opened a new issue #10220: Check failed: !ndinputs.back()->is_none()
lightingghost opened a new issue #10220: Check failed: !ndinputs.back()->is_none()
URL: https://github.com/apache/incubator-mxnet/issues/10220
I came across with an error of `Check failed: !ndinputs.back()->is_none() node_58 0`. The full code is too complicated to post here. I am trying a minimum sample for reproduce this error. Briefly, the model is the input variable going through a gluon `Block`, and some `ndarray` ops are used to calculate the loss.
Something I have tried:
1. I tried to call `hybridize()` for the Block, and the error disappears.
2. It seems to be related to the function below when calculating the loss:
```python
def binarize(self, x, i):
rand = mx.nd.random_uniform(low=0, high=1,
shape=self.rand_shape[i],
ctx=self.model.ctx)
sample = mx.nd.broadcast_lesser_equal(rand, mx.nd.sigmoid(x))
sample_shape = [-1] + list(self.model.data_shape[i])[1:]
return sample.reshape(sample_shape)
```
If I replace the function with
```python
def binarize(self, x, i):
return x
```
The error disappears.
Besides, I found there is `tojson()` method for `symbol`, but not for `ndarray`. Is there a way to visualize the computation graph so that I can know what operation of `node_58` is?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services