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

Method eval

tensorflow/python/framework/sparse_tensor.py:205–228  ·  view source on GitHub ↗

Evaluates this sparse tensor in a `Session`. Calling this method will execute all preceding operations that produce the inputs needed for the operation that produces this tensor. *N.B.* Before invoking `SparseTensor.eval()`, its graph must have been launched in a session, and e

(self, feed_dict=None, session=None)

Source from the content-addressed store, hash-verified

203 self._indices, self._values, self._dense_shape)
204
205 def eval(self, feed_dict=None, session=None):
206 """Evaluates this sparse tensor in a `Session`.
207
208 Calling this method will execute all preceding operations that
209 produce the inputs needed for the operation that produces this
210 tensor.
211
212 *N.B.* Before invoking `SparseTensor.eval()`, its graph must have been
213 launched in a session, and either a default session must be
214 available, or `session` must be specified explicitly.
215
216 Args:
217 feed_dict: A dictionary that maps `Tensor` objects to feed values. See
218 `tf.Session.run` for a description of the valid feed values.
219 session: (Optional.) The `Session` to be used to evaluate this sparse
220 tensor. If none, the default session will be used.
221
222 Returns:
223 A `SparseTensorValue` object.
224 """
225 indices, values, dense_shape = _eval_using_default_session(
226 [self.indices, self.values, self.dense_shape], feed_dict, self.graph,
227 session)
228 return SparseTensorValue(indices, values, dense_shape)
229
230 @staticmethod
231 def _override_operator(operator, func):

Callers 2

testEmptyBucketsMethod · 0.95

Calls 1

Tested by 2

testEmptyBucketsMethod · 0.76