Add support for logging to tensorboard
Based on @gnezdo's internal version with some differences:
* Uses a pure haskell implementation of EventWriter instead of FFI.
* Special `buildAnd*` functions were dropped in favor of using
`mergeAllSummaries :: Build SummaryTensor` with the normal
`build` function.
The tensorflow-records package implements encoding/decoding of the
format, and the tensorflow-records-conduit package provides wrappers and
utilities for use with Conduit.
- More heterogeneous list ops
- Resource ops that don't use "dtype" as the type parameter
For the latter, we may need an upstream fix, or else to change the convention
of how we can tell what the type parameter is.
We should treat such attributes as regular `DataType` values rather than type
parameters; otherwise we'll get ambiguous types. As with other attributes,
they can either set by default or passed in as an explicit argument to the op.
Allows us to reenable a couple more ops.
Also removes all the ghc-8-specific logic in the .cabal files.
ghc-8 has issues with deeply nested tuples of constraints. We can
work around it by:
- Changing TensorTypes to a regular class. This required FlexibleContexts.
(But we'll probably need it anyway when we support heterogeneous tensor
lists.)
- Specializing NoneOf for long type lists.
For more details, see: https://ghc.haskell.org/trac/ghc/ticket/12175.
Also added 'directory' to tensorflow-core-ops' dependencies since it's used
in the Setup script.
One more step towards fixing #38.
The script can now be run with, e.g.
`env STACK_RESOLVER=lts-7.3 ci_build/outer_launch_tests.sh`
and will use the specified version of the resolver.
We can't quite enable this for lts-7.3 as the code is not pedantically
clean. We will reconsider when 8.0.2 is available which removes
`-Wredundant-constraints` from `-Wall`.
I'm not sure why, but in some cases it seems linking only works if *both* the
.so and the .dylib are present in /usr/local/lib. This may be due to a quirk
of how Bazel builds the library, and/or how ghc/stack load the library.
Two issues:
- The definition of `\\` was missing parentheses. It was probably a bug
that this used to worked in ghc-7.10.
- Set `-fconstraint-solver-iterations=0` to work around
https://ghc.haskell.org/trac/ghc/ticket/12175. It looks like we can
trigger that bug when defining a significantly complicated op. Specifically,
our type shenanigans ("OneOf") along with lens setters (for OpDef) seem
to confuse GHC.
Still TODO: automate testing of different ghc versions to prevent a regression.
Also fixes op lists when the same attribute specifies the length of
both an input and an output. I added a test of "shapeN" which
previously failed with the following error:
ERROR: Ran out of counts in toResult. Likely misuse of buildListOp.
* Fix for embedding gradient calculation
- Passes vectors instead of scalars to slice
- converts the numRows to a scalar
- add `toScalar` utility function
- minor change to test case so that it actually works
* added lib for testing helper functions
* add flatSlice function
* No longer need to hide ResourceHandle ops
* Blacklisted not supported TensorArrayV2
* Ownership of feed tensors changed (1f0c5119a0230c5160d45496175b9256f097e144)
* Sorted test names.
* Don't require a terminal to run tests.
Should resolve "the input device is not a TTY" problem with Jenkins.
* Added build indicator to README.md.
* Fixed up URL.
- Uses docker to put everything together.
- stack is running on "raw" system, similar to MacOS build.
- Still not finding libtensorflow_c.so in tensorflow-core-ops setup.
* Use native oneHot op in the example code. It didn't exist when this was originally written.
* Misc cleanup in MNIST example
- Use unspecified dimension for batch size in model. This simplifies the
code for the test set.
- Move error rate calculation into model.