fix autobackend.py (#16801)

This commit is contained in:
Mike 2024-10-09 21:58:50 +08:00 committed by GitHub
parent 8154a27e9b
commit 28f31f14e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -265,8 +265,8 @@ class AutoBackend(nn.Module):
if -1 in tuple(model.get_tensor_shape(name)):
dynamic = True
context.set_input_shape(name, tuple(model.get_tensor_profile_shape(name, 0)[1]))
if dtype == np.float16:
fp16 = True
if dtype == np.float16:
fp16 = True
else:
output_names.append(name)
shape = tuple(context.get_tensor_shape(name))