Type util
Namespace tensorflow.contrib.solvers.util
Methods
- create_operator
- create_operator_dyn
- dot
- dot_dyn
- identity_operator
- identity_operator_dyn
- l2norm
- l2norm
- l2norm
- l2norm
- l2norm
- l2norm_dyn
- l2norm_squared
- l2norm_squared
- l2norm_squared
- l2norm_squared
- l2norm_squared
- l2norm_squared_dyn
- l2normalize
- l2normalize
- l2normalize
- l2normalize
- l2normalize
- l2normalize_dyn
Properties
Public static methods
object create_operator(IGraphNodeBase matrix)
object create_operator_dyn(object matrix)
Tensor dot(IGraphNodeBase x, IGraphNodeBase y)
object dot_dyn(object x, object y)
Multiplies 2 tensors (and/or variables) and returns a *tensor*. When attempting to multiply a nD tensor
with a nD tensor, it reproduces the Theano behavior.
(e.g. `(2, 3) * (4, 3, 5) -> (2, 4, 5)`)
Parameters
-
object
x - Tensor or variable.
-
object
y - Tensor or variable.
Returns
-
object
- A tensor, dot product of `x` and `y`. Examples:
```python
# dot product between tensors
>>> x = K.placeholder(shape=(2, 3))
>>> y = K.placeholder(shape=(3, 4))
>>> xy = K.dot(x, y)
>>> xy
``` ```python # dot product between tensors >>> x = K.placeholder(shape=(32, 28, 3)) >>> y = K.placeholder(shape=(3, 4)) >>> xy = K.dot(x, y) >>> xy ``` ```python # Theano-like behavior example >>> x = K.random_uniform_variable(shape=(2, 3), low=0, high=1) >>> y = K.ones((4, 3, 5)) >>> xy = K.dot(x, y) >>> K.int_shape(xy) (2, 4, 5) ```