-
Notifications
You must be signed in to change notification settings - Fork 65
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
Attribute error occur in Lamdacallback #31
Comments
Try installing keras-lr-finder from git using I've had a similar error and it worked for me. Hope this helps you too! |
it works after upgrading keras
…On Thu, Aug 20, 2020, 8:41 PM Arthur ***@***.***> wrote:
Try installing keras-lr-finder from git using pip install git+
https://github.com/surmenok/keras_lr_finder, instead of pip install
keras-lr-finder
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3OJZER52PFTECMTMIXKK3SBU4K3ANCNFSM4QFBCT7Q>
.
|
(This is for Keras/TensorFlow version 2.3.0) If you are limited to what tensorflow/keras version you can install (because of the CUDA version you have installed, for example) I found that editing the import statements let me run this. Specifically: I also had to change |
I am using the latest version of tensorflow and keras and while running LRfinder class i got an error as shown below
AttributeError Traceback (most recent call last)
in
1 from keras_lr_finder.lr_finder import*
2 lr_finder = lf.LRFinder(model_seq)
----> 3 lr_finder.find(input_data, labels, start_lr=0.0001, end_lr=1, epochs=5)
D:\Deep_learning_projects\aryan\keras_lr_finder\lr_finder.py in find(self, x_train, y_train, start_lr, end_lr, batch_size, epochs, **kw_fit)
62 batch_size=batch_size, epochs=epochs,
63 callbacks=[callback],
---> 64 **kw_fit)
65
66 # Restore the weights to the state before model fitting
c:\programdata\anaconda3\envs\deeplearning\lib\site-packages\tensorflow\python\keras\engine\training.py in _method_wrapper(self, *args, **kwargs)
106 def _method_wrapper(self, *args, **kwargs):
107 if not self._in_multi_worker_mode(): # pylint: disable=protected-access
--> 108 return method(self, *args, **kwargs)
109
110 # Running inside
run_distribute_coordinator
already.c:\programdata\anaconda3\envs\deeplearning\lib\site-packages\tensorflow\python\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_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
1072 verbose=verbose,
1073 epochs=epochs,
-> 1074 steps=data_handler.inferred_steps)
1075
1076 self.stop_training = False
c:\programdata\anaconda3\envs\deeplearning\lib\site-packages\tensorflow\python\keras\callbacks.py in init(self, callbacks, add_history, add_progbar, model, **params)
233 # pylint: disable=protected-access
234 self._should_call_train_batch_hooks = any(
--> 235 cb._implements_train_batch_hooks() for cb in self.callbacks)
236 self._should_call_test_batch_hooks = any(
237 cb._implements_test_batch_hooks() for cb in self.callbacks)
c:\programdata\anaconda3\envs\deeplearning\lib\site-packages\tensorflow\python\keras\callbacks.py in (.0)
233 # pylint: disable=protected-access
234 self._should_call_train_batch_hooks = any(
--> 235 cb._implements_train_batch_hooks() for cb in self.callbacks)
236 self._should_call_test_batch_hooks = any(
237 cb._implements_test_batch_hooks() for cb in self.callbacks)
AttributeError: 'LambdaCallback' object has no attribute '_implements_train_batch_hooks'
The text was updated successfully, but these errors were encountered: