Runs this operation in a `Session`. Calling this method will execute all preceding operations that produce the inputs needed for this operation. *N.B.* Before invoking `Operation.run()`, its graph must have been launched in a session, and either a default session must be availa
(self, feed_dict=None, session=None)
| 2421 | raise ValueError(str(e)) |
| 2422 | |
| 2423 | def run(self, feed_dict=None, session=None): |
| 2424 | """Runs this operation in a `Session`. |
| 2425 | |
| 2426 | Calling this method will execute all preceding operations that |
| 2427 | produce the inputs needed for this operation. |
| 2428 | |
| 2429 | *N.B.* Before invoking `Operation.run()`, its graph must have been |
| 2430 | launched in a session, and either a default session must be |
| 2431 | available, or `session` must be specified explicitly. |
| 2432 | |
| 2433 | Args: |
| 2434 | feed_dict: A dictionary that maps `Tensor` objects to feed values. See |
| 2435 | `tf.Session.run` for a description of the valid feed values. |
| 2436 | session: (Optional.) The `Session` to be used to run to this operation. If |
| 2437 | none, the default session will be used. |
| 2438 | """ |
| 2439 | _run_using_default_session(self, feed_dict, self.graph, session) |
| 2440 | |
| 2441 | _gradient_registry = registry.Registry("gradient") |
| 2442 |