Keras and Tensaflow error

Hello,
I am fitting a deep neural network model in rstudio cloud and when I run this code: #Create model
model = keras_model_sequential()
model %>% layer_dense(units = 5, activation = 'relu', input_shape = c(11)) %>%
layer_dense(units = 1)

#Compile
model %>% compile(loss = 'mse', optimizer = 'rmsprop',
metrics = 'mae')
#Fit model

mymodel = model %>% fit(training, trainingtarget, epochs = 100,
batch_size = 30, validation_split = 0.2)

When I try to fit the model (last step above) I get the following error:

Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: in user code:

/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py:571 train_function  *
    outputs = self.distribute_strategy.run(
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/distribute/distribute_lib.py:951 run  **
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/distribute/distribute_lib.py:2290 call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/distribute/distribute_lib.py:2649 _call_for_each_replica
    return fn(*args, **kwargs)
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-pac

For all along the code was fine but since yesterday when I tried to rerun the model I get the above error.
Guidance on what's to be done to get this sorted is appreciated
Thanks

It seems these messages are just informational and are not errors: https://github.com/tensorflow/tensorflow/issues/39926

sam

Hi, I just realised that I posted the step prior to the one in which I try to fit the model and get an error, have updated the question. If you can assist.
Thanks

I think the error you pasted got cut off... i don't see the actual error message.

sam

Hi @samp
This is the entire error message:

Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: in user code:
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py:571 train_function *
outputs = self.distribute_strategy.run(
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/distribute/distribute_lib.py:951 run **
return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/distribute/distribute_lib.py:2290 call_for_each_replica
return self._call_for_each_replica(fn, args, kwargs)
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/distribute/distribute_lib.py:2649 _call_for_each_replica
return fn(*args, **kwargs)
/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-pac

Your assistance is appreciated. Thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.