{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeApplications #-}
module Torch.Functional
( module Torch.Functional,
Internal.acos,
Internal.addmv,
Internal.addr,
Internal.allclose,
Internal.argmin,
Internal.asin,
Internal.atan,
Internal.baddbmm,
Internal.bmm,
Internal.conj,
Internal.det,
Internal.dot,
Internal.einsum,
Internal.expm1,
Internal.ger,
Internal.logdet,
Internal.lstsq,
Internal.mv,
Internal.sumWithDimnames,
)
where
import Data.Int
import Foreign.C.Types (CBool (..))
import Foreign.ForeignPtr
import System.IO.Unsafe
import Torch.DType
import Torch.Dimname
import qualified Torch.Functional.Internal as Internal
import Torch.Internal.Cast
import Torch.Internal.Class
import qualified Torch.Internal.Const as ATen
import qualified Torch.Internal.Managed.Cast
import qualified Torch.Internal.Managed.Native as ATen
import qualified Torch.Internal.Managed.Type.Scalar as ATen
import qualified Torch.Internal.Managed.Type.Tensor as ATen
import qualified Torch.Internal.Managed.Type.Tuple as ATen
import qualified Torch.Internal.Type as ATen
import Torch.Scalar
import Torch.Tensor
import Torch.TensorFactories (ones', onesLike)
import Prelude hiding
( acos,
acosh,
all,
any,
asin,
asinh,
atan,
atanh,
ceil,
cos,
cosh,
exp,
floor,
isNaN,
log,
max,
min,
round,
sin,
sinh,
tan,
tanh,
)
import qualified Prelude as P
kOne :: ForeignPtr ATen.Scalar
kOne :: ForeignPtr Scalar
kOne = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ CInt -> IO (ForeignPtr Scalar)
ATen.newScalar_i CInt
1
{-# NOINLINE kOne #-}
instance Num Tensor where
+ :: Tensor -> Tensor -> Tensor
(+) = Tensor -> Tensor -> Tensor
add
(-) = Tensor -> Tensor -> Tensor
sub
* :: Tensor -> Tensor -> Tensor
(*) = Tensor -> Tensor -> Tensor
mul
negate :: Tensor -> Tensor
negate Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.neg_t Tensor
t
abs :: Tensor -> Tensor
abs Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.abs_t Tensor
t
signum :: Tensor -> Tensor
signum Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.sign_t Tensor
t
fromInteger :: Integer -> Tensor
fromInteger Integer
i = forall a. TensorLike a => a -> Tensor
asTensor @Int forall a b. (a -> b) -> a -> b
$ forall a. Num a => Integer -> a
fromInteger @Int Integer
i
instance Eq Tensor where
== :: Tensor -> Tensor -> Bool
(==) Tensor
t Tensor
t' = Tensor -> Bool
all (Tensor
t Tensor -> Tensor -> Tensor
`eq` Tensor
t')
instance Fractional Tensor where
Tensor
a / :: Tensor -> Tensor -> Tensor
/ Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.div_tt Tensor
a Tensor
b
recip :: Tensor -> Tensor
recip Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.reciprocal_t Tensor
t
fromRational :: Rational -> Tensor
fromRational Rational
i = forall a. TensorLike a => a -> Tensor
asTensor @Float forall a b. (a -> b) -> a -> b
$ forall a. Fractional a => Rational -> a
fromRational @Float Rational
i
data Tri = Upper | Lower deriving (Tri -> Tri -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Tri -> Tri -> Bool
$c/= :: Tri -> Tri -> Bool
== :: Tri -> Tri -> Bool
$c== :: Tri -> Tri -> Bool
Eq, Int -> Tri -> ShowS
[Tri] -> ShowS
Tri -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Tri] -> ShowS
$cshowList :: [Tri] -> ShowS
show :: Tri -> String
$cshow :: Tri -> String
showsPrec :: Int -> Tri -> ShowS
$cshowsPrec :: Int -> Tri -> ShowS
Show)
data Reduction = ReduceNone | ReduceMean | ReduceSum deriving (Reduction -> Reduction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reduction -> Reduction -> Bool
$c/= :: Reduction -> Reduction -> Bool
== :: Reduction -> Reduction -> Bool
$c== :: Reduction -> Reduction -> Bool
Eq, Int -> Reduction -> ShowS
[Reduction] -> ShowS
Reduction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reduction] -> ShowS
$cshowList :: [Reduction] -> ShowS
show :: Reduction -> String
$cshow :: Reduction -> String
showsPrec :: Int -> Reduction -> ShowS
$cshowsPrec :: Int -> Reduction -> ShowS
Show)
newtype Dim = Dim Int
data KeepDim = KeepDim | RemoveDim deriving (KeepDim -> KeepDim -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KeepDim -> KeepDim -> Bool
$c/= :: KeepDim -> KeepDim -> Bool
== :: KeepDim -> KeepDim -> Bool
$c== :: KeepDim -> KeepDim -> Bool
Eq, Int -> KeepDim -> ShowS
[KeepDim] -> ShowS
KeepDim -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KeepDim] -> ShowS
$cshowList :: [KeepDim] -> ShowS
show :: KeepDim -> String
$cshow :: KeepDim -> String
showsPrec :: Int -> KeepDim -> ShowS
$cshowsPrec :: Int -> KeepDim -> ShowS
Show)
data CeilMode = Ceil | Floor deriving (CeilMode -> CeilMode -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CeilMode -> CeilMode -> Bool
$c/= :: CeilMode -> CeilMode -> Bool
== :: CeilMode -> CeilMode -> Bool
$c== :: CeilMode -> CeilMode -> Bool
Eq, Int -> CeilMode -> ShowS
[CeilMode] -> ShowS
CeilMode -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CeilMode] -> ShowS
$cshowList :: [CeilMode] -> ShowS
show :: CeilMode -> String
$cshow :: CeilMode -> String
showsPrec :: Int -> CeilMode -> ShowS
$cshowsPrec :: Int -> CeilMode -> ShowS
Show)
instance Castable CeilMode CBool where
cast :: forall r. CeilMode -> (CBool -> IO r) -> IO r
cast CeilMode
Ceil CBool -> IO r
f = CBool -> IO r
f CBool
1
cast CeilMode
Floor CBool -> IO r
f = CBool -> IO r
f CBool
0
uncast :: forall r. CBool -> (CeilMode -> IO r) -> IO r
uncast CBool
0 CeilMode -> IO r
f = CeilMode -> IO r
f CeilMode
Floor
uncast CBool
1 CeilMode -> IO r
f = CeilMode -> IO r
f CeilMode
Ceil
instance Castable Reduction Int64 where
cast :: forall r. Reduction -> (Int64 -> IO r) -> IO r
cast Reduction
ReduceNone Int64 -> IO r
f = Int64 -> IO r
f Int64
0
cast Reduction
ReduceMean Int64 -> IO r
f = Int64 -> IO r
f Int64
1
cast Reduction
ReduceSum Int64 -> IO r
f = Int64 -> IO r
f Int64
2
uncast :: forall r. Int64 -> (Reduction -> IO r) -> IO r
uncast Int64
0 Reduction -> IO r
f = Reduction -> IO r
f Reduction
ReduceNone
uncast Int64
1 Reduction -> IO r
f = Reduction -> IO r
f Reduction
ReduceMean
uncast Int64
_ Reduction -> IO r
f = Reduction -> IO r
f Reduction
ReduceSum
newtype Diag = Diag Int
isUpper :: Tri -> Bool
isUpper Tri
Upper = Bool
True
isUpper Tri
Lower = Bool
False
mean ::
Tensor ->
Tensor
mean :: Tensor -> Tensor
mean Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.mean_t Tensor
t
std ::
Tensor ->
Tensor
std :: Tensor -> Tensor
std Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.std_t Tensor
t
var ::
Tensor ->
Tensor
var :: Tensor -> Tensor
var Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.var_t Tensor
t
sumAll ::
Tensor ->
Tensor
sumAll :: Tensor -> Tensor
sumAll Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.sum_t Tensor
t
abs ::
Tensor ->
Tensor
abs :: Tensor -> Tensor
abs Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.abs_t Tensor
t
frac ::
Tensor ->
Tensor
frac :: Tensor -> Tensor
frac Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.frac_t Tensor
_self
keepdim :: KeepDim -> Bool
keepdim KeepDim
KeepDim = Bool
True
keepdim KeepDim
RemoveDim = Bool
False
argmax ::
Dim ->
KeepDim ->
Tensor ->
Tensor
argmax :: Dim -> KeepDim -> Tensor -> Tensor
argmax (Dim Int
d) KeepDim
k Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> CBool -> IO (ForeignPtr Tensor)
ATen.argmax_tlb Tensor
t Int
d (KeepDim -> Bool
keepdim KeepDim
k)
add ::
Tensor ->
Tensor ->
Tensor
add :: Tensor -> Tensor -> Tensor
add Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.add_tts Tensor
a Tensor
b ForeignPtr Scalar
kOne
mul ::
Tensor ->
Tensor ->
Tensor
mul :: Tensor -> Tensor -> Tensor
mul Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.mul_tt Tensor
a Tensor
b
sub ::
Tensor ->
Tensor ->
Tensor
sub :: Tensor -> Tensor -> Tensor
sub Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.sub_tts Tensor
a Tensor
b ForeignPtr Scalar
kOne
div ::
Tensor ->
Tensor ->
Tensor
div :: Tensor -> Tensor -> Tensor
div Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.div_tt Tensor
a Tensor
b
ceil ::
Tensor ->
Tensor
ceil :: Tensor -> Tensor
ceil Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.ceil_t Tensor
t
floor ::
Tensor ->
Tensor
floor :: Tensor -> Tensor
floor Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.floor_t Tensor
t
min ::
Tensor ->
Tensor
min :: Tensor -> Tensor
min Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.min_t Tensor
t
max ::
Tensor ->
Tensor
max :: Tensor -> Tensor
max Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.max_t Tensor
t
median ::
Tensor ->
Tensor
median :: Tensor -> Tensor
median Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.median_t Tensor
t
addScalar ::
Scalar a =>
a ->
Tensor ->
Tensor
addScalar :: forall a. Scalar a => a -> Tensor -> Tensor
addScalar a
a Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.add_ts Tensor
t a
a
subScalar ::
Scalar a =>
a ->
Tensor ->
Tensor
subScalar :: forall a. Scalar a => a -> Tensor -> Tensor
subScalar a
a Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.sub_ts Tensor
t a
a
mulScalar ::
Scalar a =>
a ->
Tensor ->
Tensor
mulScalar :: forall a. Scalar a => a -> Tensor -> Tensor
mulScalar a
a Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.mul_ts Tensor
t a
a
divScalar ::
Scalar a =>
a ->
Tensor ->
Tensor
divScalar :: forall a. Scalar a => a -> Tensor -> Tensor
divScalar a
a Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.div_ts Tensor
t a
a
matmul ::
Tensor ->
Tensor ->
Tensor
matmul :: Tensor -> Tensor -> Tensor
matmul Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.matmul_tt Tensor
a Tensor
b
embedding ::
Bool ->
Bool ->
Tensor ->
Int ->
Tensor ->
Tensor
embedding :: Bool -> Bool -> Tensor -> Int -> Tensor -> Tensor
embedding Bool
scaleByGradFreq Bool
sparse Tensor
weights Int
paddingIdx Tensor
indices =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5
ForeignPtr Tensor
-> ForeignPtr Tensor
-> Int64
-> CBool
-> CBool
-> IO (ForeignPtr Tensor)
ATen.embedding_ttlbb
Tensor
weights
Tensor
indices
Int
paddingIdx
Bool
scaleByGradFreq
Bool
sparse
embedding' ::
Tensor ->
Tensor ->
Tensor
embedding' :: Tensor -> Tensor -> Tensor
embedding' Tensor
weights Tensor
indices =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5
ForeignPtr Tensor
-> ForeignPtr Tensor
-> Int64
-> CBool
-> CBool
-> IO (ForeignPtr Tensor)
ATen.embedding_ttlbb
Tensor
weights
Tensor
indices
(-Int
1 :: Int)
Bool
False
Bool
False
oneHot ::
Int ->
Tensor ->
Tensor
oneHot :: Int -> Tensor -> Tensor
oneHot Int
numClasses Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.one_hot_tl Tensor
t Int
numClasses
erf ::
Tensor ->
Tensor
erf :: Tensor -> Tensor
erf Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.erf_t Tensor
t
erfc ::
Tensor ->
Tensor
erfc :: Tensor -> Tensor
erfc Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.erfc_t Tensor
t
erfinv ::
Tensor ->
Tensor
erfinv :: Tensor -> Tensor
erfinv Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.erfinv_t Tensor
t
lgamma ::
Tensor ->
Tensor
lgamma :: Tensor -> Tensor
lgamma Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.lgamma_t Tensor
t
digamma ::
Tensor ->
Tensor
digamma :: Tensor -> Tensor
digamma Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.digamma_t Tensor
t
polygamma ::
Int ->
Tensor ->
Tensor
polygamma :: Int -> Tensor -> Tensor
polygamma Int
n Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 Int64 -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.polygamma_lt Int
n Tensor
t
mvlgamma ::
Int ->
Tensor ->
Tensor
mvlgamma :: Int -> Tensor -> Tensor
mvlgamma Int
p Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.mvlgamma_tl Tensor
t Int
p
exp ::
Tensor ->
Tensor
exp :: Tensor -> Tensor
exp Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.exp_t Tensor
t
log1p ::
Tensor -> Tensor
log1p :: Tensor -> Tensor
log1p Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.log1p_t Tensor
t
log2 ::
Tensor ->
Tensor
log2 :: Tensor -> Tensor
log2 Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.log2_t Tensor
t
log ::
Tensor ->
Tensor
log :: Tensor -> Tensor
log Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.log_t Tensor
_self
log10 ::
Tensor ->
Tensor
log10 :: Tensor -> Tensor
log10 Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.log10_t Tensor
t
pow ::
Scalar a =>
a ->
Tensor ->
Tensor
pow :: forall a. Scalar a => a -> Tensor -> Tensor
pow a
s Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.pow_ts Tensor
t a
s
powt ::
Tensor ->
Tensor ->
Tensor
powt :: Tensor -> Tensor -> Tensor
powt Tensor
t Tensor
t' = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.pow_tt Tensor
t Tensor
t'
relu ::
Tensor ->
Tensor
relu :: Tensor -> Tensor
relu Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.relu_t Tensor
t
elu ::
Scalar s =>
s ->
Tensor ->
Tensor
elu :: forall a. Scalar a => a -> Tensor -> Tensor
elu s
a Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.elu_ts Tensor
t s
a
elu' ::
Tensor ->
Tensor
elu' :: Tensor -> Tensor
elu' Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.elu_t Tensor
t
selu ::
Tensor ->
Tensor
selu :: Tensor -> Tensor
selu Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.selu_t Tensor
t
celu ::
Float ->
Tensor ->
Tensor
celu :: Float -> Tensor -> Tensor
celu Float
_alpha Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.celu_ts Tensor
_self Float
_alpha
sigmoid ::
Tensor ->
Tensor
sigmoid :: Tensor -> Tensor
sigmoid Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.sigmoid_t Tensor
t
softmax ::
Dim ->
Tensor ->
Tensor
softmax :: Dim -> Tensor -> Tensor
softmax (Dim Int
d) Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3
ForeignPtr Tensor -> Int64 -> ScalarType -> IO (ForeignPtr Tensor)
ATen.softmax_tls
Tensor
input
Int
d
(Tensor -> DType
dtype Tensor
input)
logSoftmax ::
Dim ->
Tensor ->
Tensor
logSoftmax :: Dim -> Tensor -> Tensor
logSoftmax (Dim Int
d) Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3
ForeignPtr Tensor -> Int64 -> ScalarType -> IO (ForeignPtr Tensor)
ATen.log_softmax_tls
Tensor
input
Int
d
(Tensor -> DType
dtype Tensor
input)
threshold ::
Float ->
Float ->
Tensor ->
Tensor
threshold :: Float -> Float -> Tensor -> Tensor
threshold Float
threshold Float
value Tensor
self =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Scalar -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.threshold_tss Tensor
self Float
threshold Float
value
sin ::
Tensor ->
Tensor
sin :: Tensor -> Tensor
sin Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.sin_t Tensor
t
cos ::
Tensor ->
Tensor
cos :: Tensor -> Tensor
cos Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.cos_t Tensor
t
tan ::
Tensor ->
Tensor
tan :: Tensor -> Tensor
tan Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.tan_t Tensor
t
sinh ::
Tensor ->
Tensor
sinh :: Tensor -> Tensor
sinh Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.sinh_t Tensor
t
cosh ::
Tensor ->
Tensor
cosh :: Tensor -> Tensor
cosh Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.cosh_t Tensor
t
tanh ::
Tensor ->
Tensor
tanh :: Tensor -> Tensor
tanh Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.tanh_t Tensor
t
sqrt ::
Tensor ->
Tensor
sqrt :: Tensor -> Tensor
sqrt Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.sqrt_t Tensor
t
gt ::
Tensor ->
Tensor ->
Tensor
gt :: Tensor -> Tensor -> Tensor
gt Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.gt_tt Tensor
a Tensor
b
>. :: Tensor -> Tensor -> Tensor
(>.) = Tensor -> Tensor -> Tensor
gt
lt ::
Tensor ->
Tensor ->
Tensor
lt :: Tensor -> Tensor -> Tensor
lt Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.lt_tt Tensor
a Tensor
b
<. :: Tensor -> Tensor -> Tensor
(<.) = Tensor -> Tensor -> Tensor
lt
ge ::
Tensor ->
Tensor ->
Tensor
ge :: Tensor -> Tensor -> Tensor
ge Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.ge_tt Tensor
a Tensor
b
>=. :: Tensor -> Tensor -> Tensor
(>=.) = Tensor -> Tensor -> Tensor
ge
le ::
Tensor ->
Tensor ->
Tensor
le :: Tensor -> Tensor -> Tensor
le Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.le_tt Tensor
a Tensor
b
<=. :: Tensor -> Tensor -> Tensor
(<=.) = Tensor -> Tensor -> Tensor
le
eq ::
Tensor ->
Tensor ->
Tensor
eq :: Tensor -> Tensor -> Tensor
eq Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.eq_tt Tensor
a Tensor
b
==. :: Tensor -> Tensor -> Tensor
(==.) = Tensor -> Tensor -> Tensor
eq
take ::
Tensor ->
Tensor ->
Tensor
take :: Tensor -> Tensor -> Tensor
take Tensor
_index Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.take_tt Tensor
_self Tensor
_index
maskedSelect ::
Tensor ->
Tensor ->
Tensor
maskedSelect :: Tensor -> Tensor -> Tensor
maskedSelect Tensor
_mask Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.masked_select_tt Tensor
_self Tensor
_mask
nonzero ::
Tensor ->
Tensor
nonzero :: Tensor -> Tensor
nonzero Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.nonzero_t Tensor
_self
isclose ::
Double ->
Double ->
Bool ->
Tensor ->
Tensor ->
Tensor
isclose :: Double -> Double -> Bool -> Tensor -> Tensor -> Tensor
isclose Double
rtol Double
atol Bool
equalNan Tensor
self Tensor
other = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> ForeignPtr Tensor
-> CDouble
-> CDouble
-> CBool
-> IO (ForeignPtr Tensor)
ATen.isclose_ttddb Tensor
self Tensor
other Double
rtol Double
atol Bool
equalNan
isnan ::
Tensor ->
Tensor
isnan :: Tensor -> Tensor
isnan Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.isnan_t Tensor
t
isNonzero ::
Tensor ->
Bool
isNonzero :: Tensor -> Bool
isNonzero Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO CBool
ATen.is_nonzero_t Tensor
_self
isSameSize ::
Tensor ->
Tensor ->
Bool
isSameSize :: Tensor -> Tensor -> Bool
isSameSize Tensor
self Tensor
other = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO CBool
ATen.is_same_size_tt Tensor
self Tensor
other
isSigned ::
Tensor ->
Bool
isSigned :: Tensor -> Bool
isSigned Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO CBool
ATen.is_signed_t Tensor
t
ne ::
Tensor ->
Tensor ->
Tensor
ne :: Tensor -> Tensor -> Tensor
ne Tensor
a Tensor
b = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.ne_tt Tensor
a Tensor
b
/=. :: Tensor -> Tensor -> Tensor
(/=.) = Tensor -> Tensor -> Tensor
ne
toDType ::
DType ->
Tensor ->
Tensor
toDType :: DType -> Tensor -> Tensor
toDType DType
dtype Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ScalarType -> CBool -> CBool -> IO (ForeignPtr Tensor)
ATen.tensor_to_sbb Tensor
t DType
dtype Bool
False Bool
False
squeezeAll ::
Tensor ->
Tensor
squeezeAll :: Tensor -> Tensor
squeezeAll Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.squeeze_t Tensor
t
squeezeDim ::
Int ->
Tensor ->
Tensor
squeezeDim :: Int -> Tensor -> Tensor
squeezeDim Int
dim Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.squeeze_tl Tensor
t Int
dim
cummax ::
Int ->
Tensor ->
(Tensor, Tensor)
cummax :: Int -> Tensor -> (Tensor, Tensor)
cummax Int
_dim Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor
-> Int64 -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.cummax_tl Tensor
_self Int
_dim
cummin ::
Int ->
Tensor ->
(Tensor, Tensor)
cummin :: Int -> Tensor -> (Tensor, Tensor)
cummin Int
_dim Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor
-> Int64 -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.cummin_tl Tensor
_self Int
_dim
cumprod ::
Int ->
DType ->
Tensor ->
Tensor
cumprod :: Int -> DType -> Tensor -> Tensor
cumprod Int
_dim DType
_dtype Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> ScalarType -> IO (ForeignPtr Tensor)
ATen.cumprod_tls Tensor
_self Int
_dim DType
_dtype
cumsum ::
Int ->
DType ->
Tensor ->
Tensor
cumsum :: Int -> DType -> Tensor -> Tensor
cumsum Int
_dim DType
_dtype Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> ScalarType -> IO (ForeignPtr Tensor)
ATen.cumsum_tls Tensor
_self Int
_dim DType
_dtype
binaryCrossEntropyLoss ::
Reduction ->
Tensor ->
Tensor ->
Tensor ->
Tensor
binaryCrossEntropyLoss :: Reduction -> Tensor -> Tensor -> Tensor -> Tensor
binaryCrossEntropyLoss Reduction
reduction Tensor
target Tensor
weight Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> Int64
-> IO (ForeignPtr Tensor)
ATen.binary_cross_entropy_tttl Tensor
t Tensor
target Tensor
weight Reduction
reduction
binaryCrossEntropyLoss' ::
Tensor ->
Tensor ->
Tensor
binaryCrossEntropyLoss' :: Tensor -> Tensor -> Tensor
binaryCrossEntropyLoss' Tensor
target Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> Int64
-> IO (ForeignPtr Tensor)
ATen.binary_cross_entropy_tttl Tensor
t Tensor
target (Tensor -> Tensor
onesLike Tensor
target) Reduction
ReduceMean
binaryCrossEntropyWithLogits ::
Reduction ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor
binaryCrossEntropyWithLogits :: Reduction -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor
binaryCrossEntropyWithLogits Reduction
reduction Tensor
target Tensor
weight Tensor
pos_weight Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> Int64
-> IO (ForeignPtr Tensor)
ATen.binary_cross_entropy_with_logits_ttttl Tensor
input Tensor
target Tensor
weight Tensor
pos_weight Reduction
reduction
mseLoss ::
Tensor ->
Tensor ->
Tensor
mseLoss :: Tensor -> Tensor -> Tensor
mseLoss Tensor
target Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.mse_loss_ttl Tensor
t Tensor
target Int64
ATen.kMean
nllLoss' ::
Tensor ->
Tensor ->
Tensor
nllLoss' :: Tensor -> Tensor -> Tensor
nllLoss' Tensor
target Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> Int64
-> Int64
-> IO (ForeignPtr Tensor)
ATen.nll_loss_tttll Tensor
t Tensor
target Tensor
weight Reduction
ReduceMean (-Int
100 :: Int)
where
nClass :: Int
nClass = Tensor -> [Int]
shape Tensor
t forall a. [a] -> Int -> a
!! Int
1
weight :: Tensor
weight = DType -> Tensor -> Tensor
toDType (Tensor -> DType
dtype Tensor
t) forall a b. (a -> b) -> a -> b
$ Device -> Tensor -> Tensor
_toDevice (Tensor -> Device
device Tensor
target) forall a b. (a -> b) -> a -> b
$ [Int] -> Tensor
ones' [Int
nClass]
cosineSimilarity ::
Dim ->
Double ->
Tensor ->
Tensor ->
Tensor
cosineSimilarity :: Dim -> Double -> Tensor -> Tensor -> Tensor
cosineSimilarity (Dim Int
dim) Double
eps Tensor
x1 Tensor
x2 =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> CDouble -> IO (ForeignPtr Tensor)
ATen.cosine_similarity_ttld Tensor
x1 Tensor
x2 Int
dim Double
eps
cosineSimilarity' ::
Tensor ->
Tensor ->
Tensor
cosineSimilarity' :: Tensor -> Tensor -> Tensor
cosineSimilarity' Tensor
x1 Tensor
x2 =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> CDouble -> IO (ForeignPtr Tensor)
ATen.cosine_similarity_ttld Tensor
x1 Tensor
x2 (Int
1 :: Int) (Double
1e-8 :: Double)
ctcLoss ::
Bool ->
Int ->
Reduction ->
[Int] ->
[Int] ->
Tensor ->
Tensor ->
Tensor
ctcLoss :: Bool
-> Int -> Reduction -> [Int] -> [Int] -> Tensor -> Tensor -> Tensor
ctcLoss Bool
zeroInfinity Int
blank Reduction
reduction [Int]
inputLengths [Int]
targetLengths Tensor
logProbs Tensor
targets = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> Int64
-> CBool
-> IO (ForeignPtr Tensor)
ATen.ctc_loss_ttllllb Tensor
logProbs Tensor
targets [Int]
inputLengths [Int]
targetLengths Int
blank Reduction
reduction Bool
zeroInfinity
ctcLoss' ::
Reduction ->
[Int] ->
[Int] ->
Tensor ->
Tensor ->
Tensor
ctcLoss' :: Reduction -> [Int] -> [Int] -> Tensor -> Tensor -> Tensor
ctcLoss' Reduction
reduction [Int]
inputLengths [Int]
targetLengths Tensor
logProbs Tensor
targets = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> Int64
-> CBool
-> IO (ForeignPtr Tensor)
ATen.ctc_loss_ttllllb Tensor
logProbs Tensor
targets [Int]
inputLengths [Int]
targetLengths Int
blank Reduction
reduction Bool
zeroInfinity
where
blank :: Int
blank = Int
0 :: Int
zeroInfinity :: Bool
zeroInfinity = Bool
False
dist ::
Float ->
Tensor ->
Tensor ->
Tensor
dist :: Float -> Tensor -> Tensor -> Tensor
dist Float
_p Tensor
_other Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.dist_tts Tensor
_self Tensor
_other Float
_p
hingeEmbeddingLoss ::
Double ->
Reduction ->
Tensor ->
Tensor ->
Tensor
hingeEmbeddingLoss :: Double -> Reduction -> Tensor -> Tensor -> Tensor
hingeEmbeddingLoss Double
margin Reduction
reduction Tensor
target Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr Tensor -> CDouble -> Int64 -> IO (ForeignPtr Tensor)
ATen.hinge_embedding_loss_ttdl Tensor
t Tensor
target Double
margin Reduction
reduction
marginRankingLoss ::
Tensor ->
Tensor ->
Tensor ->
Double ->
Reduction ->
Tensor
marginRankingLoss :: Tensor -> Tensor -> Tensor -> Double -> Reduction -> Tensor
marginRankingLoss Tensor
input1 Tensor
input2 Tensor
target Double
margin Reduction
reduction = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> CDouble
-> Int64
-> IO (ForeignPtr Tensor)
ATen.margin_ranking_loss_tttdl Tensor
input1 Tensor
input2 Tensor
target Double
margin Reduction
reduction
nllLoss2D ::
Reduction ->
Int ->
Tensor ->
Tensor ->
Tensor ->
Tensor
nllLoss2D :: Reduction -> Int -> Tensor -> Tensor -> Tensor -> Tensor
nllLoss2D Reduction
reduction Int
ignoreindex Tensor
input Tensor
target Tensor
weight = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> Int64
-> Int64
-> IO (ForeignPtr Tensor)
ATen.nll_loss2d_tttll Tensor
input Tensor
target Tensor
weight Reduction
reduction Int
ignoreindex
multiMarginLoss ::
Reduction ->
Float ->
Float ->
Tensor ->
Tensor ->
Tensor ->
Tensor
multiMarginLoss :: Reduction -> Float -> Float -> Tensor -> Tensor -> Tensor -> Tensor
multiMarginLoss Reduction
reduction Float
p Float
margin Tensor
input Tensor
target Tensor
weight = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Tensor
-> Int64
-> IO (ForeignPtr Tensor)
ATen.multi_margin_loss_ttsstl Tensor
input Tensor
target Float
p Float
margin Tensor
weight Reduction
reduction
multiLabelMarginLoss ::
Reduction ->
Tensor ->
Tensor ->
Tensor
multiLabelMarginLoss :: Reduction -> Tensor -> Tensor -> Tensor
multiLabelMarginLoss Reduction
reduction Tensor
input Tensor
target = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.multilabel_margin_loss_ttl Tensor
input Tensor
target Reduction
reduction
klDiv ::
Reduction ->
Tensor ->
Tensor ->
Tensor
klDiv :: Reduction -> Tensor -> Tensor -> Tensor
klDiv Reduction
reduction Tensor
self Tensor
target = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.kl_div_ttl Tensor
self Tensor
target Reduction
reduction
smoothL1Loss ::
Reduction ->
Tensor ->
Tensor ->
Tensor
smoothL1Loss :: Reduction -> Tensor -> Tensor -> Tensor
smoothL1Loss Reduction
reduction Tensor
self Tensor
target = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.smooth_l1_loss_ttl Tensor
self Tensor
target Reduction
reduction
softMarginLoss ::
Reduction ->
Tensor ->
Tensor ->
Tensor
softMarginLoss :: Reduction -> Tensor -> Tensor -> Tensor
softMarginLoss Reduction
reduction Tensor
input Tensor
target = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.soft_margin_loss_ttl Tensor
input Tensor
target Reduction
reduction
adaptiveMaxPool1d ::
Int ->
Tensor ->
(Tensor, Tensor)
adaptiveMaxPool1d :: Int -> Tensor -> (Tensor, Tensor)
adaptiveMaxPool1d Int
outputSize Tensor
self =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2
ForeignPtr Tensor
-> ForeignPtr IntArray
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.adaptive_max_pool1d_tl
Tensor
self
Int
outputSize
adaptiveMaxPool2d ::
(Int, Int) ->
Tensor ->
(Tensor, Tensor)
adaptiveMaxPool2d :: (Int, Int) -> Tensor -> (Tensor, Tensor)
adaptiveMaxPool2d (Int, Int)
outputSize Tensor
self =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2
ForeignPtr Tensor
-> ForeignPtr IntArray
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.adaptive_max_pool2d_tl
Tensor
self
(Int, Int)
outputSize
adaptiveMaxPool3d ::
(Int, Int) ->
Tensor ->
(Tensor, Tensor)
adaptiveMaxPool3d :: (Int, Int) -> Tensor -> (Tensor, Tensor)
adaptiveMaxPool3d (Int, Int)
outputSize Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor
-> ForeignPtr IntArray
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.adaptive_max_pool3d_tl Tensor
input (Int, Int)
outputSize
maxPool1dWithIndices ::
Int ->
Int ->
Int ->
Int ->
CeilMode ->
Tensor ->
(Tensor, Tensor)
maxPool1dWithIndices :: Int -> Int -> Int -> Int -> CeilMode -> Tensor -> (Tensor, Tensor)
maxPool1dWithIndices Int
kernelSize Int
stride Int
padding Int
dilation CeilMode
ceilMode Tensor
self =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6
ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.max_pool1d_with_indices_tllllb
Tensor
self
Int
kernelSize
Int
stride
Int
padding
Int
dilation
CeilMode
ceilMode
maxPool1d ::
Int ->
Int ->
Int ->
Int ->
CeilMode ->
Tensor ->
Tensor
maxPool1d :: Int -> Int -> Int -> Int -> CeilMode -> Tensor -> Tensor
maxPool1d Int
kernelSize Int
stride Int
padding Int
dilation CeilMode
ceilMode Tensor
self =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6
ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> CBool
-> IO (ForeignPtr Tensor)
ATen.max_pool1d_tllllb
Tensor
self
Int
kernelSize
Int
stride
Int
padding
Int
dilation
CeilMode
ceilMode
maxPool2d ::
(Int, Int) ->
(Int, Int) ->
(Int, Int) ->
(Int, Int) ->
CeilMode ->
Tensor ->
Tensor
maxPool2d :: (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> CeilMode
-> Tensor
-> Tensor
maxPool2d (Int, Int)
kernelSize (Int, Int)
stride (Int, Int)
padding (Int, Int)
dilation CeilMode
ceilMode Tensor
self =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6
ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> CBool
-> IO (ForeignPtr Tensor)
ATen.max_pool2d_tllllb
Tensor
self
((Int, Int) -> [Int]
asList (Int, Int)
kernelSize)
((Int, Int) -> [Int]
asList (Int, Int)
stride)
((Int, Int) -> [Int]
asList (Int, Int)
padding)
((Int, Int) -> [Int]
asList (Int, Int)
dilation)
CeilMode
ceilMode
where
asList :: (Int, Int) -> [Int]
asList :: (Int, Int) -> [Int]
asList (Int
a0, Int
a1) = [Int
a0, Int
a1]
maxPool3d ::
(Int, Int, Int) ->
(Int, Int, Int) ->
(Int, Int, Int) ->
(Int, Int, Int) ->
CeilMode ->
Tensor ->
Tensor
maxPool3d :: (Int, Int, Int)
-> (Int, Int, Int)
-> (Int, Int, Int)
-> (Int, Int, Int)
-> CeilMode
-> Tensor
-> Tensor
maxPool3d (Int, Int, Int)
kernelSize (Int, Int, Int)
stride (Int, Int, Int)
padding (Int, Int, Int)
dilation CeilMode
ceilMode Tensor
self =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6
ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> CBool
-> IO (ForeignPtr Tensor)
ATen.max_pool3d_tllllb
Tensor
self
(Int, Int, Int)
kernelSize
(Int, Int, Int)
stride
(Int, Int, Int)
padding
(Int, Int, Int)
dilation
CeilMode
ceilMode
maxPool2dDim ::
(Int, Int) ->
(Int, Int) ->
(Int, Int) ->
(Int, Int) ->
CeilMode ->
(Int, Int) ->
(Int, Int)
maxPool2dDim :: (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> CeilMode
-> (Int, Int)
-> (Int, Int)
maxPool2dDim (Int, Int)
kernelSize (Int, Int)
stride (Int, Int)
padding (Int, Int)
dilation CeilMode
ceilMode (Int, Int)
imgDim =
(forall {b} {b}. (Integral b, Integral b) => ((Int, Int) -> b) -> b
calc forall a b. (a, b) -> a
fst, forall {b} {b}. (Integral b, Integral b) => ((Int, Int) -> b) -> b
calc forall a b. (a, b) -> b
snd)
where
trunc :: CeilMode -> a -> b
trunc CeilMode
Ceil = forall a b. (RealFrac a, Integral b) => a -> b
P.ceiling
trunc CeilMode
Floor = forall a b. (RealFrac a, Integral b) => a -> b
P.floor
calc :: ((Int, Int) -> b) -> b
calc (Int, Int) -> b
f' =
let f :: (Int, Int) -> Float
f = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int, Int) -> b
f' :: (Int, Int) -> Float)
in forall {a} {b}. (RealFrac a, Integral b) => CeilMode -> a -> b
trunc CeilMode
ceilMode forall a b. (a -> b) -> a -> b
$
( (Int, Int) -> Float
f (Int, Int)
imgDim
forall a. Num a => a -> a -> a
+ Float
2 forall a. Num a => a -> a -> a
* (Int, Int) -> Float
f (Int, Int)
padding
forall a. Num a => a -> a -> a
- (Int, Int) -> Float
f (Int, Int)
dilation forall a. Num a => a -> a -> a
* ((Int, Int) -> Float
f (Int, Int)
kernelSize forall a. Num a => a -> a -> a
- Float
1)
forall a. Num a => a -> a -> a
- Float
1
)
forall a. Fractional a => a -> a -> a
/ (Int, Int) -> Float
f (Int, Int)
stride
forall a. Num a => a -> a -> a
+ Float
1
avgPool1d ::
Int ->
Int ->
Int ->
CeilMode ->
Bool ->
Tensor ->
Tensor
avgPool1d :: Int -> Int -> Int -> CeilMode -> Bool -> Tensor -> Tensor
avgPool1d Int
kernelSize Int
stride Int
padding CeilMode
ceilMode Bool
countIncludePad Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6
ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> CBool
-> CBool
-> IO (ForeignPtr Tensor)
ATen.avg_pool1d_tlllbb
Tensor
input
Int
kernelSize
Int
stride
Int
padding
CeilMode
ceilMode
Bool
countIncludePad
avgPool1d' ::
Int ->
Int ->
Int ->
Tensor ->
Tensor
avgPool1d' :: Int -> Int -> Int -> Tensor -> Tensor
avgPool1d' Int
kernelSize Int
stride Int
padding = Int -> Int -> Int -> CeilMode -> Bool -> Tensor -> Tensor
avgPool1d Int
kernelSize Int
stride Int
padding CeilMode
Floor Bool
True
adaptiveAvgPool1d ::
Int ->
Tensor ->
Tensor
adaptiveAvgPool1d :: Int -> Tensor -> Tensor
adaptiveAvgPool1d Int
outputSize Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr IntArray -> IO (ForeignPtr Tensor)
ATen.adaptive_avg_pool1d_tl Tensor
input Int
outputSize
adaptiveAvgPool2d ::
(Int, Int) ->
Tensor ->
Tensor
adaptiveAvgPool2d :: (Int, Int) -> Tensor -> Tensor
adaptiveAvgPool2d (Int
outputHeight, Int
outputWidth) Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2
ForeignPtr Tensor -> ForeignPtr IntArray -> IO (ForeignPtr Tensor)
ATen.adaptive_avg_pool2d_tl
Tensor
input
([Int
outputHeight, Int
outputWidth] :: [Int])
adaptiveAvgPool3d ::
(Int, Int, Int) ->
Tensor ->
Tensor
adaptiveAvgPool3d :: (Int, Int, Int) -> Tensor -> Tensor
adaptiveAvgPool3d (Int, Int, Int)
_output_size Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr IntArray -> IO (ForeignPtr Tensor)
ATen.adaptive_avg_pool3d_tl Tensor
_self (Int, Int, Int)
_output_size
inverse ::
Tensor ->
Tensor
inverse :: Tensor -> Tensor
inverse Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.inverse_t Tensor
t
triangularSolve ::
Tensor ->
Bool ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor)
triangularSolve :: Tensor -> Bool -> Bool -> Bool -> Tensor -> (Tensor, Tensor)
triangularSolve Tensor
_A Bool
_upper Bool
_transpose Bool
_unitriangular Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> ForeignPtr Tensor
-> CBool
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.triangular_solve_ttbbb Tensor
_self Tensor
_A Bool
_upper Bool
_transpose Bool
_unitriangular
symeig ::
Bool ->
Tri ->
Tensor ->
(Tensor, Tensor)
symeig :: Bool -> Tri -> Tensor -> (Tensor, Tensor)
symeig Bool
eigenvectors Tri
upper Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> CBool -> CBool -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.symeig_tbb Tensor
t Bool
eigenvectors Bool
boolUpper
where
boolUpper :: Bool
boolUpper = Tri -> Bool
isUpper Tri
upper
eig ::
Bool ->
Tensor ->
(Tensor, Tensor)
eig :: Bool -> Tensor -> (Tensor, Tensor)
eig Bool
eigenvectors Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor
-> CBool -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.eig_tb Tensor
t Bool
eigenvectors
svd ::
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor, Tensor)
svd :: Bool -> Bool -> Tensor -> (Tensor, Tensor, Tensor)
svd Bool
some Bool
compute_uv Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor, Tensor)))
ATen.svd_tbb Tensor
t Bool
some Bool
compute_uv
cholesky ::
Tri ->
Tensor ->
Tensor
cholesky :: Tri -> Tensor -> Tensor
cholesky Tri
upper Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> CBool -> IO (ForeignPtr Tensor)
ATen.cholesky_tb Tensor
t Bool
boolUpper
where
boolUpper :: Bool
boolUpper = Tri -> Bool
isUpper Tri
upper
choleskySolve ::
Tri ->
Tensor ->
Tensor ->
Tensor
choleskySolve :: Tri -> Tensor -> Tensor -> Tensor
choleskySolve Tri
upper Tensor
t1 Tensor
t2 = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> CBool -> IO (ForeignPtr Tensor)
ATen.cholesky_solve_ttb Tensor
t1 Tensor
t2 Bool
boolUpper
where
boolUpper :: Bool
boolUpper = Tri -> Bool
isUpper Tri
upper
solve ::
Tensor ->
Tensor ->
(Tensor, Tensor)
solve :: Tensor -> Tensor -> (Tensor, Tensor)
solve Tensor
b Tensor
a = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor
-> ForeignPtr Tensor
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.solve_tt Tensor
b Tensor
a
choleskyInverse ::
Tri ->
Tensor ->
Tensor
choleskyInverse :: Tri -> Tensor -> Tensor
choleskyInverse Tri
upper Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> CBool -> IO (ForeignPtr Tensor)
ATen.cholesky_inverse_tb Tensor
t Bool
boolUpper
where
boolUpper :: Bool
boolUpper = Tri -> Bool
isUpper Tri
upper
geqrf ::
Tensor ->
(Tensor, Tensor)
geqrf :: Tensor -> (Tensor, Tensor)
geqrf Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.geqrf_t Tensor
t
orgqr ::
Tensor ->
Tensor ->
Tensor
orgqr :: Tensor -> Tensor -> Tensor
orgqr Tensor
b Tensor
a = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.orgqr_tt Tensor
b Tensor
a
ormqr ::
Tensor ->
Tensor ->
Bool ->
Bool ->
Tensor ->
Tensor
ormqr :: Tensor -> Tensor -> Bool -> Bool -> Tensor -> Tensor
ormqr Tensor
_input2 Tensor
_input3 Bool
_left Bool
_transpose Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> CBool
-> CBool
-> IO (ForeignPtr Tensor)
ATen.ormqr_tttbb Tensor
_self Tensor
_input2 Tensor
_input3 Bool
_left Bool
_transpose
luSolve ::
Tensor ->
Tensor ->
Tensor ->
Tensor
luSolve :: Tensor -> Tensor -> Tensor -> Tensor
luSolve Tensor
_LU_data Tensor
_LU_pivots Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.lu_solve_ttt Tensor
_self Tensor
_LU_data Tensor
_LU_pivots
dropout ::
Double ->
Bool ->
Tensor ->
IO Tensor
dropout :: Double -> Bool -> Tensor -> IO Tensor
dropout Double
p Bool
train Tensor
input = forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> CDouble -> CBool -> IO (ForeignPtr Tensor)
ATen.dropout_tdb Tensor
input Double
p Bool
train
featureDropout ::
Double ->
Bool ->
Tensor ->
IO Tensor
featureDropout :: Double -> Bool -> Tensor -> IO Tensor
featureDropout Double
p Bool
train Tensor
input =
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> CDouble -> CBool -> IO (ForeignPtr Tensor)
ATen.feature_dropout_tdb Tensor
input Double
p Bool
train
alphaDropout ::
Double ->
Bool ->
Tensor ->
IO Tensor
alphaDropout :: Double -> Bool -> Tensor -> IO Tensor
alphaDropout Double
p Bool
train Tensor
input =
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> CDouble -> CBool -> IO (ForeignPtr Tensor)
ATen.alpha_dropout_tdb Tensor
input Double
p Bool
train
featureAlphaDropout ::
Double ->
Bool ->
Tensor ->
IO Tensor
featureAlphaDropout :: Double -> Bool -> Tensor -> IO Tensor
featureAlphaDropout Double
p Bool
train Tensor
input =
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> CDouble -> CBool -> IO (ForeignPtr Tensor)
ATen.feature_alpha_dropout_tdb Tensor
input Double
p Bool
train
bitwiseNot ::
Tensor ->
Tensor
bitwiseNot :: Tensor -> Tensor
bitwiseNot Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.bitwise_not_t Tensor
input
logicalNot ::
Tensor ->
Tensor
logicalNot :: Tensor -> Tensor
logicalNot Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.logical_not_t Tensor
t
logicalXor ::
Tensor ->
Tensor ->
Tensor
logicalXor :: Tensor -> Tensor -> Tensor
logicalXor Tensor
self Tensor
other = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.logical_xor_tt Tensor
self Tensor
other
logicalAnd ::
Tensor ->
Tensor ->
Tensor
logicalAnd :: Tensor -> Tensor -> Tensor
logicalAnd Tensor
self Tensor
other = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.logical_and_tt Tensor
self Tensor
other
logicalOr ::
Tensor ->
Tensor ->
Tensor
logicalOr :: Tensor -> Tensor -> Tensor
logicalOr Tensor
self Tensor
other = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.logical_or_tt Tensor
self Tensor
other
cat ::
Dim ->
[Tensor] ->
Tensor
cat :: Dim -> [Tensor] -> Tensor
cat (Dim Int
d) [Tensor]
tensors = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr TensorList -> Int64 -> IO (ForeignPtr Tensor)
ATen.cat_ll [Tensor]
tensors Int
d
index ::
[Tensor] ->
Tensor ->
Tensor
index :: [Tensor] -> Tensor -> Tensor
index [Tensor]
_indices Tensor
_self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor
-> ForeignPtr (C10List (C10Optional Tensor))
-> IO (ForeignPtr Tensor)
ATen.index_tl Tensor
_self [Tensor]
_indices
indexCopy ::
Int ->
Tensor ->
Tensor ->
Tensor ->
Tensor
indexCopy :: Int -> Tensor -> Tensor -> Tensor -> Tensor
indexCopy Int
dim Tensor
index Tensor
source Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> Int64
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> IO (ForeignPtr Tensor)
ATen.index_copy_tltt Tensor
t Int
dim Tensor
index Tensor
source
indexCopyWithDimname ::
Dimname ->
Tensor ->
Tensor ->
Tensor ->
Tensor
indexCopyWithDimname :: Dimname -> Tensor -> Tensor -> Tensor -> Tensor
indexCopyWithDimname Dimname
dim Tensor
index Tensor
source Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr Dimname
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> IO (ForeignPtr Tensor)
ATen.index_copy_tntt Tensor
t Dimname
dim Tensor
index Tensor
source
indexPut ::
Bool ->
[Tensor] ->
Tensor ->
Tensor ->
Tensor
indexPut :: Bool -> [Tensor] -> Tensor -> Tensor -> Tensor
indexPut Bool
accumulate [Tensor]
indices Tensor
values Tensor
self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr (C10List (C10Optional Tensor))
-> ForeignPtr Tensor
-> CBool
-> IO (ForeignPtr Tensor)
ATen.index_put_tltb Tensor
self [Tensor]
indices Tensor
values Bool
accumulate
chunk ::
Int ->
Dim ->
Tensor ->
[Tensor]
chunk :: Int -> Dim -> Tensor -> [Tensor]
chunk Int
chunks (Dim Int
d) Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> Int64 -> IO (ForeignPtr TensorList)
ATen.chunk_tll Tensor
input Int
chunks Int
d
clamp ::
Float ->
Float ->
Tensor ->
Tensor
clamp :: Float -> Float -> Tensor -> Tensor
clamp Float
min Float
max Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Scalar -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.clamp_tss Tensor
input Float
min Float
max
clampMax ::
Float ->
Tensor ->
Tensor
clampMax :: Float -> Tensor -> Tensor
clampMax Float
max Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.clamp_max_ts Tensor
input Float
max
clampMin ::
Float ->
Tensor ->
Tensor
clampMin :: Float -> Tensor -> Tensor
clampMin Float
min Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.clamp_min_ts Tensor
input Float
min
cudnnIsAcceptable ::
Tensor ->
Bool
cudnnIsAcceptable :: Tensor -> Bool
cudnnIsAcceptable Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO CBool
ATen.cudnn_is_acceptable_t Tensor
input
constantPadNd1d ::
[Int] ->
Float ->
Tensor ->
Tensor
constantPadNd1d :: [Int] -> Float -> Tensor -> Tensor
constantPadNd1d [Int]
padding Float
value Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3
ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr Scalar
-> IO (ForeignPtr Tensor)
ATen.constant_pad_nd_tls
Tensor
input
[Int]
padding
Float
value
conv1d ::
Tensor ->
Tensor ->
Int ->
Int ->
Int ->
Int ->
Tensor ->
Tensor
conv1d :: Tensor -> Tensor -> Int -> Int -> Int -> Int -> Tensor -> Tensor
conv1d Tensor
weight Tensor
bias Int
stride Int
padding Int
dilation Int
groups Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> IO (ForeignPtr Tensor)
ATen.conv1d_tttllll
Tensor
input
Tensor
weight
Tensor
bias
Int
stride
Int
padding
Int
dilation
Int
groups
conv1d' ::
Tensor ->
Tensor ->
Int ->
Int ->
Tensor ->
Tensor
conv1d' :: Tensor -> Tensor -> Int -> Int -> Tensor -> Tensor
conv1d' Tensor
weight Tensor
bias Int
stride Int
padding = Tensor -> Tensor -> Int -> Int -> Int -> Int -> Tensor -> Tensor
conv1d Tensor
weight Tensor
bias Int
stride Int
padding Int
1 Int
1
conv2d ::
Tensor ->
Tensor ->
(Int, Int) ->
(Int, Int) ->
(Int, Int) ->
Int ->
Tensor ->
Tensor
conv2d :: Tensor
-> Tensor
-> (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> Int
-> Tensor
-> Tensor
conv2d Tensor
weight Tensor
bias (Int
stride0, Int
stride1) (Int
padding0, Int
padding1) (Int
dilation0, Int
dilation1) Int
groups Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> IO (ForeignPtr Tensor)
ATen.conv2d_tttllll
Tensor
input
Tensor
weight
Tensor
bias
([Int
stride0, Int
stride1] :: [Int])
([Int
padding0, Int
padding1] :: [Int])
([Int
dilation0, Int
dilation1] :: [Int])
Int
groups
conv2d' ::
Tensor ->
Tensor ->
(Int, Int) ->
(Int, Int) ->
Tensor ->
Tensor
conv2d' :: Tensor -> Tensor -> (Int, Int) -> (Int, Int) -> Tensor -> Tensor
conv2d' Tensor
weight Tensor
bias (Int, Int)
stride (Int, Int)
padding =
Tensor
-> Tensor
-> (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> Int
-> Tensor
-> Tensor
conv2d
Tensor
weight
Tensor
bias
(Int, Int)
stride
(Int, Int)
padding
(Int
1, Int
1)
(Int
1 :: Int)
conv3d ::
Tensor ->
Tensor ->
(Int, Int, Int) ->
(Int, Int, Int) ->
(Int, Int, Int) ->
Int ->
Tensor ->
Tensor
conv3d :: Tensor
-> Tensor
-> (Int, Int, Int)
-> (Int, Int, Int)
-> (Int, Int, Int)
-> Int
-> Tensor
-> Tensor
conv3d Tensor
weight Tensor
bias (Int
stride0, Int
stride1, Int
stride2) (Int
padding0, Int
padding1, Int
padding2) (Int
dilation0, Int
dilation1, Int
dilation2) Int
groups Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> IO (ForeignPtr Tensor)
ATen.conv3d_tttllll
Tensor
input
Tensor
weight
Tensor
bias
([Int
stride0, Int
stride1, Int
stride2] :: [Int])
([Int
padding0, Int
padding1, Int
padding2] :: [Int])
([Int
dilation0, Int
dilation1, Int
dilation2] :: [Int])
Int
groups
conv3d' ::
Tensor ->
Tensor ->
(Int, Int, Int) ->
(Int, Int, Int) ->
Tensor ->
Tensor
conv3d' :: Tensor
-> Tensor -> (Int, Int, Int) -> (Int, Int, Int) -> Tensor -> Tensor
conv3d' Tensor
weight Tensor
bias (Int, Int, Int)
stride (Int, Int, Int)
padding =
Tensor
-> Tensor
-> (Int, Int, Int)
-> (Int, Int, Int)
-> (Int, Int, Int)
-> Int
-> Tensor
-> Tensor
conv3d
Tensor
weight
Tensor
bias
(Int, Int, Int)
stride
(Int, Int, Int)
padding
(Int
1, Int
1, Int
1)
(Int
1 :: Int)
convTranspose1d ::
Tensor ->
Tensor ->
Int ->
Int ->
Int ->
Int ->
Tensor ->
Tensor
convTranspose1d :: Tensor -> Tensor -> Int -> Int -> Int -> Int -> Tensor -> Tensor
convTranspose1d Tensor
weight Tensor
bias Int
stride Int
padding Int
outPadding Int
groups Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> IO (ForeignPtr Tensor)
ATen.conv_transpose1d_tttllll
Tensor
input
Tensor
weight
Tensor
bias
(Int
stride :: Int)
(Int
padding :: Int)
(Int
outPadding :: Int)
Int
groups
convTranspose1d' ::
Tensor ->
Tensor ->
Int ->
Int ->
Tensor ->
Tensor
convTranspose1d' :: Tensor -> Tensor -> Int -> Int -> Tensor -> Tensor
convTranspose1d' Tensor
weight Tensor
bias Int
stride Int
padding =
Tensor -> Tensor -> Int -> Int -> Int -> Int -> Tensor -> Tensor
convTranspose1d
Tensor
weight
Tensor
bias
Int
stride
Int
padding
Int
0
(Int
1 :: Int)
convTranspose2d ::
Tensor ->
Tensor ->
(Int, Int) ->
(Int, Int) ->
(Int, Int) ->
Int ->
Tensor ->
Tensor
convTranspose2d :: Tensor
-> Tensor
-> (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> Int
-> Tensor
-> Tensor
convTranspose2d Tensor
weight Tensor
bias (Int
stride0, Int
stride1) (Int
padding0, Int
padding1) (Int
outPadding0, Int
outPadding1) Int
groups Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> IO (ForeignPtr Tensor)
ATen.conv_transpose2d_tttllll
Tensor
input
Tensor
weight
Tensor
bias
([Int
stride0, Int
stride1] :: [Int])
([Int
padding0, Int
padding1] :: [Int])
([Int
outPadding0, Int
outPadding1] :: [Int])
Int
groups
convTranspose2d' ::
Tensor ->
Tensor ->
(Int, Int) ->
(Int, Int) ->
Tensor ->
Tensor
convTranspose2d' :: Tensor -> Tensor -> (Int, Int) -> (Int, Int) -> Tensor -> Tensor
convTranspose2d' Tensor
weight Tensor
bias (Int, Int)
stride (Int, Int)
padding =
Tensor
-> Tensor
-> (Int, Int)
-> (Int, Int)
-> (Int, Int)
-> Int
-> Tensor
-> Tensor
convTranspose2d
Tensor
weight
Tensor
bias
(Int, Int)
stride
(Int, Int)
padding
(Int
0, Int
0)
(Int
1 :: Int)
convTranspose3d ::
Tensor ->
Tensor ->
(Int, Int, Int) ->
(Int, Int, Int) ->
(Int, Int, Int) ->
Int ->
Tensor ->
Tensor
convTranspose3d :: Tensor
-> Tensor
-> (Int, Int, Int)
-> (Int, Int, Int)
-> (Int, Int, Int)
-> Int
-> Tensor
-> Tensor
convTranspose3d Tensor
weight Tensor
bias (Int
stride0, Int
stride1, Int
stride2) (Int
padding0, Int
padding1, Int
padding2) (Int
outPadding0, Int
outPadding1, Int
outPadding2) Int
groups Tensor
input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y
cast7
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> ForeignPtr IntArray
-> Int64
-> IO (ForeignPtr Tensor)
ATen.conv_transpose3d_tttllll
Tensor
input
Tensor
weight
Tensor
bias
([Int
stride0, Int
stride1, Int
stride2] :: [Int])
([Int
padding0, Int
padding1, Int
padding2] :: [Int])
([Int
outPadding0, Int
outPadding1, Int
outPadding2] :: [Int])
Int
groups
convTranspose3d' ::
Tensor ->
Tensor ->
(Int, Int, Int) ->
(Int, Int, Int) ->
Tensor ->
Tensor
convTranspose3d' :: Tensor
-> Tensor -> (Int, Int, Int) -> (Int, Int, Int) -> Tensor -> Tensor
convTranspose3d' Tensor
weight Tensor
bias (Int, Int, Int)
stride (Int, Int, Int)
padding =
Tensor
-> Tensor
-> (Int, Int, Int)
-> (Int, Int, Int)
-> (Int, Int, Int)
-> Int
-> Tensor
-> Tensor
convTranspose3d
Tensor
weight
Tensor
bias
(Int, Int, Int)
stride
(Int, Int, Int)
padding
(Int
0, Int
0, Int
0)
(Int
1 :: Int)
sign ::
Tensor ->
Tensor
sign :: Tensor -> Tensor
sign Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.sign_t Tensor
t
transpose ::
Dim ->
Dim ->
Tensor ->
Tensor
transpose :: Dim -> Dim -> Tensor -> Tensor
transpose (Dim Int
d1) (Dim Int
d2) Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> Int64 -> IO (ForeignPtr Tensor)
ATen.transpose_tll Tensor
t Int
d1 Int
d2
transpose2D ::
Tensor ->
Tensor
transpose2D :: Tensor -> Tensor
transpose2D = Dim -> Dim -> Tensor -> Tensor
transpose (Int -> Dim
Dim Int
0) (Int -> Dim
Dim Int
1)
diag ::
Diag ->
Tensor ->
Tensor
diag :: Diag -> Tensor -> Tensor
diag (Diag Int
index) Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.tensor_diag_l Tensor
t Int
index
diagEmbed ::
Diag ->
Dim ->
Dim ->
Tensor ->
Tensor
diagEmbed :: Diag -> Dim -> Dim -> Tensor -> Tensor
diagEmbed (Diag Int
offset) (Dim Int
dim1) (Dim Int
dim2) Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> Int64 -> Int64 -> Int64 -> IO (ForeignPtr Tensor)
ATen.diag_embed_tlll Tensor
t Int
offset Int
dim1 Int
dim2
diagflat ::
Diag ->
Tensor ->
Tensor
diagflat :: Diag -> Tensor -> Tensor
diagflat (Diag Int
offset) Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.diagflat_tl Tensor
t Int
offset
diagonal ::
Diag ->
Dim ->
Dim ->
Tensor ->
Tensor
diagonal :: Diag -> Dim -> Dim -> Tensor -> Tensor
diagonal (Diag Int
offset) (Dim Int
dim1) (Dim Int
dim2) Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> Int64 -> Int64 -> Int64 -> IO (ForeignPtr Tensor)
ATen.diagonal_tlll Tensor
t Int
offset Int
dim1 Int
dim2
all ::
Tensor ->
Bool
all :: Tensor -> Bool
all Tensor
t = Tensor -> Int
toInt (forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.all_t Tensor
t) forall a. Eq a => a -> a -> Bool
== Int
1
any ::
Tensor ->
Bool
any :: Tensor -> Bool
any Tensor
t = Tensor -> Int
toInt (forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.any_t Tensor
t) forall a. Eq a => a -> a -> Bool
== Int
1
allDim ::
Dim ->
Bool ->
Tensor ->
Tensor
allDim :: Dim -> Bool -> Tensor -> Tensor
allDim (Dim Int
d) Bool
keepdim Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> CBool -> IO (ForeignPtr Tensor)
ATen.all_tlb Tensor
t Int
d Bool
keepdim
anyDim ::
Dim ->
Bool ->
Tensor ->
Tensor
anyDim :: Dim -> Bool -> Tensor -> Tensor
anyDim (Dim Int
d) Bool
keepdim Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> CBool -> IO (ForeignPtr Tensor)
ATen.any_tlb Tensor
t Int
d Bool
keepdim
permute ::
[Int] ->
Tensor ->
Tensor
permute :: [Int] -> Tensor -> Tensor
permute [Int]
dims Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr IntArray -> IO (ForeignPtr Tensor)
ATen.tensor_permute_l Tensor
t [Int]
dims
expand ::
Tensor ->
Bool ->
[Int] ->
Tensor
expand :: Tensor -> Bool -> [Int] -> Tensor
expand Tensor
t Bool
someBool [Int]
dims = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr IntArray -> CBool -> IO (ForeignPtr Tensor)
ATen.tensor_expand_lb Tensor
t [Int]
dims Bool
someBool
flatten ::
Dim ->
Dim ->
Tensor ->
Tensor
flatten :: Dim -> Dim -> Tensor -> Tensor
flatten (Dim Int
startDim) (Dim Int
endDim) Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> Int64 -> IO (ForeignPtr Tensor)
ATen.flatten_tll Tensor
t Int
startDim Int
endDim
flattenAll ::
Tensor ->
Tensor
flattenAll :: Tensor -> Tensor
flattenAll Tensor
t =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> Int64 -> IO (ForeignPtr Tensor)
ATen.flatten_tll Tensor
t (Int
0 :: Int) (-Int
1 :: Int)
lstm ::
Tensor ->
[Tensor] ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
Bool ->
(Tensor, Tensor, Tensor)
lstm :: Tensor
-> [Tensor]
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> Bool
-> (Tensor, Tensor, Tensor)
lstm Tensor
_input [Tensor]
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr TensorList
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor, Tensor)))
ATen.lstm_tllbldbbb Tensor
_input [Tensor]
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first
lstm' ::
Tensor ->
[Tensor] ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor, Tensor)
lstm' :: Tensor
-> [Tensor]
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> Tensor
-> (Tensor, Tensor, Tensor)
lstm' Tensor
_batch_sizes [Tensor]
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Tensor
_data = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr TensorList
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor, Tensor)))
ATen.lstm_ttllbldbb Tensor
_data Tensor
_batch_sizes [Tensor]
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional
gru ::
Tensor ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor)
gru :: Tensor
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> Bool
-> Tensor
-> (Tensor, Tensor)
gru Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first Tensor
_input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.gru_ttlbldbbb Tensor
_input Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first
gru' ::
Tensor ->
Tensor ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor)
gru' :: Tensor
-> Tensor
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> Tensor
-> (Tensor, Tensor)
gru' Tensor
_batch_sizes Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Tensor
_data = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.gru_tttlbldbb Tensor
_data Tensor
_batch_sizes Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional
rnnTanh ::
Tensor ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor)
rnnTanh :: Tensor
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> Bool
-> Tensor
-> (Tensor, Tensor)
rnnTanh Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first Tensor
_input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.rnn_tanh_ttlbldbbb Tensor
_input Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first
rnnTanh' ::
Tensor ->
Tensor ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor)
rnnTanh' :: Tensor
-> Tensor
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> Tensor
-> (Tensor, Tensor)
rnnTanh' Tensor
_batch_sizes Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Tensor
_data = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.rnn_tanh_tttlbldbb Tensor
_data Tensor
_batch_sizes Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional
rnnRelu ::
Tensor ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor)
rnnRelu :: Tensor
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> Bool
-> Tensor
-> (Tensor, Tensor)
rnnRelu Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first Tensor
_input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.rnn_relu_ttlbldbbb Tensor
_input Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional Bool
_batch_first
rnnRelu' ::
Tensor ->
Tensor ->
Tensor ->
[Tensor] ->
Bool ->
Int ->
Double ->
Bool ->
Bool ->
(Tensor, Tensor)
rnnRelu' :: Tensor
-> Tensor
-> Tensor
-> [Tensor]
-> Bool
-> Int
-> Double
-> Bool
-> Bool
-> (Tensor, Tensor)
rnnRelu' Tensor
_data Tensor
_batch_sizes Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr TensorList
-> CBool
-> Int64
-> CDouble
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.rnn_relu_tttlbldbb Tensor
_data Tensor
_batch_sizes Tensor
_hx [Tensor]
_params Bool
_has_biases Int
_num_layers Double
_dropout Bool
_train Bool
_bidirectional
lstmCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
(Tensor, Tensor) ->
Tensor ->
(Tensor, Tensor)
lstmCell :: Tensor
-> Tensor
-> Tensor
-> Tensor
-> (Tensor, Tensor)
-> Tensor
-> (Tensor, Tensor)
lstmCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh (Tensor
_hx, Tensor
_cx) Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6
ForeignPtr Tensor
-> ForeignPtr TensorList
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.lstm_cell_tltttt
Tensor
_input
([Tensor
_hx, Tensor
_cx] :: [Tensor])
Tensor
_w_ih
Tensor
_w_hh
Tensor
_b_ih
Tensor
_b_hh
gruCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor
gruCell :: Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor
gruCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_hx Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> IO (ForeignPtr Tensor)
ATen.gru_cell_tttttt
Tensor
_input
Tensor
_hx
Tensor
_w_ih
Tensor
_w_hh
Tensor
_b_ih
Tensor
_b_hh
rnnTanhCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor
rnnTanhCell :: Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor
rnnTanhCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_hx Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> IO (ForeignPtr Tensor)
ATen.rnn_tanh_cell_tttttt Tensor
_input Tensor
_hx Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh
rnnReluCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor
rnnReluCell :: Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor
rnnReluCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_hx Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> IO y
cast6 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> IO (ForeignPtr Tensor)
ATen.rnn_relu_cell_tttttt Tensor
_input Tensor
_hx Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh
quantizedLstmCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Float ->
Float ->
Float ->
Float ->
(Tensor, Tensor) ->
Tensor ->
(Tensor, Tensor)
quantizedLstmCell :: Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Float
-> Float
-> Float
-> Float
-> (Tensor, Tensor)
-> Tensor
-> (Tensor, Tensor)
quantizedLstmCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_packed_ih Tensor
_packed_hh Tensor
_col_offsets_ih Tensor
_col_offsets_hh Float
_scale_ih Float
_scale_hh Float
_zero_point_ih Float
_zero_point_hh (Tensor
_hx, Tensor
_cx) Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
x9 cx9 x10 cx10 x11 cx11 x12 cx12 x13 cx13 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable x9 cx9, Castable x10 cx10,
Castable x11 cx11, Castable x12 cx12, Castable x13 cx13,
Castable y cy) =>
(ca
-> cx1
-> cx2
-> cx3
-> cx4
-> cx5
-> cx6
-> cx7
-> cx8
-> cx9
-> cx10
-> cx11
-> cx12
-> cx13
-> IO cy)
-> a
-> x1
-> x2
-> x3
-> x4
-> x5
-> x6
-> x7
-> x8
-> x9
-> x10
-> x11
-> x12
-> x13
-> IO y
cast14
ForeignPtr Tensor
-> ForeignPtr TensorList
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.quantized_lstm_cell_tlttttttttssss
Tensor
_input
([Tensor
_hx, Tensor
_cx] :: [Tensor])
Tensor
_w_ih
Tensor
_w_hh
Tensor
_b_ih
Tensor
_b_hh
Tensor
_packed_ih
Tensor
_packed_hh
Tensor
_col_offsets_ih
Tensor
_col_offsets_hh
Float
_scale_ih
Float
_scale_hh
Float
_zero_point_ih
Float
_zero_point_hh
quantizedGruCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Float ->
Float ->
Float ->
Float ->
Tensor ->
Tensor ->
Tensor
quantizedGruCell :: Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Float
-> Float
-> Float
-> Float
-> Tensor
-> Tensor
-> Tensor
quantizedGruCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_packed_ih Tensor
_packed_hh Tensor
_col_offsets_ih Tensor
_col_offsets_hh Float
_scale_ih Float
_scale_hh Float
_zero_point_ih Float
_zero_point_hh Tensor
_hx Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
x9 cx9 x10 cx10 x11 cx11 x12 cx12 x13 cx13 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable x9 cx9, Castable x10 cx10,
Castable x11 cx11, Castable x12 cx12, Castable x13 cx13,
Castable y cy) =>
(ca
-> cx1
-> cx2
-> cx3
-> cx4
-> cx5
-> cx6
-> cx7
-> cx8
-> cx9
-> cx10
-> cx11
-> cx12
-> cx13
-> IO cy)
-> a
-> x1
-> x2
-> x3
-> x4
-> x5
-> x6
-> x7
-> x8
-> x9
-> x10
-> x11
-> x12
-> x13
-> IO y
cast14 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> IO (ForeignPtr Tensor)
ATen.quantized_gru_cell_ttttttttttssss Tensor
_input Tensor
_hx Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_packed_ih Tensor
_packed_hh Tensor
_col_offsets_ih Tensor
_col_offsets_hh Float
_scale_ih Float
_scale_hh Float
_zero_point_ih Float
_zero_point_hh
quantizedRnnReluCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Float ->
Float ->
Float ->
Float ->
Tensor ->
Tensor ->
Tensor
quantizedRnnReluCell :: Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Float
-> Float
-> Float
-> Float
-> Tensor
-> Tensor
-> Tensor
quantizedRnnReluCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_packed_ih Tensor
_packed_hh Tensor
_col_offsets_ih Tensor
_col_offsets_hh Float
_scale_ih Float
_scale_hh Float
_zero_point_ih Float
_zero_point_hh Tensor
_hx Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
x9 cx9 x10 cx10 x11 cx11 x12 cx12 x13 cx13 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable x9 cx9, Castable x10 cx10,
Castable x11 cx11, Castable x12 cx12, Castable x13 cx13,
Castable y cy) =>
(ca
-> cx1
-> cx2
-> cx3
-> cx4
-> cx5
-> cx6
-> cx7
-> cx8
-> cx9
-> cx10
-> cx11
-> cx12
-> cx13
-> IO cy)
-> a
-> x1
-> x2
-> x3
-> x4
-> x5
-> x6
-> x7
-> x8
-> x9
-> x10
-> x11
-> x12
-> x13
-> IO y
cast14 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> IO (ForeignPtr Tensor)
ATen.quantized_rnn_relu_cell_ttttttttttssss Tensor
_input Tensor
_hx Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_packed_ih Tensor
_packed_hh Tensor
_col_offsets_ih Tensor
_col_offsets_hh Float
_scale_ih Float
_scale_hh Float
_zero_point_ih Float
_zero_point_hh
quantizedRnnTanhCell ::
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Tensor ->
Float ->
Float ->
Float ->
Float ->
Tensor ->
Tensor ->
Tensor
quantizedRnnTanhCell :: Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Tensor
-> Float
-> Float
-> Float
-> Float
-> Tensor
-> Tensor
-> Tensor
quantizedRnnTanhCell Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_packed_ih Tensor
_packed_hh Tensor
_col_offsets_ih Tensor
_col_offsets_hh Float
_scale_ih Float
_scale_hh Float
_zero_point_ih Float
_zero_point_hh Tensor
_hx Tensor
_input =
forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
x9 cx9 x10 cx10 x11 cx11 x12 cx12 x13 cx13 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable x9 cx9, Castable x10 cx10,
Castable x11 cx11, Castable x12 cx12, Castable x13 cx13,
Castable y cy) =>
(ca
-> cx1
-> cx2
-> cx3
-> cx4
-> cx5
-> cx6
-> cx7
-> cx8
-> cx9
-> cx10
-> cx11
-> cx12
-> cx13
-> IO cy)
-> a
-> x1
-> x2
-> x3
-> x4
-> x5
-> x6
-> x7
-> x8
-> x9
-> x10
-> x11
-> x12
-> x13
-> IO y
cast14 ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> ForeignPtr Scalar
-> IO (ForeignPtr Tensor)
ATen.quantized_rnn_tanh_cell_ttttttttttssss Tensor
_input Tensor
_hx Tensor
_w_ih Tensor
_w_hh Tensor
_b_ih Tensor
_b_hh Tensor
_packed_ih Tensor
_packed_hh Tensor
_col_offsets_ih Tensor
_col_offsets_hh Float
_scale_ih Float
_scale_hh Float
_zero_point_ih Float
_zero_point_hh
softShrink ::
Float ->
Tensor ->
Tensor
softShrink :: Float -> Tensor -> Tensor
softShrink Float
lambda Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.softshrink_ts Tensor
input Float
lambda
stack ::
Dim ->
[Tensor] ->
Tensor
stack :: Dim -> [Tensor] -> Tensor
stack (Dim Int
d) [Tensor]
tensors = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr TensorList -> Int64 -> IO (ForeignPtr Tensor)
ATen.stack_ll [Tensor]
tensors Int
d
sumDim ::
Dim ->
KeepDim ->
DType ->
Tensor ->
Tensor
sumDim :: Dim -> KeepDim -> DType -> Tensor -> Tensor
sumDim (Dim Int
d) KeepDim
k DType
dtype Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr IntArray
-> CBool
-> ScalarType
-> IO (ForeignPtr Tensor)
ATen.sum_tlbs Tensor
input Int
d (KeepDim -> Bool
keepdim KeepDim
k) DType
dtype
topK ::
Int ->
Dim ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor)
topK :: Int -> Dim -> Bool -> Bool -> Tensor -> (Tensor, Tensor)
topK Int
k (Dim Int
d) Bool
largest Bool
sorted Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> Int64
-> Int64
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.topk_tllbb Tensor
input Int
k Int
d Bool
largest Bool
sorted
logsumexp ::
Bool ->
Int ->
Tensor ->
Tensor
logsumexp :: Bool -> Int -> Tensor -> Tensor
logsumexp Bool
keepdim Int
dim Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr IntArray -> CBool -> IO (ForeignPtr Tensor)
ATen.logsumexp_tlb Tensor
t Int
dim Bool
keepdim
triu ::
Diag ->
Tensor ->
Tensor
triu :: Diag -> Tensor -> Tensor
triu (Diag Int
diagonal) Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.triu_tl Tensor
input Int
diagonal
tril ::
Diag ->
Tensor ->
Tensor
tril :: Diag -> Tensor -> Tensor
tril (Diag Int
diagonal) Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.tril_tl Tensor
input Int
diagonal
trunc ::
Tensor ->
Tensor
trunc :: Tensor -> Tensor
trunc Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.trunc_t Tensor
input
uniqueDim ::
Int ->
Bool ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor, Tensor)
uniqueDim :: Int -> Bool -> Bool -> Bool -> Tensor -> (Tensor, Tensor, Tensor)
uniqueDim Int
dim Bool
sorted Bool
returnInverse Bool
returnCounts Tensor
self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> cx4 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> IO y
cast5 ForeignPtr Tensor
-> Int64
-> CBool
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor, Tensor)))
ATen.unique_dim_tlbbb Tensor
self Int
dim Bool
sorted Bool
returnInverse Bool
returnCounts
uniqueConsecutive ::
Bool ->
Bool ->
Int ->
Tensor ->
(Tensor, Tensor, Tensor)
uniqueConsecutive :: Bool -> Bool -> Int -> Tensor -> (Tensor, Tensor, Tensor)
uniqueConsecutive Bool
returnInverse Bool
returnCounts Int
dim Tensor
self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> CBool
-> CBool
-> Int64
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor, Tensor)))
ATen.unique_consecutive_tbbl Tensor
self Bool
returnInverse Bool
returnCounts Int
dim
uniqueDimConsecutive ::
Int ->
Bool ->
Bool ->
Tensor ->
(Tensor, Tensor, Tensor)
uniqueDimConsecutive :: Int -> Bool -> Bool -> Tensor -> (Tensor, Tensor, Tensor)
uniqueDimConsecutive Int
dim Bool
returnInverse Bool
returnCounts Tensor
self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> Int64
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor, Tensor)))
ATen.unique_dim_consecutive_tlbb Tensor
self Int
dim Bool
returnInverse Bool
returnCounts
unsqueeze ::
Dim ->
Tensor ->
Tensor
unsqueeze :: Dim -> Tensor -> Tensor
unsqueeze (Dim Int
d) Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.unsqueeze_tl Tensor
input Int
d
upsampleBilinear2d ::
(Int, Int) ->
Bool ->
Tensor ->
Tensor
upsampleBilinear2d :: (Int, Int) -> Bool -> Tensor -> Tensor
upsampleBilinear2d (Int
outputHeight, Int
outputWidth) Bool
alignCorners Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr IntArray -> CBool -> IO (ForeignPtr Tensor)
ATen.upsample_bilinear2d_tlb Tensor
input [Int
outputHeight, Int
outputWidth] Bool
alignCorners
upsampleNearest2d ::
(Int, Int) ->
Double ->
Double ->
Tensor ->
Tensor
upsampleNearest2d :: (Int, Int) -> Double -> Double -> Tensor -> Tensor
upsampleNearest2d (Int
outputHeight, Int
outputWidth) Double
scales_h Double
scales_w Tensor
self = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr IntArray
-> CDouble
-> CDouble
-> IO (ForeignPtr Tensor)
ATen.upsample_nearest2d_tldd Tensor
self [Int
outputHeight, Int
outputWidth] Double
scales_h Double
scales_w
split ::
Int ->
Dim ->
Tensor ->
[Tensor]
split :: Int -> Dim -> Tensor -> [Tensor]
split Int
splitSize (Dim Int
d) Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> Int64 -> IO (ForeignPtr TensorList)
ATen.split_tll Tensor
input Int
splitSize Int
d
l1Loss ::
Reduction ->
Tensor ->
Tensor ->
Tensor
l1Loss :: Reduction -> Tensor -> Tensor -> Tensor
l1Loss Reduction
reduction Tensor
input Tensor
target = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.l1_loss_ttl Tensor
input Tensor
target Reduction
reduction
leakyRelu ::
Float ->
Tensor ->
Tensor
leakyRelu :: Float -> Tensor -> Tensor
leakyRelu Float
negSlope Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr Scalar -> IO (ForeignPtr Tensor)
ATen.leaky_relu_ts Tensor
input Float
negSlope
logSigmoid ::
Tensor ->
Tensor
logSigmoid :: Tensor -> Tensor
logSigmoid Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.log_sigmoid_t Tensor
input
maxDim ::
Dim ->
KeepDim ->
Tensor ->
(Tensor, Tensor)
maxDim :: Dim -> KeepDim -> Tensor -> (Tensor, Tensor)
maxDim (Dim Int
d) KeepDim
k Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> Int64 -> CBool -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.max_tlb Tensor
input Int
d (KeepDim -> Bool
keepdim KeepDim
k)
minDim ::
Dim ->
KeepDim ->
Tensor ->
(Tensor, Tensor)
minDim :: Dim -> KeepDim -> Tensor -> (Tensor, Tensor)
minDim (Dim Int
d) KeepDim
k Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> Int64 -> CBool -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.min_tlb Tensor
input Int
d (KeepDim -> Bool
keepdim KeepDim
k)
meanDim ::
Dim ->
KeepDim ->
DType ->
Tensor ->
Tensor
meanDim :: Dim -> KeepDim -> DType -> Tensor -> Tensor
meanDim (Dim Int
d) KeepDim
k DType
dtype Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr IntArray
-> CBool
-> ScalarType
-> IO (ForeignPtr Tensor)
ATen.mean_tlbs Tensor
input Int
d (KeepDim -> Bool
keepdim KeepDim
k) DType
dtype
medianDim ::
Dim ->
KeepDim ->
Tensor ->
(Tensor, Tensor)
medianDim :: Dim -> KeepDim -> Tensor -> (Tensor, Tensor)
medianDim (Dim Int
d) KeepDim
k Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> Int64 -> CBool -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.median_tlb Tensor
input Int
d (KeepDim -> Bool
keepdim KeepDim
k)
chainMatmul ::
[Tensor] ->
Tensor
chainMatmul :: [Tensor] -> Tensor
chainMatmul [Tensor]
tensors = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr TensorList -> IO (ForeignPtr Tensor)
ATen.chain_matmul_l [Tensor]
tensors
gelu ::
Tensor ->
Tensor
gelu :: Tensor -> Tensor
gelu Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.gelu_t Tensor
input
glu ::
Dim ->
Tensor ->
Tensor
glu :: Dim -> Tensor -> Tensor
glu (Dim Int
d) Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.glu_tl Tensor
input Int
d
stdMean ::
Bool ->
Tensor ->
(Tensor, Tensor)
stdMean :: Bool -> Tensor -> (Tensor, Tensor)
stdMean Bool
unbiased Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor
-> CBool -> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.std_mean_tb Tensor
input Bool
unbiased
stdMeanDim ::
Dim ->
Bool ->
KeepDim ->
Tensor ->
(Tensor, Tensor)
stdMeanDim :: Dim -> Bool -> KeepDim -> Tensor -> (Tensor, Tensor)
stdMeanDim (Dim Int
d) Bool
unbiased KeepDim
k Tensor
input = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ forall a ca x1 cx1 x2 cx2 x3 cx3 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable y cy) =>
(ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y
cast4 ForeignPtr Tensor
-> ForeignPtr IntArray
-> CBool
-> CBool
-> IO (ForeignPtr (StdTuple '(Tensor, Tensor)))
ATen.std_mean_tlbb Tensor
input Int
d Bool
unbiased (KeepDim -> Bool
keepdim KeepDim
k)
clone ::
Tensor ->
IO Tensor
clone :: Tensor -> IO Tensor
clone Tensor
input = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.clone_t Tensor
input
detach ::
Tensor ->
IO Tensor
detach :: Tensor -> IO Tensor
detach Tensor
input = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.detach_t Tensor
input
view ::
[Int] ->
Tensor ->
Tensor
view :: [Int] -> Tensor -> Tensor
view [Int]
dims Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ (forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr IntArray -> IO (ForeignPtr Tensor)
ATen.tensor_view_l) Tensor
t [Int]
dims
repeat ::
[Int] ->
Tensor ->
Tensor
repeat :: [Int] -> Tensor -> Tensor
repeat [Int]
a Tensor
t = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ (forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
cast2 ForeignPtr Tensor -> ForeignPtr IntArray -> IO (ForeignPtr Tensor)
ATen.tensor_repeat_l) Tensor
t [Int]
a
batchNormIO ::
Tensor ->
Tensor ->
MutableTensor ->
MutableTensor ->
Bool ->
Double ->
Double ->
Tensor ->
IO Tensor
batchNormIO :: Tensor
-> Tensor
-> MutableTensor
-> MutableTensor
-> Bool
-> Double
-> Double
-> Tensor
-> IO Tensor
batchNormIO Tensor
weight Tensor
bias (MutableTensor Tensor
running_mean) (MutableTensor Tensor
running_var) Bool
training Double
momentum Double
eps Tensor
input =
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> CBool
-> CDouble
-> CDouble
-> CBool
-> IO (ForeignPtr Tensor)
ATen.batch_norm_tttttbddb
Tensor
input
Tensor
weight
Tensor
bias
Tensor
running_mean
Tensor
running_var
Bool
training
Double
momentum
Double
eps
Bool
True
instanceNormIO ::
Tensor ->
Tensor ->
MutableTensor ->
MutableTensor ->
Bool ->
Double ->
Double ->
Tensor ->
IO Tensor
instanceNormIO :: Tensor
-> Tensor
-> MutableTensor
-> MutableTensor
-> Bool
-> Double
-> Double
-> Tensor
-> IO Tensor
instanceNormIO Tensor
weight Tensor
bias (MutableTensor Tensor
running_mean) (MutableTensor Tensor
running_var) Bool
training Double
momentum Double
eps Tensor
input =
forall a ca x1 cx1 x2 cx2 x3 cx3 x4 cx4 x5 cx5 x6 cx6 x7 cx7 x8 cx8
y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3,
Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable x7 cx7,
Castable x8 cx8, Castable y cy) =>
(ca
-> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> cx7 -> cx8 -> IO cy)
-> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> x7 -> x8 -> IO y
cast9
ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> ForeignPtr Tensor
-> CBool
-> CDouble
-> CDouble
-> CBool
-> IO (ForeignPtr Tensor)
ATen.instance_norm_tttttbddb
Tensor
input
Tensor
weight
Tensor
bias
Tensor
running_mean
Tensor
running_var
Bool
training
Double
momentum
Double
eps
Bool
True
repeatInterleaveRange ::
Tensor ->
Tensor
repeatInterleaveRange :: Tensor -> Tensor
repeatInterleaveRange Tensor
_repeats = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ (forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
cast1 ForeignPtr Tensor -> IO (ForeignPtr Tensor)
ATen.repeat_interleave_t) Tensor
_repeats
repeatInterleave ::
Tensor ->
Tensor ->
Int ->
Tensor
repeatInterleave :: Tensor -> Tensor -> Int -> Tensor
repeatInterleave Tensor
_self Tensor
_repeats Int
_dim = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ (forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor
-> ForeignPtr Tensor -> Int64 -> IO (ForeignPtr Tensor)
ATen.repeat_interleave_ttl) Tensor
_self Tensor
_repeats Int
_dim
repeatInterleaveScalar ::
Tensor ->
Int ->
Int ->
Tensor
repeatInterleaveScalar :: Tensor -> Int -> Int -> Tensor
repeatInterleaveScalar Tensor
_self Int
_repeats Int
_dim = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ (forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
cast3 ForeignPtr Tensor -> Int64 -> Int64 -> IO (ForeignPtr Tensor)
ATen.repeat_interleave_tll) Tensor
_self Int
_repeats Int
_dim