MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / run

Method run

tensorflow/python/framework/test_util.py:1523–1550  ·  view source on GitHub ↗

Evalaute `fetches`. Fail if additional args are specified. Args: fetches: A Tensor or a nested list/tuple of Tensors. *args: Positional arguments **kwargs: Keyword arguments Raises: RuntimeError: If args or kwargs are specified. Returns: Tensors as n

(self, fetches, *args, **kwargs)

Source from the content-addressed store, hash-verified

1521 self._test_case = test_case
1522
1523 def run(self, fetches, *args, **kwargs):
1524 """Evalaute `fetches`.
1525
1526 Fail if additional args are specified.
1527
1528 Args:
1529 fetches: A Tensor or a nested list/tuple of Tensors.
1530 *args: Positional arguments
1531 **kwargs: Keyword arguments
1532
1533 Raises:
1534 RuntimeError: If args or kwargs are specified.
1535
1536 Returns:
1537 Tensors as numpy values.
1538 """
1539 feed_dict = kwargs.pop("feed_dict", {})
1540 if feed_dict:
1541 raise RuntimeError(
1542 "feed_dict is not supported when eager execution is enabled "
1543 "(in this case, sess.run(t) is shorthand for t.numpy()")
1544
1545 if args or kwargs:
1546 raise RuntimeError(
1547 "Optional args are not supported when eager execution is enabled "
1548 "(in this case, sess.run(t) is shorthand for t.numpy()")
1549
1550 return self._test_case.evaluate(fetches)
1551
1552
1553class ErrorLoggingSession(session.Session):

Callers 2

runMethod · 0.45
evaluateMethod · 0.45

Calls 2

popMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected