Small fix to MaybeGetMinimumShape() in op_level_cost_estimator.
(1) previously, it set unknown shape flag for scalar input, but now it returns TensorShapeProto with rank equal to the expected and all dims set to 1, and unknown shape flag is not set. (2) Also, fixed a bug; when a rank is known, but dim_size() < rank (note that dim_size() may be non-zero), we previously called add_dim() with dim 1 rank times, which then makes dim_size() is incremented by rank, but we expect dim_size() equal to rank. (3) Added test for MaybeGetMinimumShape(). PiperOrigin-RevId: 208845501
Loading
Please sign in to comment