| 23 | namespace tensorflow { |
| 24 | |
| 25 | TEST(ArrayOpsTest, PeriodicResample_ShapeFn) { |
| 26 | ShapeInferenceTestOp op("PeriodicResample"); |
| 27 | // Case 1: output shape can be fully inferreed. |
| 28 | PartialTensorShape shape({4, 4, -1}); |
| 29 | TensorShapeProto shape_proto; |
| 30 | shape.AsProto(&shape_proto); |
| 31 | |
| 32 | TF_ASSERT_OK(NodeDefBuilder("test", "PeriodicResample") |
| 33 | .Input({"values", 0, DT_INT32}) |
| 34 | .Attr("shape", shape_proto) |
| 35 | .Finalize(&op.node_def)); |
| 36 | INFER_OK(op, "[2,2,4]", "[4,4,1]"); |
| 37 | // Case 2: output shape can not be inferred - report desired shape. |
| 38 | INFER_OK(op, "[2,2,?]", "[4,4,?]"); |
| 39 | } |
| 40 | |
| 41 | } // end namespace tensorflow |
nothing calls this directly
no test coverage detected