diff --git a/python/bigdl/dllib/nn/layer.py b/python/bigdl/dllib/nn/layer.py
index <HASH>..<HASH> 100644
--- a/python/bigdl/dllib/nn/layer.py
+++ b/python/bigdl/dllib/nn/layer.py
@@ -902,6 +902,34 @@ class Model(Container):
         callBigDlFunc(bigdl_type, "saveGraphTopology", self.value, log_path)
         return self
 
+class Attention(Layer):
+
+    '''
+    Implementation of multiheaded attention and self-attention layers.
+
+    >>> attention = Attention(8, 4, 1.0)
+    creating: createAttention
+    '''
+
+    def __init__(self, hidden_size, num_heads, attention_dropout, bigdl_type="float"):
+        super(Attention, self).__init__(None, bigdl_type,
+                                        hidden_size, num_heads, attention_dropout)
+
+class FeedForwardNetwork(Layer):
+
+    '''
+    Implementation FeedForwardNetwork constructed with fully connected network.
+    Input with shape (batch_size, length, hidden_size)
+    Output with shape (batch_size, length, hidden_size)
+
+    >>> ffn = FeedForwardNetwork(8, 4, 1.0)
+    creating: createFeedForwardNetwork
+    '''
+
+    def __init__(self, hidden_size, filter_size, relu_dropout, bigdl_type="float"):
+        super(FeedForwardNetwork, self).__init__(None, bigdl_type,
+                                        hidden_size, filter_size, relu_dropout)
+
 class Linear(Layer):
 
     '''
[New feature] Add attention layer and ffn layer (#<I>)

* add attention layer



* add ffn layer and more unit tests



* refactor according to pr comments



* add SerializationTest



* fix unit tests



* add python api