#3885·CNTK

when shape contains negative integer, input_variable should throw an error

Author: cheyenneeCreated Dec 8, 2023Updated Dec 13, 2023

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)