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.

Bug with arange inside a foreach #14983

@matteosal

Description

@matteosal

symbol.zip

Download+extract the attached json and run this script:

import mxnet as mx

sym = mx.symbol.load('/path/to/symbol.json')
args = {
	".Inputs.Input": mx.nd.zeros([1, 1, 2]),
	".States.Element": mx.nd.zeros([1]),
	"zeroarray0": mx.nd.zeros([1]),
	".Inputs.Position": mx.nd.zeros([1, 1]),
	"fixedarray:.Parameters.Net.Nodes.2:Limit": mx.nd.zeros([1]),
}
ex = sym.bind(mx.cpu(), args=args)
outputs = ex.forward()
print(outputs)

It fails with the following error:

mxnet.base.MXNetError: [15:37:57] src/imperative/./imperative_utils.h:145: Operator _arange inferring shapes failed.
input shapes:
output shapes:
None
operator attributes:
start : 0
dtype : float32
infer_range : true

This example stopped working at this commit: 83d2c2d

Before that, it was producing the expected result:

[
[[0.]]
<NDArray 1x1 @cpu(0)>, 
[0.]
<NDArray 1 @cpu(0)>]

@sbodenstein

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions