-
Notifications
You must be signed in to change notification settings - Fork 8
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
TypeError: compile() missing 1 required positional argument: 'optimizer' #1
Comments
That is odd, we use a custom training loop following this tensorflow example. The |
I have used tensorflow 2.1.0 now i am getting RuntimeError Traceback (most recent call last) in train(dataset, dataset_val, epochs) D:\Anaconda\envs\tensorflow_env\lib\site-packages\tensorflow_core\python\keras\engine\training.py in evaluate(self, x, y, batch_size, verbose, sample_weight, steps, callbacks, max_queue_size, workers, use_multiprocessing) D:\Anaconda\envs\tensorflow_env\lib\site-packages\tensorflow_core\python\keras\engine\training.py in _assert_compile_was_called(self) RuntimeError: You must compile your model before training/testing. Use |
Working in colab but not in jupyter notebook. |
generator = make_generator_model() Giving error please check as below.
TypeError Traceback (most recent call last)
in
----> 1 generator = make_generator_model()
in make_generator_model()
27 model = Model(inputs = inputs, outputs = output)
28 #model.compile(loss=generator_loss)
---> 29 model.compile(loss=None, metrics = [mse , mae, mape, rmse, ar])
30 #model.compile(loss=None, metrics = [mse , mae, mape, rmse])
31 model.summary()
D:\Anaconda\lib\site-packages\tensorflow\python\training\tracking\base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
--> 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access
TypeError: compile() missing 1 required positional argument: 'optimizer'
The text was updated successfully, but these errors were encountered: