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

when shape contains negative integer, input_variable should throw an error #3885

@cheyennee

Description

@cheyennee

In following code, I want to generate an input. However, when the input shape contains a negative integer, the code wont throw errors. It just prints Input('Input3', [#], [1 x ? x 1]). This behaviour is quite different from other deep learning libraries. I think it would be better if there is input shape checking.

repo code:

x = C.input_variable((1, -1, 1), needs_gradient=True)
print(x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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