tensorflow-ops-0.3.0.0: Friendly layer around TensorFlow bindings.
Safe HaskellNone
LanguageHaskell2010

TensorFlow.Ops

Description

This module contains definitions for some built-in TensorFlow operations.

Note that certain, "stateful" ops like variable and assign return a Build action (e.g., Build (Tensor Ref a) instead of a pure value; the returned Tensors are always rendered in the current Build context. This approach helps us avoid problems with inlining or common subexpression elimination, by writing

do
    v <- variable []
    w <- assign v 3
    render $ w * w

instead of

let
   v = variable []
   w = assign v 3
in w * w

since the latter could be reasonably transformed by the compiler into (or vice versa)

let
   v = variable []
   w = assign v 3
   w' = assign v 3
in w * w'

Ops should return a Build action if their original OpDef marks them as stateful, or if they take any Refs as input. (This mirrors the rules that TensorFlow uses to avoid common subexpression elimination.)

Synopsis

Documentation

add #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, ByteString, Int16, Int32, Int64, Int8, Word16, Word8, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build t

z

 

add' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, ByteString, Int16, Int32, Int64, Int8, Word16, Word8, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build t

z

abs #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Int16, Int32, Int64, Int8, Word16, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor Build t

y

 

abs' #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Int16, Int32, Int64, Int8, Word16, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor Build t

y

addN #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float, Variant] t 
=> [Tensor v'1 t]

inputs

-> Tensor Build t

sum

 

addN' #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float, Variant] t 
=> OpParams 
-> [Tensor v'1 t]

inputs

-> Tensor Build t

sum

argMax #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tidx output_type. (OneOf '[Complex Double, Complex Float, Bool, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t, OneOf '[Int32, Int64] tidx, OneOf '[Int32, Int64] output_type) 
=> Tensor v'1 t

input

-> Tensor v'2 tidx

dimension

-> Tensor Build output_type

output

 

argMax' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tidx output_type. (OneOf '[Complex Double, Complex Float, Bool, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t, OneOf '[Int32, Int64] tidx, OneOf '[Int32, Int64] output_type) 
=> OpParams 
-> Tensor v'1 t

input

-> Tensor v'2 tidx

dimension

-> Tensor Build output_type

output

assign #

Arguments

:: forall (v'2 :: Type -> Type) t m'. (MonadBuild m', TensorType t) 
=> Tensor Ref t

ref

-> Tensor v'2 t

value

-> m' (Tensor Ref t)

output_ref

 

assign' #

Arguments

:: forall (v'2 :: Type -> Type) t m'. (MonadBuild m', TensorType t) 
=> OpParams 
-> Tensor Ref t

ref

-> Tensor v'2 t

value

-> m' (Tensor Ref t)

output_ref

broadcastGradientArgs #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Int32, Int64] t 
=> Tensor v'1 t

s0

-> Tensor v'2 t

s1

-> (Tensor Build t, Tensor Build t)

(r0, r1)

  • r0
  • r1
 

broadcastGradientArgs' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Int32, Int64] t 
=> OpParams 
-> Tensor v'1 t

s0

-> Tensor v'2 t

s1

-> (Tensor Build t, Tensor Build t)

(r0, r1)

  • r0
  • r1

cast #

Arguments

:: forall (v'1 :: Type -> Type) srcT dstT. (TensorType srcT, TensorType dstT) 
=> Tensor v'1 srcT

x

-> Tensor Build dstT

y

 

cast' #

Arguments

:: forall (v'1 :: Type -> Type) srcT dstT. (TensorType srcT, TensorType dstT) 
=> OpParams 
-> Tensor v'1 srcT

x

-> Tensor Build dstT

y

concat #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. TensorType t 
=> Tensor v'1 Int32

concat_dim

-> [Tensor v'2 t]

values

-> Tensor Build t

output

 

concat' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. TensorType t 
=> OpParams 
-> Tensor v'1 Int32

concat_dim

-> [Tensor v'2 t]

values

-> Tensor Build t

output

constant :: TensorType a => Shape -> [a] -> Tensor Build a Source #

Create a constant tensor.

The values should be in row major order, e.g.,

element 0: index (0, ..., 0) element 1: index (0, ..., 1) ...

constant' :: forall a. TensorType a => OpParams -> Shape -> [a] -> Tensor Build a Source #

equal #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Bool, ByteString, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build Bool

z

 

equal' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Bool, ByteString, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build Bool

z

initializedVariable :: (MonadBuild m, TensorType a) => Tensor v a -> m (Tensor Ref a) Source #

Creates a variable initialized to the given value. Initialization happens next time session runs.

zeroInitializedVariable :: (MonadBuild m, TensorType a, Num a) => Shape -> m (Tensor Ref a) Source #

Creates a zero-initialized variable with the given shape.

fill #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t index_type. (TensorType t, OneOf '[Int32, Int64] index_type) 
=> Tensor v'1 index_type

dims

-> Tensor v'2 t

value

-> Tensor Build t

output

 

fill' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t index_type. (TensorType t, OneOf '[Int32, Int64] index_type) 
=> OpParams 
-> Tensor v'1 index_type

dims

-> Tensor v'2 t

value

-> Tensor Build t

output

identity #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> Tensor v'1 t

input

-> Tensor Build t

output

 

identity' #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> OpParams 
-> Tensor v'1 t

input

-> Tensor Build t

output

matMul #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int32, Int64, Word16, Double, Float] t 
=> Tensor v'1 t

a

-> Tensor v'2 t

b

-> Tensor Build t

product

 

matMul' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int32, Int64, Word16, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

a

-> Tensor v'2 t

b

-> Tensor Build t

product

einsum #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> ByteString

equation

-> [Tensor v'1 t]

inputs

-> Tensor Build t

output

 

einsum' #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> OpParams 
-> ByteString

equation

-> [Tensor v'1 t]

inputs

-> Tensor Build t

output

mean #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tidx. (OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t, OneOf '[Int32, Int64] tidx) 
=> Tensor v'1 t

input

-> Tensor v'2 tidx

reduction_indices

-> Tensor Build t

output

 

mean' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tidx. (OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t, OneOf '[Int32, Int64] tidx) 
=> OpParams 
-> Tensor v'1 t

input

-> Tensor v'2 tidx

reduction_indices

-> Tensor Build t

output

mul #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word8, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build t

z

 

mul' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word8, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build t

z

neg #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor Build t

y

 

neg' #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor Build t

y

oneHot #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) (v'3 :: Type -> Type) (v'4 :: Type -> Type) t tI. (TensorType t, OneOf '[Int32, Int64, Word8] tI) 
=> Tensor v'1 tI

indices

-> Tensor v'2 Int32

depth

-> Tensor v'3 t

on_value

-> Tensor v'4 t

off_value

-> Tensor Build t

output

 

oneHot' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) (v'3 :: Type -> Type) (v'4 :: Type -> Type) t tI. (TensorType t, OneOf '[Int32, Int64, Word8] tI) 
=> OpParams 
-> Tensor v'1 tI

indices

-> Tensor v'2 Int32

depth

-> Tensor v'3 t

on_value

-> Tensor v'4 t

off_value

-> Tensor Build t

output

pack #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> [Tensor v'1 t]

values

-> Tensor Build t

output

 

pack' #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> OpParams 
-> [Tensor v'1 t]

values

-> Tensor Build t

output

placeholder' :: forall m a. (MonadBuild m, TensorType a) => OpParams -> Shape -> m (Tensor Value a) Source #

range #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) (v'3 :: Type -> Type) tidx. OneOf '[Int32, Int64, Word16, Double, Float] tidx 
=> Tensor v'1 tidx

start

-> Tensor v'2 tidx

limit

-> Tensor v'3 tidx

delta

-> Tensor Build tidx

output

 

range' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) (v'3 :: Type -> Type) tidx. OneOf '[Int32, Int64, Word16, Double, Float] tidx 
=> OpParams 
-> Tensor v'1 tidx

start

-> Tensor v'2 tidx

limit

-> Tensor v'3 tidx

delta

-> Tensor Build tidx

output

reducedShape :: (OneOf '[Int32, Int64] t1, OneOf '[Int32, Int64] t2) => Tensor v1 t1 -> Tensor v2 t2 -> Tensor Build Int32 Source #

Helper function for reduction ops (translation of math_ops.reduced_shape).

reduceMean :: (TensorType a, OneOf '[Double, Float, Complex Float, Complex Double] a) => Tensor v a -> Tensor Build a Source #

Computes the mean of elements across dimensions of a tensor. See mean

relu #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t 
=> Tensor v'1 t

features

-> Tensor Build t

activations

 

relu' #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

features

-> Tensor Build t

activations

reluGrad #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t 
=> Tensor v'1 t

gradients

-> Tensor v'2 t

features

-> Tensor Build t

backprops

 

reluGrad' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

gradients

-> Tensor v'2 t

features

-> Tensor Build t

backprops

tanh #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Word16, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor Build t

y

 

tanhGrad #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Word16, Double, Float] t 
=> Tensor v'1 t

y

-> Tensor v'2 t

dy

-> Tensor Build t

z

 

reshape #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tshape. (TensorType t, OneOf '[Int32, Int64] tshape) 
=> Tensor v'1 t

tensor

-> Tensor v'2 tshape

shape

-> Tensor Build t

output

 

reshape' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tshape. (TensorType t, OneOf '[Int32, Int64] tshape) 
=> OpParams 
-> Tensor v'1 t

tensor

-> Tensor v'2 tshape

shape

-> Tensor Build t

output

restore Source #

Arguments

:: forall a m. (MonadBuild m, TensorType a) 
=> ByteString

File path.

-> Tensor Ref a

Tensor to restore.

-> m ControlNode 

Restore a tensor's value from a checkpoint file.

restoreFromName Source #

Arguments

:: forall a m. (MonadBuild m, TensorType a) 
=> ByteString

File path.

-> ByteString

Tensor name override.

-> Tensor Ref a

Tensor to restore.

-> m ControlNode 

Restore a tensor's value from a checkpoint file.

This version allows restoring from a checkpoint file that uses a different tensor name than the variable.

save Source #

Arguments

:: forall a m v. (Rendered (Tensor v), MonadBuild m, TensorType a) 
=> ByteString

File path.

-> [Tensor v a]

Tensors to save.

-> m ControlNode 

scalar :: TensorType a => a -> Tensor Build a Source #

Create a constant scalar.

sigmoid #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Word16, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor Build t

y

 

sigmoidGrad #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Word16, Double, Float] t 
=> Tensor v'1 t

y

-> Tensor v'2 t

dy

-> Tensor Build t

z

 

sign #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int32, Int64, Word16, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor Build t

y

 

sign' #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int32, Int64, Word16, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor Build t

y

size #

Arguments

:: forall (v'1 :: Type -> Type) t out_type. (TensorType t, OneOf '[Int32, Int64] out_type) 
=> Tensor v'1 t

input

-> Tensor Build out_type

output

 

size' #

Arguments

:: forall (v'1 :: Type -> Type) t out_type. (TensorType t, OneOf '[Int32, Int64] out_type) 
=> OpParams 
-> Tensor v'1 t

input

-> Tensor Build out_type

output

softmax #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Word16, Double, Float] t 
=> Tensor v'1 t

logits

-> Tensor Build t

softmax

 

softmax' #

Arguments

:: forall (v'1 :: Type -> Type) t. OneOf '[Word16, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

logits

-> Tensor Build t

softmax

softmaxCrossEntropyWithLogits #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Word16, Double, Float] t 
=> Tensor v'1 t

features

-> Tensor v'2 t

labels

-> (Tensor Build t, Tensor Build t)

(loss, backprop)

  • loss
  • backprop
 

softmaxCrossEntropyWithLogits' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Word16, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

features

-> Tensor v'2 t

labels

-> (Tensor Build t, Tensor Build t)

(loss, backprop)

  • loss
  • backprop

sparseToDense #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) (v'3 :: Type -> Type) (v'4 :: Type -> Type) t tindices. (TensorType t, OneOf '[Int32, Int64] tindices) 
=> Tensor v'1 tindices

sparse_indices

-> Tensor v'2 tindices

output_shape

-> Tensor v'3 t

sparse_values

-> Tensor v'4 t

default_value

-> Tensor Build t

dense

 

sparseToDense' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) (v'3 :: Type -> Type) (v'4 :: Type -> Type) t tindices. (TensorType t, OneOf '[Int32, Int64] tindices) 
=> OpParams 
-> Tensor v'1 tindices

sparse_indices

-> Tensor v'2 tindices

output_shape

-> Tensor v'3 t

sparse_values

-> Tensor v'4 t

default_value

-> Tensor Build t

dense

sub #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word8, Double, Float] t 
=> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build t

z

 

sub' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t. OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word8, Double, Float] t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor v'2 t

y

-> Tensor Build t

z

sum #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tidx. (OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t, OneOf '[Int32, Int64] tidx) 
=> Tensor v'1 t

input

-> Tensor v'2 tidx

reduction_indices

-> Tensor Build t

output

 

sum' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tidx. (OneOf '[Complex Double, Complex Float, Int16, Int32, Int64, Int8, Word16, Word32, Word64, Word8, Double, Float] t, OneOf '[Int32, Int64] tidx) 
=> OpParams 
-> Tensor v'1 t

input

-> Tensor v'2 tidx

reduction_indices

-> Tensor Build t

output

reduceSum :: OneOf '[Double, Float, Int32, Int64, Complex Float, Complex Double] a => Tensor v a -> Tensor Build a Source #

Sum a tensor down to a scalar Seee sum

transpose #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tperm. (TensorType t, OneOf '[Int32, Int64] tperm) 
=> Tensor v'1 t

x

-> Tensor v'2 tperm

perm

-> Tensor Build t

y

 

transpose' #

Arguments

:: forall (v'1 :: Type -> Type) (v'2 :: Type -> Type) t tperm. (TensorType t, OneOf '[Int32, Int64] tperm) 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor v'2 tperm

perm

-> Tensor Build t

y

truncatedNormal Source #

Arguments

:: (MonadBuild m, OneOf '[Word16, Double, Float] a) 
=> Tensor v Int64

Shape.

-> m (Tensor Value a) 

Random tensor from the unit normal distribution with bounded values.

This is a type-restricted version of truncatedNormal.

truncatedNormal' Source #

Arguments

:: (MonadBuild m, OneOf '[Word16, Double, Float] a) 
=> OpParams 
-> Tensor v Int64

Shape.

-> m (Tensor Value a) 

variable #

Arguments

:: forall dtype m'. (MonadBuild m', TensorType dtype) 
=> Shape

shape

-> m' (Tensor Ref dtype)

ref

 

variable' #

Arguments

:: forall dtype m'. (MonadBuild m', TensorType dtype) 
=> OpParams 
-> Shape

shape

-> m' (Tensor Ref dtype)

ref

vector :: TensorType a => [a] -> Tensor Build a Source #

Create a constant vector.

zeros :: forall a. (Num a, TensorType a) => Shape -> Tensor Build a Source #

zerosLike #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> Tensor v'1 t

x

-> Tensor Build t

y

 

zerosLike' #

Arguments

:: forall (v'1 :: Type -> Type) t. TensorType t 
=> OpParams 
-> Tensor v'1 t

x

-> Tensor Build t

y

scalarize :: TensorType a => Tensor v a -> Tensor Build a Source #

Reshape a N-D tensor down to a scalar.

See reshape.

Orphan instances

(TensorType a, Num a, v ~ Build, OneOf '[Double, Float, Int32, Int64, Complex Float, Complex Double] a) => Num (Tensor v a) Source #

Must be defined as an orphan because of the dependency order between Ops and Tensor.

The indirect constraint "v ~ Value" helps disambiguate types, for example in "neg 1 :: Tensor Value Float", it helps find the type of the subexpression "1".

Instance details

Methods

(+) :: Tensor v a -> Tensor v a -> Tensor v a #

(-) :: Tensor v a -> Tensor v a -> Tensor v a #

(*) :: Tensor v a -> Tensor v a -> Tensor v a #

negate :: Tensor v a -> Tensor v a #

abs :: Tensor v a -> Tensor v a #

signum :: Tensor v a -> Tensor v a #

fromInteger :: Integer -> Tensor v a #