title: Is there a way I can resolve this deep learning errors as I am just starting to apply deep learning on my dataset
body: <p>Please can someone help me on how to resolve this problem. This is my first time of using deep Learning and I am stuck because I don't know what to do again.</p>
  <pre><code>`&gt; # compile the loss function
   &gt; model %&gt;% compile(loss= &quot;categorical_crossentropy&quot;, 
  +                   optimizer=&quot;adam&quot;,
  +                   metrics=&quot;accuracy&quot;)
  &gt; #fit model
  &gt; history &lt;- model %&gt;% fit(training,
  +                          trainLabels,
  +                          epochs=100,
  +                          batch_size=32,
  +                          validation_split=0.2)
  </code></pre>
  <p>Error in py_call_impl(callable, dots$args, dots$keywords) :
  ValueError: in user code:</p>
  <pre><code>C:\Users\VICOMA\AppData\Local\r-miniconda\envs\r-reticulate\lib\site- 
  packages\tensorflow\python\keras\engine\training.py:571 train_function  *
      outputs = self.distribute_strategy.run(
  C:\Users\VICOMA\AppData\Local\r-miniconda\envs\r-reticulate\lib\site- 
  packages\tensorflow\python\distribute\distribute_lib.py:951 run  **
      return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
  C:\Users\VICOMA\AppData\Local\r-miniconda\envs\r-reticulate\lib\site- 
  packages\tensorflow\python\distribute\distribute_lib.py:2290 call_for_each_replica
      return self._call_for_each_replica(fn, args, kwargs)
  C:\Users\VICOMA\AppData\Local\r-miniconda\envs\r-reticulate\lib\site- 
  packages\tensorflow\python\distribute\distribute_lib.py:2649 _call_for_each_replica
      return fn(*args, **kwargs)
  C:\Users\VICOMA\AppData\Local\r-miniconda\envs\r-reticulate\lib\site- 
   packages\tensorflow\python\keras\engine\training.py:531 train_s 
  
   I tried to use this line of code **tensorflow::tf$compat$v1$disable_eager_execution()** as someone 
   suggested but the error I am getting is this -
  
  Error in py_call_impl(callable, dots$args, dots$keywords) : 
  ValueError: Calling `Model.fit` in graph mode is not supported when the `Model` instance was 
  constructed with eager mode enabled. Please construct your `Model` instance in graph mode or call ` 
  Model.fit` with eager mode enabled.
  </code></pre>