| 383 | } |
| 384 | |
| 385 | FunctionDef ResourceOutput() { |
| 386 | const Tensor kTwo = test::AsScalar<float>(2); |
| 387 | return FDH::Create( |
| 388 | // Name |
| 389 | "ResourceOutput", |
| 390 | // Args |
| 391 | {"x: float", "y: resource"}, |
| 392 | // Return values |
| 393 | {"y_out: resource", "two_x: float"}, |
| 394 | // Attr def |
| 395 | {}, |
| 396 | // Nodes |
| 397 | { |
| 398 | {{"two"}, "Const", {}, {{"value", kTwo}, {"dtype", DT_FLOAT}}}, |
| 399 | {{"mul"}, "Mul", {"x", "two:output:0"}, {{"T", DT_FLOAT}}, {}}, |
| 400 | }, |
| 401 | {{"y_out", "y"}, {"two_x", "mul:z:0"}}); |
| 402 | } |
| 403 | |
| 404 | FunctionDef ResourceIdentity() { |
| 405 | return FDH::Create( |