Пожалуйста, помогите мне, как решить эту проблему. Я впервые использую глубокое обучение, и я застрял, потому что не знаю, что делать снова.
`> # compile the loss function
> model %>% compile(loss= "categorical_crossentropy",
+ optimizer="adam",
+ metrics="accuracy")
> #fit model
> history <- model %>% fit(training,
+ trainLabels,
+ epochs=100,
+ batch_size=32,
+ validation_split=0.2)
Ошибка в py_call_impl (callable, dots $ args, dots $ keywords): ValueError: в коде пользователя:
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.