Skip to content
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

ResNet architecture throws an error #2

Closed
0xpranjal opened this issue Jan 15, 2021 · 1 comment
Closed

ResNet architecture throws an error #2

0xpranjal opened this issue Jan 15, 2021 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@0xpranjal
Copy link
Owner


TypeError Traceback (most recent call last)
in
11 BatchNormalization(),
12 Dropout(0.3),
---> 13 Dense(1,activation="sigmoid")
14 ])
15

/opt/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
--> 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access

/opt/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/sequential.py in init(self, layers, name)
114 tf_utils.assert_no_legacy_layers(layers)
115 for layer in layers:
--> 116 self.add(layer)
117
118 @Property

/opt/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
--> 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access

/opt/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/sequential.py in add(self, layer)
159 raise TypeError('The added layer must be '
160 'an instance of class Layer. '
--> 161 'Found: ' + str(layer))
162
163 tf_utils.assert_no_legacy_layers([layer])

TypeError: The added layer must be an instance of class Layer. Found: <keras.engine.training.Model object at 0x7f927a019410>

@0xpranjal 0xpranjal added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jan 15, 2021
@0xpranjal
Copy link
Owner Author

This issue can be solved by removing tf.keras in the Sequential model.

0xpranjal added a commit that referenced this issue Jan 15, 2021
0xpranjal added a commit that referenced this issue Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant