[PT FE] Return dynamic shape when static shape exist in graph (#20289)
This commit is contained in:
parent
571b41e383
commit
a31ed6ad19
@ -169,7 +169,8 @@ class TorchScriptPythonDecoder (Decoder):
|
||||
|
||||
def get_shape_for_value(self, value: torch.Value):
|
||||
if value.isCompleteTensor():
|
||||
ps = PartialShape(value.type().sizes())
|
||||
# We avoid static shapes, they don't generalize on other inputs
|
||||
ps = PartialShape([-1] * len(value.type().sizes()))
|
||||
return ps
|
||||
else:
|
||||
# TODO: Recognize types that we can represent as a nested constructs with objects from DecoderType
|
||||
|
Loading…
Reference in New Issue
Block a user