Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Check failed: !ndinputs.back()->is_none() #10220

Open
@lightingghost

Description

@lightingghost

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 to get a minimum sample to 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:
    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

    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?

Any help will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions