A more robust logic to check whether the first dimension of the input tensor is None
This commit is contained in:
parent
30a5f7b297
commit
7af8fb581b
1 changed files with 1 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue