I’ve made a custom layer with the class method and when I’m trying to call the class it shows this error message :
AttributeError Traceback (most recent call last)
<ipython-input-143-9ad907fef5b1> in <module>
----> 1 model.layers()
AttributeError: 'lane_detection_network' object has no attribute 'layers'
the code is here
class lane_detection_network(tf.Module):
def __init__(self):
super(lane_detection_network, self).__init__()
self.resizing = resize_layer(3, 128)
#feature extraction
self.layer1 = hourglass_block(128, 128)
self.layer2 = hourglass_block(128, 128)
def call(self, inputs):
#feature extraction
out = self.resizing(inputs)
result1, out = self.layer1(out)
result2, out = self.layer2(out)
return [result1, result2]