A more robust logic to check whether the first dimension of the input tensor is None

This commit is contained in:
Fabio Manganiello 2020-03-23 23:54:18 +01:00
parent 30a5f7b297
commit 7af8fb581b
1 changed files with 1 additions and 1 deletions

View File

@ -1010,7 +1010,7 @@ class TensorflowPlugin(Plugin):
inputs = self._get_data(inputs, model)
if isinstance(inputs, np.ndarray) and \
len(model.inputs[0].shape) == len(inputs.shape) + 1 and \
model.inputs[0].shape[0] is None:
(model.inputs[0].shape[0] is None or model.inputs[0].shape[0].value is None):
inputs = np.asarray([inputs])
ret = model.predict(