Created
July 10, 2020 17:19
-
-
Save orwa-te/e0d92cc83d2ddd1d3a6be075a2161ef8 to your computer and use it in GitHub Desktop.
NotImplementedError stack trace for model.fit() with tf.distribute.MirroredStrategy()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
NotImplementedError Traceback (most recent call last) | |
<ipython-input-26-55bddb4c82a6> in <module> | |
1 # dist_model.summary() | |
----> 2 history = dist_model.fit(trainx, trainy_hot, epochs=1, validation_data = (testx, testy_hot),batch_size=64, verbose=1) | |
~\Anaconda3\envs\open_cv\lib\site-packages\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs) | |
1211 else: | |
1212 fit_inputs = x + y + sample_weights | |
-> 1213 self._make_train_function() | |
1214 fit_function = self.train_function | |
1215 | |
~\Anaconda3\envs\open_cv\lib\site-packages\keras\engine\training.py in _make_train_function(self) | |
314 training_updates = self.optimizer.get_updates( | |
315 params=self._collected_trainable_weights, | |
--> 316 loss=self.total_loss) | |
317 updates = self.updates + training_updates | |
318 | |
~\Anaconda3\envs\open_cv\lib\site-packages\keras\legacy\interfaces.py in wrapper(*args, **kwargs) | |
89 warnings.warn('Update your `' + object_name + '` call to the ' + | |
90 'Keras 2 API: ' + signature, stacklevel=2) | |
---> 91 return func(*args, **kwargs) | |
92 wrapper._original_function = func | |
93 return wrapper | |
~\Anaconda3\envs\open_cv\lib\site-packages\keras\backend\tensorflow_backend.py in symbolic_fn_wrapper(*args, **kwargs) | |
73 if _SYMBOLIC_SCOPE.value: | |
74 with get_graph().as_default(): | |
---> 75 return func(*args, **kwargs) | |
76 else: | |
77 return func(*args, **kwargs) | |
~\Anaconda3\envs\open_cv\lib\site-packages\keras\optimizers.py in get_updates(self, loss, params) | |
548 | |
549 # Apply constraints. | |
--> 550 if getattr(p, 'constraint', None) is not None: | |
551 new_p = p.constraint(new_p) | |
552 | |
~\Anaconda3\envs\open_cv\lib\site-packages\tensorflow_core\python\ops\variables.py in constraint(self) | |
569 Can be `None` if no constraint was passed. | |
570 """ | |
--> 571 raise NotImplementedError | |
572 | |
573 def assign(self, value, use_locking=False, name=None, read_value=True): | |
NotImplementedError: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment