Advertisement
Warmachine28

Untitled

Mar 13th, 2022
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. Using TensorFlow backend.
  2. ---------------------------------------------------------------------------
  3. AttributeError Traceback (most recent call last)
  4. Input In [1], in <cell line: 27>()
  5. 25 import tensorflow as tf
  6. 26 import tensorflow_addons as tfa
  7. ---> 27 import keras
  8. 28 from keras.models import Sequential
  9. 29 from keras.layers import Dense, Dropout, Activation, Flatten
  10.  
  11. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/__init__.py:3, in <module>
  12. 1 from __future__ import absolute_import
  13. ----> 3 from . import utils
  14. 4 from . import activations
  15. 5 from . import applications
  16.  
  17. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/utils/__init__.py:26, in <module>
  18. 24 from .layer_utils import get_source_inputs
  19. 25 from .layer_utils import print_summary
  20. ---> 26 from .vis_utils import model_to_dot
  21. 27 from .vis_utils import plot_model
  22. 28 from .np_utils import to_categorical
  23.  
  24. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/utils/vis_utils.py:7, in <module>
  25. 4 from __future__ import print_function
  26. 6 import os
  27. ----> 7 from ..models import Model
  28. 8 from ..layers.wrappers import Wrapper
  29. 10 # `pydot` is an optional dependency,
  30. 11 # see `extras_require` in `setup.py`.
  31.  
  32. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/models.py:10, in <module>
  33. 8 from .utils.generic_utils import has_arg
  34. 9 from .utils.generic_utils import to_list
  35. ---> 10 from .engine.input_layer import Input
  36. 11 from .engine.input_layer import InputLayer
  37. 12 from .engine.training import Model
  38.  
  39. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/engine/__init__.py:3, in <module>
  40. 1 # note: `Node` is an internal class,
  41. 2 # it isn't meant to be used by Keras users.
  42. ----> 3 from .input_layer import Input
  43. 4 from .input_layer import InputLayer
  44. 5 from .base_layer import InputSpec
  45.  
  46. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/engine/input_layer.py:7, in <module>
  47. 4 from __future__ import absolute_import
  48. 5 from __future__ import division
  49. ----> 7 from .base_layer import Layer
  50. 8 from .base_layer import Node
  51. 9 from .. import backend as K
  52.  
  53. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/engine/base_layer.py:12, in <module>
  54. 9 import threading
  55. 11 from .. import backend as K
  56. ---> 12 from .. import initializers
  57. 13 from ..utils.layer_utils import count_params
  58. 14 from ..utils.generic_utils import has_arg
  59.  
  60. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/initializers/__init__.py:124, in <module>
  61. 118 LOCAL.ALL_OBJECTS['zero'] = LOCAL.ALL_OBJECTS['zeros']
  62. 121 # For backwards compatibility, we populate this file with the objects
  63. 122 # from ALL_OBJECTS. We make no guarantees as to whether these objects will
  64. 123 # using their correct version.
  65. --> 124 populate_deserializable_objects()
  66. 125 globals().update(LOCAL.ALL_OBJECTS)
  67. 127 # Utility functions
  68.  
  69. File ~/anaconda3/envs/tf_gpu/lib/python3.8/site-packages/keras/initializers/__init__.py:49, in populate_deserializable_objects()
  70. 46 return
  71. 48 LOCAL.ALL_OBJECTS = {}
  72. ---> 49 LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
  73. 51 # Compatibility aliases (need to exist in both V1 and V2).
  74. 52 LOCAL.ALL_OBJECTS['ConstantV2'] = initializers_v2.Constant
  75.  
  76. AttributeError: module 'tensorflow.compat.v2' has no attribute '__internal__'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement