Hi,
I converted a PyTorch model to ONNX to run inferences on it using OpenVINO on NCS2 (VPU). The converted model comprises scatterNDupdate layers which are not supported by the VPU. Is there any specific reason for the creation of those layers? and a way to avoid them?
From the PyTorch ONNX logs, I’ve found the code segment which is creating those layers, It will be of great help if I can be suggested a workaround to get rid of those.
while 0 in out_length and now_step < nsteps:
tmp_result = C[now_step, :, :]
out_res[now_step] = tmp_result
tmp_result = tmp_result.topk(1)[1].squeeze(dim=1)
for j in range(b):
if out_length[j] == 0 and tmp_result[j] == 0: #Check Here
out_length[j] = now_step + 1
now_step += 1
for j in range(0, b):
if int(out_length[j]) == 0:
out_length[j] = nsteps #Check Here
start = 0
output = torch.zeros(int(out_length.sum()), self.nclass).type_as(input.data)
for i in range(0, b):
cur_length = int(out_length[i])
output[start: start + cur_length] = out_res[0: cur_length, I, :] #Check Here
start += cur_length
return output, out_length