tensorflow-0.1.0.0: TensorFlow bindings.

Safe HaskellNone
LanguageHaskell2010

TensorFlow.Tensor

Synopsis

Documentation

data Tensor v a Source

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.

Constructors

Tensor (TensorKind v) Output 

Instances

data TensorKind v where Source

This class provides a runtime switch on whether a Tensor should be treated as a Value or as a Ref.

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.

data Feed Source

A pair of a Tensor and some data that should be fed into that Tensor when running the graph.

Constructors

Feed Output TensorData 

feed :: Tensor v a -> TensorData a -> Feed Source

Create a Feed for feeding the given data into a Tensor when running the graph.

Note that if a Tensor is rendered, its identity may change; so feeding the rendered Tensor may be different than feeding the original Tensor.

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.