title: R keras model eval/predict error: Error in do.call(object$evaluate, args) : 'what' must be a function or character string
body: <p>I have a keras model (using R) and TF as backend as follows</p>
  
  <pre><code>history &lt;- model %&gt;% fit( train_X1,train_y,batch_size=100,
                 epochs=80,validation_split = 0.2,
                 shuffle=TRUE)
  
  &gt; class(model)
  [1] "keras.models.Sequential"         "keras.engine.training.Model"    
  [3] "keras.engine.topology.Container" "keras.engine.topology.Layer"    
  [5] "python.builtin.object"                
  </code></pre>
  
  <p>The dimensions are as follows:</p>
  
  <pre><code>&gt; dim(train_X1)
  [1] 4893   64   64    1
  &gt; dim(train_y)
  [1] 4893   12
  </code></pre>
  
  <p>I am trying to evaluate and predict first on train set and then on test set.</p>
  
  <pre><code>model %&gt;% evaluate(train_X1,train_y)
  pred &lt;- model %&gt;% predict_classes(train_X1)
  </code></pre>
  
  <p>however I am getting the following error on running the evaluate command:</p>
  
  <pre><code>Error in do.call(object$evaluate, args) :  'what' must be a function or character string
  </code></pre>
  
  <p>Any help will be appreciated. Thanks</p>