"Unknown shape for input tensor[tensor name: '{}'] -> shape: {}, Please define shape of input here,\nNote:you can use visualization tools like Netron to check input shape."
.format(vi.name,shape))
right_shape_been_input=False
whilenotright_shape_been_input:
try:
shape=raw_input(
"Shape of Input(e.g. -1,3,224,224), enter 'N' to skip: "
)
exceptNameError:
shape=input(
"Shape of Input(e.g. -1,3,224,224), enter 'N' to skip: "
)
ifshape.count("-1")>1:
print("Only 1 dimension can be -1, type again:)")
else:
right_shape_been_input=True
ifshape=='N':
break
shape=[int(dim)fordiminshape.strip().split(',')]
assertshape.count(-1)<=1,"Only one dimension can be -1"