Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Tensor v a = Tensor (TensorKind v) Output
- data Value
- data Ref
- data TensorKind v where
- tensorKind :: Lens' (Tensor v a) (TensorKind v)
- tensorOutput :: Lens' (Tensor v a) Output
- tensorAttr :: Attribute attr => Text -> Traversal' (Tensor v a) attr
- value :: Tensor v a -> Tensor Value a
- data Feed = Feed Output TensorData
- feed :: Tensor v a -> TensorData a -> Feed
- tensorFromName :: TensorKind v -> Text -> Tensor v a
Documentation
A named output of a TensorFlow operation.
The type parameter a
is the type of the elements in the Tensor
. The
parameter v
is either Value
or Ref
, depending on whether the graph is
treating this op output as an immutable Value
or a stateful Ref
(e.g., a
variable). Note that a Tensor Ref
can be casted into a Tensor Value
via
value
.
Tensor (TensorKind v) Output |
BuildOp [Tensor Value a] Source | |
BuildOp f => BuildOp ([Tensor v a] -> f) Source | |
BuildOp f => BuildOp (Tensor v a -> f) Source | |
BuildOp (Tensor Ref a) Source | |
BuildOp (Tensor Value a) Source | |
OpResult (Tensor Ref a) Source | |
OpResult (Tensor Value a) Source | |
Nodes (Tensor v a) Source | |
(TensorType a, (~) * a a') => Fetchable (Tensor v a) (Scalar a') Source | |
(TensorType a, (~) * a a') => Fetchable (Tensor v a) (Vector a') Source |
data TensorKind v where Source
ValueKind :: TensorKind Value | |
RefKind :: TensorKind Ref |
tensorKind :: Lens' (Tensor v a) (TensorKind v) Source
tensorOutput :: Lens' (Tensor v a) Output Source
tensorAttr :: Attribute attr => Text -> Traversal' (Tensor v a) attr Source
Lens for the attributes of a tensor.
Only valid if the tensor has not yet been rendered. If the tensor has been rendered, the traversal will be over nothing (nothing can be read or written).
value :: Tensor v a -> Tensor Value a Source
Cast a 'Tensor *' into a 'Tensor Value'. Common usage is to cast a Ref into Value. This behaves like a no-op.
feed :: Tensor v a -> TensorData a -> Feed Source
tensorFromName :: TensorKind v -> Text -> Tensor v a Source
Create a Tensor
for a given name. This can be used to reference nodes
in a GraphDef
that was loaded via addGraphDef
.
TODO(judahjacobson): add more safety checks here.