hasktorch-indef-0.0.1.0: Core Hasktorch abstractions wrapping FFI bindings

Copyright(c) Sam Stites 2017
LicenseBSD3
Maintainersam@stites.io
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Torch.Indef.Mask

Description

Redundant version of Torch.Indef.{Dynamic/Static}.Tensor for Byte tensors.

This comes with the same fixme as Index:

FIXME: in the future, there could be a smaller subset of Torch which could be compiled to to keep the code dry. Alternatively, if backpack one day supports recursive indefinites, we could use this feature to possibly remove this package and Mask.

Synopsis

Documentation

newMask :: forall d. Dimensions d => MaskTensor d Source #

build a new mask tensor with any known Dimension list.

newMaskDyn :: Dims (d :: [Nat]) -> MaskDynamic Source #

build a new dynamic mask tensor with any known Nat list.

withMask :: MaskDynamic -> (Ptr CMaskTensor -> IO x) -> IO x Source #

run a function with access to a dynamic index tensor's raw c-pointer.

allOf :: IsMask t => t -> Bool Source #

assert that all of the values of the Byte tensor are true.