Update README.md
Browse files
README.md
CHANGED
@@ -65,8 +65,8 @@ MAX_SEQUENCE_LENGTH = 200
|
|
65 |
model = tf.keras.models.load_model('RETO-SENTIMENT.h5', custom_objects={'AttentionLayer': AttentionLayer})
|
66 |
|
67 |
class AttentionLayer(tf.keras.layers.Layer):
|
68 |
-
def __init__(self):
|
69 |
-
super(AttentionLayer, self).__init__()
|
70 |
|
71 |
def call(self, inputs):
|
72 |
attention_weights = tf.nn.softmax(tf.reduce_sum(inputs, axis=-1), axis=-1)
|
|
|
65 |
model = tf.keras.models.load_model('RETO-SENTIMENT.h5', custom_objects={'AttentionLayer': AttentionLayer})
|
66 |
|
67 |
class AttentionLayer(tf.keras.layers.Layer):
|
68 |
+
def __init__(self, **kwargs):
|
69 |
+
super(AttentionLayer, self).__init__(**kwargs)
|
70 |
|
71 |
def call(self, inputs):
|
72 |
attention_weights = tf.nn.softmax(tf.reduce_sum(inputs, axis=-1), axis=-1)
|