Skip to content

Commit

Permalink
support fp16 for exec_net.infer method
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasia.kuporosova committed Jan 29, 2021
1 parent af6bf1b commit 418d82c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,10 @@ cdef class InferRequest:
def _fill_inputs(self, inputs):
for k, v in inputs.items():
assert k in self._inputs_list, f"No input with name {k} found in network"
self.input_blobs[k].buffer[:] = v
if self.input_blobs[k].tensor_desc.precision == "FP16":
self.input_blobs[k].buffer[:] = v.view(dtype=np.int16)
else:
self.input_blobs[k].buffer[:] = v


## This class contains the information about the network model read from IR and allows you to manipulate with
Expand Down

0 comments on commit 418d82c

Please sign in to comment.