Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparktf - example replication #2

Open
lucabarbaglia opened this issue May 24, 2019 · 6 comments
Open

Sparktf - example replication #2

lucabarbaglia opened this issue May 24, 2019 · 6 comments

Comments

@lucabarbaglia
Copy link

I am trying to replicate the example for the sparktf package proposed on the associated GitHub page:
https://github.com/rstudio/sparktf

When fitting the model, I obtain the following error:

history <- model %>% fit(dataset, epochs = 100, verbose = 0)
2019-05-24 17:19:09.373716: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at strided_slice_op.cc:106 : Invalid argument: Index out of range using input dim 2; input has only 2 dims

@kevinykuo do you have a clue on what's causing this issue?
Thanks

@kevinykuo
Copy link
Contributor

Are you using the latest versions of tfdatasets?

@dfalbel does this error ring a bell?

@lucabarbaglia
Copy link
Author

@kevinykuo Yes, I have the tfdatasets 1.13.1 version, which is the latest one available

@dfalbel
Copy link
Member

dfalbel commented May 27, 2019

@kevinykuo Nothing comes to mind..

@lucabarbaglia what's your TensorFlow version? You can get that with tensorflow::tf_config(). It could also be the Keras version. Can you try installing Keras from Github?

@lucabarbaglia
Copy link
Author

@dfalbel I'm running TensorFlow v1.13.1

tensorflow::tf_config()
TensorFlow v1.13.1
Python v3.7

I have installed Keras (version 2.2.4.1) from GitHub using devtools::install_github("rstudio/keras"), but I still get the same error

@dfalbel
Copy link
Member

dfalbel commented May 27, 2019

I can reproduce the issue here, but adding the steps_per_epoch = 10 argument to fit will fix the problem. @kevinykuo Do you think this is expected?

@kevinykuo
Copy link
Contributor

@dfalbel I'll update the README since it looks like there's been a change to tf.data. Does fit() have no visibility into when a dataset runs out of records for each pass through the data? I wonder how it worked before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants