shubham99bisht / Handwritten-digit-recognition-MNIST

Handwritten Digit Recognition using Convolutional Neural Networks in Python with Keras on live camera
42 stars 19 forks source link

tensorflow deprecated #5

Open skywo1f opened 3 years ago

skywo1f commented 3 years ago

Looks like this repo is deprecated with the new tensorflow: ~/neural-nets/Handwritten-digit-recognition-MNIST$ python3 digit_recogniser.py Using TensorFlow backend. Traceback (most recent call last): File "digit_recogniser.py", line 71, in main() File "digit_recogniser.py", line 33, in main loaded_model = mnist_test.model() File "/home/iviti/neural-nets/Handwritten-digit-recognition-MNIST/mnist_test.py", line 7, in model loaded_model = model_from_json(loaded_model_json) File "/home/iviti/.local/lib/python3.8/site-packages/keras/engine/saving.py", line 369, in model_from_json return deserialize(config, custom_objects=custom_objects) File "/home/iviti/.local/lib/python3.8/site-packages/keras/layers/init.py", line 52, in deserialize return deserialize_keras_object(config, File "/home/iviti/.local/lib/python3.8/site-packages/keras/utils/generic_utils.py", line 142, in deserialize_keras_object return cls.from_config( File "/home/iviti/.local/lib/python3.8/site-packages/keras/engine/sequential.py", line 289, in from_config model = cls() File "/home/iviti/.local/lib/python3.8/site-packages/keras/engine/sequential.py", line 87, in init super(Sequential, self).init(name=name) File "/home/iviti/.local/lib/python3.8/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, kwargs) File "/home/iviti/.local/lib/python3.8/site-packages/keras/engine/network.py", line 94, in init self._init_subclassed_network(kwargs) File "/home/iviti/.local/lib/python3.8/site-packages/keras/engine/network.py", line 301, in _init_subclassed_network self._base_init(name=name) File "/home/iviti/.local/lib/python3.8/site-packages/keras/engine/network.py", line 107, in _baseinit name = prefix + '' + str(K.get_uid(prefix)) File "/home/iviti/.local/lib/python3.8/site-packages/keras/backend/tensorflow_backend.py", line 71, in get_uid graph = tf.get_default_graph() AttributeError: module 'tensorflow' has no attribute 'get_default_graph'

shubham99bisht commented 3 years ago

Hi @skywo1f , thanks for reporting the issue. Would you mind fixing this problem in a branch and raising a pull request?