Create a `tf.compat.v1.placeholder` for the Graph Editor. Note that the correct graph scope must be set by the calling function. Args: t: a `tf.Tensor` whose name will be used to create the placeholder (see function placeholder_name). scope: absolute scope within which to create
(t, scope=None,
prefix=_DEFAULT_PLACEHOLDER_PREFIX)
| 449 | |
| 450 | |
| 451 | def make_placeholder_from_tensor(t, scope=None, |
| 452 | prefix=_DEFAULT_PLACEHOLDER_PREFIX): |
| 453 | """Create a `tf.compat.v1.placeholder` for the Graph Editor. |
| 454 | |
| 455 | Note that the correct graph scope must be set by the calling function. |
| 456 | |
| 457 | Args: |
| 458 | t: a `tf.Tensor` whose name will be used to create the placeholder (see |
| 459 | function placeholder_name). |
| 460 | scope: absolute scope within which to create the placeholder. None means |
| 461 | that the scope of `t` is preserved. `""` means the root scope. |
| 462 | prefix: placeholder name prefix. |
| 463 | |
| 464 | Returns: |
| 465 | A newly created `tf.compat.v1.placeholder`. |
| 466 | Raises: |
| 467 | TypeError: if `t` is not `None` or a `tf.Tensor`. |
| 468 | """ |
| 469 | return tf_array_ops.placeholder( |
| 470 | dtype=t.dtype, shape=t.get_shape(), |
| 471 | name=placeholder_name(t, scope=scope, prefix=prefix)) |
| 472 | |
| 473 | |
| 474 | def make_placeholder_from_dtype_and_shape(dtype, shape=None, scope=None, |
nothing calls this directly
no test coverage detected