1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-09-30 01:57:25 +02:00
tensorflow-haskell/tensorflow-ops/tensorflow-ops.cabal
Judah Jacobson d62c614695 Distinguish between "rendered" and "unrendered" Tensors. (#88)
Distinguish between "rendered" and "unrendered" Tensors.

There are now three types of `Tensor`:

- `Tensor Value a`: rendered value
- `Tensor Ref a`: rendered reference
- `Tensor Build a` : unrendered value

The extra bookkeeping makes it easier to track (and enforce) which tensors are
rendered or not.  For examples where this has been confusing in the past, see

With this change, pure ops look similar to before, returning `Tensor Build`
instead of `Tensor Value`.  "Stateful" (monadic) ops are unchanged.  For
example:

    add :: OneOf [..] t => Tensor v'1 t -> Tensor v'2 t -> Tensor Build t
    assign :: (MonadBuild m, TensorType t)
           => Tensor Ref t -> Tensor v'2 t -> m (Tensor Ref t)

The `gradients` function now requires that the variables over which it's
differentiating are pre-rendered:

    gradients :: (..., Rendered v2) => Tensor v1 a -> [Tensor v2 a]
              -> m [Tensor Value a]

(`Rendered v2` means that `v2` is either a `Ref` or a `Value`.)

Additionally, the implementation of `gradients` now takes care to render every
intermediate value when performing the reverse accumulation.  I suspect this
fixes an exponential blowup for complicated expressions.
2017-04-06 15:10:33 -07:00

238 lines
6.6 KiB
Text

name: tensorflow-ops
version: 0.1.0.0
synopsis: Friendly layer around TensorFlow bindings.
description: Please see README.md
homepage: https://github.com/tensorflow/haskell#readme
license: Apache
author: TensorFlow authors
maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Simple
cabal-version: >=1.22
library
hs-source-dirs: src
exposed-modules: TensorFlow.Gradient
, TensorFlow.Ops
, TensorFlow.EmbeddingOps
build-depends: proto-lens == 0.1.*
, base >= 4.7 && < 5
, bytestring
, fgl
, mtl
, data-default
, lens-family
, containers
, tensorflow == 0.1.*
, tensorflow-proto == 0.1.*
, tensorflow-core-ops == 0.1.*
, text
default-language: Haskell2010
Test-Suite RegressionTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: RegressionTest.hs
hs-source-dirs: tests
build-depends: base
, HUnit
, random
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
Test-Suite BuildTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: BuildTest.hs
hs-source-dirs: tests
build-depends: HUnit
, base
, proto-lens
, lens-family
, google-shim
, tensorflow
, tensorflow-ops
, tensorflow-proto
, test-framework
, test-framework-hunit
, transformers
, vector
Test-Suite EmbeddingOpsTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: EmbeddingOpsTest.hs
hs-source-dirs: tests
build-depends: HUnit
, QuickCheck
, base
, proto-lens
, lens-family
, google-shim
, tensorflow
, tensorflow-test
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-proto
, test-framework
, test-framework-hunit
, test-framework-quickcheck2
, transformers
, vector
Test-Suite ArrayOpsTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: ArrayOpsTest.hs
hs-source-dirs: tests
build-depends: HUnit
, QuickCheck
, base
, proto-lens
, lens-family
, google-shim
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-proto
, test-framework
, test-framework-hunit
, test-framework-quickcheck2
, transformers
, vector
Test-Suite OpsTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: OpsTest.hs
hs-source-dirs: tests
build-depends: HUnit
, QuickCheck
, base
, bytestring
, proto-lens
, lens-family
, google-shim
, temporary
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-proto
, test-framework
, test-framework-hunit
, test-framework-quickcheck2
, transformers
, vector
Test-Suite DataFlowOpsTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: DataFlowOpsTest.hs
hs-source-dirs: tests
build-depends: HUnit
, QuickCheck
, base
, proto-lens
, lens-family
, google-shim
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-proto
, test-framework
, test-framework-hunit
, test-framework-quickcheck2
, vector
Test-Suite GradientTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: GradientTest.hs
hs-source-dirs: tests
build-depends: HUnit
, base
, proto-lens
, lens-family
, google-shim
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-proto
, test-framework
, test-framework-hunit
, vector
Test-Suite MiscTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: MiscTest.hs
hs-source-dirs: tests
build-depends: HUnit
, base
, bytestring
, vector
, google-shim
, transformers
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-proto
, test-framework
, test-framework-hunit
Test-Suite TracingTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: TracingTest.hs
hs-source-dirs: tests
build-depends: HUnit
, base
, bytestring
, data-default
, lens-family
, tensorflow
, tensorflow-ops
, test-framework
, test-framework-hunit
Test-Suite TypesTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: TypesTest.hs
hs-source-dirs: tests
build-depends: HUnit
, QuickCheck
, base
, bytestring
, proto-lens
, lens-family
, google-shim
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-proto
, transformers
, test-framework
, test-framework-hunit
, test-framework-quickcheck2
, vector
Benchmark FeedFetchBench
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: FeedFetchBench.hs
hs-source-dirs: tests
build-depends: base
, criterion
, deepseq
, tensorflow
, tensorflow-ops
, transformers
, vector
ghc-options: -O2 -threaded
source-repository head
type: git
location: https://github.com/tensorflow/haskell