1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-12-26 11:39:46 +01:00
tensorflow-haskell/tensorflow-ops/tests
Judah Jacobson c99a23b6a7 Add versions of each op that take optional params as an extra arg. (#84)
Each op `foo :: ...` now has a corresponding `foo' :: OpParams -> ...`
which lets you set optional attributes.  `OpParams` is currently a type alias for
`OpDef -> OpDef`.  In the future we should consider more type safety, e.g.,
using type-level strings and OverloadedLabels for optional attributes.

I used it to replace a few manual `buildOp`s in our code with the codegenerated
ops, now that it's easier to set attributes.  I also removed `tensorAttr` and
`named` since it's now possible to set those op attributes directly.

Although this clutters up the API a bit, I think it's simpler than using type
classes to implement optional arguments (as in, for example, `Text.Printf`) --
especially in terms of type inference with the rest of the library.
2017-03-20 18:16:38 -07:00
..
ArrayOpsTest.hs Refactor OpGen. (#36) 2016-11-20 10:00:22 -08:00
BuildTest.hs Add versions of each op that take optional params as an extra arg. (#84) 2017-03-20 18:16:38 -07:00
DataFlowOpsTest.hs Introduce a MonadBuild class, and remove buildAnd. (#83) 2017-03-18 12:08:53 -07:00
EmbeddingOpsTest.hs Introduce a MonadBuild class, and remove buildAnd. (#83) 2017-03-18 12:08:53 -07:00
FeedFetchBench.hs Support fetching storable vectors + use them in benchmark (#50) 2016-12-14 18:53:06 -08:00
GradientTest.hs Introduce a MonadBuild class, and remove buildAnd. (#83) 2017-03-18 12:08:53 -07:00
MiscTest.hs Make code --pedantic (#35) 2016-11-18 10:42:02 -08:00
OpsTest.hs Add versions of each op that take optional params as an extra arg. (#84) 2017-03-20 18:16:38 -07:00
RegressionTest.hs Introduce a MonadBuild class, and remove buildAnd. (#83) 2017-03-18 12:08:53 -07:00
TracingTest.hs Introduce a MonadBuild class, and remove buildAnd. (#83) 2017-03-18 12:08:53 -07:00
TypesTest.hs Add versions of each op that take optional params as an extra arg. (#84) 2017-03-20 18:16:38 -07:00