57 Set the input tensors for the session.
59 size (int): Number of input tensors.
60 inputs_array (list): List of numpy arrays for the input data.
64 "Session is not initialized with a model. Please compile with a model before setting inputs."
67 input_tensorinfo = self.
session.input_tensorinfo(i)
69 if len(inputs_array) > i:
70 input_array = np.array(inputs_array[i], dtype=input_tensorinfo.dtype)
73 f
"Model's input size is {size}, but given inputs_array size is {len(inputs_array)}.\n{i}-th index input is replaced by an array filled with 0."
75 input_array = np.zeros((
num_elems(input_tensorinfo)),
76 dtype=input_tensorinfo.dtype)
78 self.
session.set_input(i, input_array)
79 self.
inputs.append(input_array)