rstudio / tfdatasets

R interface to TensorFlow Datasets API
https://tensorflow.rstudio.com/tools/tfdatasets/
34 stars 12 forks source link

how to build a batch input for tf hub model in R, while using universal sentence encoder? #11

Open skallinen opened 6 years ago

skallinen commented 6 years ago

adding issue here per twitter conversation with @skeydan : working with the universal sentence encoder from within R. got it working with the help from @skeydan and the example here. it is a naive implementation where I input an r vector with sentences to the embed module. but would like to send the data in batches. tried to replicate the pattern in the example https://github.com/rstudio/tfdatasets/blob/master/examples/text/train.R loading the sentences from a file, but couldn't get it to work. any pointers where to look for how to construct the input data or perhaps a batch generator?

jjallaire commented 6 years ago

We are going to be working on developing this example further soon, so stay tuned.