Closed sbrunk closed 6 years ago
@sbrunk Could you try changing the corresponding line to the following?
val generator = () => Range(0, 10).map(Tensor(_))
I will update the documentation. It's supposed to take a function generating an iterator over structures of tensors (e.g., single tensors, tuples over tensors, etc) as input.
Thanks for looking into this. Unfortunately, the error still persists.
could not find implicit value for parameter ev: org.platanios.tensorflow.api.ops.io.data.Data.Aux[org.platanios.tensorflow.api.tensors.Tensor,O,org.platanios.tensorflow.api.types.DataType.Aux[Int],org.platanios.tensorflow.api.core.Shape]
Note that it works (the implicit evidence is summoned) when I use DataType
explicitly as type param instead of the inferred DataType.Aux[Int]
val dataset = tf.data.fromGenerator[Tensor, Output, DataType, Shape](generator, INT32, Shape.scalar())
but then dataset is of course also of type Dataset[Tensor, Output, DataType, Shape]
@sbrunk That's interesting. I had created a type trait for that case a while ago and was not using it in this case. I think it's fixed now, but could you please confirm that it also works for you.
Works for me too. Thanks. :)
Playing with the dataset API I tried the following:
This is basically just copied from the docs: https://github.com/eaplatanios/tensorflow_scala/blob/dce84a0b9f22e7212b3615efe1e232b7a682eaba/api/src/main/scala/org/platanios/tensorflow/api/ops/io/data/Dataset.scala#L265-L266
I get this error though. Do you have any idea what I'm missing here?