File "D:\Pycharm Projects\ThesisFinal\Game Theoretical Adversarial Deep Learning\rolling_window_6_categories_8_limit_90_dropout_coord_inp2.py", line 22, in build
coord1 = CoordinateChannel2D()(input_layer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Pycharm Projects\ThesisFinal.venv\Lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 1026, in call
input_spec.assert_input_compatibility(self.input_spec, inputs, self.name)
File "D:\Pycharm Projects\ThesisFinal.venv\Lib\site-packages\tensorflow\python\keras\engine\input_spec.py", line 226, in assert_input_compatibility
ndim = x.shape.rank
^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'rank'
First of all, thank you so much for this code implementation but it's not working for me.
I added the layer in the code as follows:
def build(width, height, depth, classes): inputShape = (height, width, depth) input_layer = Input(shape=inputShape)
and I am getting this stack trace as an error.
File "D:\Pycharm Projects\ThesisFinal\Game Theoretical Adversarial Deep Learning\rolling_window_6_categories_8_limit_90_dropout_coord_inp2.py", line 22, in build coord1 = CoordinateChannel2D()(input_layer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Pycharm Projects\ThesisFinal.venv\Lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 1026, in call input_spec.assert_input_compatibility(self.input_spec, inputs, self.name) File "D:\Pycharm Projects\ThesisFinal.venv\Lib\site-packages\tensorflow\python\keras\engine\input_spec.py", line 226, in assert_input_compatibility ndim = x.shape.rank ^^^^^^^^^^^^ AttributeError: 'tuple' object has no attribute 'rank'
What am I doing wrong ?