eaplatanios / tensorflow_scala

TensorFlow API for the Scala Programming Language
http://platanios.org/tensorflow_scala/
Apache License 2.0
936 stars 95 forks source link

Introducing Typed Ops using Scala Types instead of TensorFlow Types #131

Closed eaplatanios closed 5 years ago

eaplatanios commented 6 years ago

Ops and outputs are now also typed (similar to tensors). Their type parameters are the Scala equivalent of TensorFlow types. For example:

// These are valid types:
Tensor[Int]
Output[Int]
Output[Double]
Op[(Output[Int], Output[Double]), Output[Long]]

// while these are not:
Tensor[INT32]
Output[INT32]
Output[FLOAT64]

This also results in:

NOTE: This does not compile yet, but I'm working actively on getting it ready.

eaplatanios commented 6 years ago

@sbrunk You may be interested in this. It's one of the big changes I mentioned some time ago.

sbrunk commented 6 years ago

Agreed. This is a great simplification. :)