Fixed infer_shape.