Skip to content

Commit

Permalink
Fix shape tensor unsqueeze (#726)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Chen <kevinch@nvidia.com>
  • Loading branch information
kevinch-nv committed Aug 4, 2021
1 parent 53ed9b3 commit 4e50dbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ShapeTensor.cpp
Expand Up @@ -369,7 +369,7 @@ ShapeTensor convertTo1D(IImporterContext* ctx, const ShapeTensor& tensor)
assert(tensor.size() == 1);
if (tensor.valueKnown(0))
{
return shapeScalar(tensor[0]);
return shapeVector(tensor[0]);
}
return ShapeTensor(*addShuffle(ctx, tensor.tensor(ctx), shapeVector(1))->getOutput(0));
}
Expand Down

0 comments on commit 4e50dbc

Please sign in to comment.