Module

Data.Tensor

Package
purescript-propel
Repository
philzook58/purescript-propel

#Tensor Source

data Tensor :: Type -> Type

Instances

#DType Source

data DType

Constructors

Instances

#Shape Source

type Shape = Array Int

#DeviceType Source

data DeviceType

Constructors

#HasDType Source

class HasDType a  where

Note that some functions have an appended 'T' to avoid clashes with Prelude addT, mulT, divT Be frightened of Boolean matrices. The propel representation appears to be Integers

Members

Instances

#ones Source

ones :: forall a. Semiring a => HasDType a => Shape -> Tensor a

#range Source

#deltarange Source

#tensor Source

tensor :: forall a. HasDType a => (Array a) -> Tensor a

#tensor2 Source

tensor2 :: forall a. HasDType a => (Array (Array a)) -> Tensor a

#zeros Source

zeros :: forall a. Semiring a => HasDType a => Shape -> Tensor a

#abs Source

abs :: forall a. Ring a => Tensor a -> Tensor a

#addT Source

addT :: forall a. Semiring a => Tensor a -> Tensor a -> Tensor a

#argmin Source

argmin :: forall a. Int -> Tensor a -> Tensor a

#argmax Source

argmax :: forall a. Int -> Tensor a -> Tensor a

#cast Source

cast :: forall a b. DType -> Tensor a -> Tensor b

#concat Source

concat :: forall a. Int -> Tensor a -> Tensor a -> Tensor a

#dataSync Source

dataSync :: forall a b. Tensor a -> ArrayView b

#asArray Source

asArray :: forall a. Tensor a -> Array a

To be used sparingly. Copies out data into new array. Not native Propel functionality May return booleans as Integers?

#divT Source

divT :: forall a. EuclideanRing a => Tensor a -> Tensor a -> Tensor a

#dot Source

dot :: forall a. Semiring a => Tensor a -> Tensor a -> Tensor a

#dtype Source

dtype :: forall a. Tensor a -> DType

#equal Source

equal :: forall a. Eq a => Tensor a -> Tensor a -> Tensor Boolean

#flatten Source

flatten :: forall a. Tensor a -> Tensor a

#greater Source

greater :: forall a. Tensor a -> Tensor a -> Tensor Boolean

#greaterEqual Source

greaterEqual :: forall a. Tensor a -> Tensor a -> Tensor Boolean

#less Source

less :: forall a. Tensor a -> Tensor a -> Tensor Boolean

#lessEqual Source

lessEqual :: forall a. Tensor a -> Tensor a -> Tensor Boolean

#mulT Source

mulT :: forall a. Semiring a => Tensor a -> Tensor a -> Tensor a

#neg Source

neg :: forall a. Ring a => Tensor a -> Tensor a

#onesLike Source

onesLike :: forall a. Tensor a -> Tensor Number

#rank Source

rank :: forall a. Tensor a -> Int

#reverse Source

reverse :: forall a. Array Int -> Tensor a -> Tensor a

#reduceSum Source

reduceSum :: forall a. Semiring a => Array Int -> Boolean -> Tensor a -> Tensor a

#reduceMax Source

reduceMax :: forall a. Semiring a => Array Int -> Boolean -> Tensor a -> Tensor a

#reduceMean Source

reduceMean :: forall a. Semiring a => Array Int -> Boolean -> Tensor a -> Tensor a

#reshape Source

reshape :: forall a. Shape -> Tensor a -> Tensor a

#shape Source

shape :: forall a. Tensor a -> Shape

#squeeze Source

squeeze :: forall a. Tensor a -> Tensor a

#square Source

square :: forall a. Semiring a => Tensor a -> Tensor a

#toString Source

toString :: forall a. Tensor a -> String

#transpose Source

transpose :: forall a. Tensor a -> Tensor a

#zerosLike Source

zerosLike :: forall a. Tensor a -> Tensor Number