Add 16-bit float tensor types#15
Conversation
54d275c to
dc16b67
Compare
dc16b67 to
545385b
Compare
|
Javadoc looks good. Is it worth adding a method to the BFloat16 and Float16 interfaces that accepts a |
|
Intel capitalizes it "Bfloat16" so it might be better to do it like that here as well? BTW, again, why do we need to prefix all those types with "T"? What's wrong with just |
|
I think the prefixing helps to distinguish them from things that implement I've no opinion either way on |
|
For the prefix, please see my reply in the group thread as this question has been asked in many different places :) https://groups.google.com/a/tensorflow.org/d/msg/jvm/Zp362xTQahc/Ho6iUEJfAgAJ For the |
|
What about |
|
Haha, worst, all of I guess if we go with |
e27eac4 to
b6a0d3c
Compare
* Move NdArray library to subfolder * Add missing dependencies * Fix settings.xml path * Kotlin friendly names (Shape.get) * Fix bug when slicing on a segmented dimension (#2) * Sparse tensor (#3) * Allow SparseNdArray impls to be inherited (#5) * Better examples in Sparse array documentation (#6) * Build on JDK11 by default (#7) * Add missing export * Adding toString to AbstractDenseNdArray and AbstractSparseNdArray (#8) * Test Java copyFrom Ok * Test Java copyFrom - trying to replicate Scala error * Test Java copyFrom - trying to replicate Scala error v2 * Added basic index tests (rank 2) * Added module-info to tests * Module-info for tests use the same module name of src * Value streaming for NdArrays (#15) * Release 0.4.0 * Prepare next iteration * Viewing arrays with different shapes (#18) * Rename read/write to copyTo/From (#19) * Releasing 1.0.0-rc.1 * Increase version for next iteration * Move ndarray to tensorflow-java * Apply spotless --------- Co-authored-by: Ryan Nett <JNett96@gmail.com> Co-authored-by: Jim Clarke <JimClarke5@me.com> Co-authored-by: Adam Pocock <craigacp@gmail.com> Co-authored-by: hmf <hugo6ferreira@gmail.com> Co-authored-by: Adam Pocock <adam.pocock@oracle.com>
This PR shows how to make use of
DataLayoutsto implement new tensor data types not directly supported by Java primitive types. It adds 2 new tensor types to the Java bindings:TFloat16andTBFloat16. The former implements the IEEE-754 half-precision floating-point specification while the latter is for truncated 32-bit floats, called "Brain float-16".In addition, you'll notice that the PR also include a lot of javadoc updates, which is a work continuously in progress.