Input is [...,N,N]. First and second outputs are: [...,N,N]; [...,N].
| 113 | // First and second outputs are: |
| 114 | // [...,N,N]; [...,N]. |
| 115 | Status LuShapeFn(InferenceContext* c) { |
| 116 | ShapeHandle input; |
| 117 | TF_RETURN_IF_ERROR(c->WithRankAtLeast(c->input(0), 2, &input)); |
| 118 | |
| 119 | DimensionHandle n; |
| 120 | TF_RETURN_IF_ERROR(c->Merge(c->Dim(input, -2), c->Dim(input, -1), &n)); |
| 121 | |
| 122 | ShapeHandle batch_shape; |
| 123 | TF_RETURN_IF_ERROR(c->Subshape(input, 0, -2, &batch_shape)); |
| 124 | |
| 125 | ShapeHandle lu_shape; |
| 126 | ShapeHandle p_shape; |
| 127 | |
| 128 | TF_RETURN_IF_ERROR(c->Concatenate(batch_shape, c->Matrix(n, n), &lu_shape)); |
| 129 | TF_RETURN_IF_ERROR(c->Concatenate(batch_shape, c->Vector(n), &p_shape)); |
| 130 | |
| 131 | c->set_output(0, lu_shape); |
| 132 | c->set_output(1, p_shape); |
| 133 | return Status::OK(); |
| 134 | } |
| 135 | |
| 136 | // Input is [...,M,N]. |
| 137 | // First and second outputs are: |
nothing calls this directly
no test coverage detected