You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tensorlayer/layers.py
+23-24Lines changed: 23 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -651,30 +651,34 @@ def __init__(
651
651
self.all_drop= {}
652
652
653
653
654
-
classAverageEmbeddingInputlayer(Layer):
655
-
"""The :class:`AverageEmbeddingInputlayer` class is for FastText Embedding for sentence classification, see `[1] <http://arxiv.org/abs/1607.01759>`_.
654
+
classAverageEmbeddingInputLayer(Layer):
655
+
""":class:`AverageEmbeddingInputlayer` averages over embeddings of inputs.
656
+
657
+
:class:`AverageEmbeddingInputlayer` can be used as the input layer
658
+
for models like DAN[1] and FastText[2].
656
659
657
660
Parameters
658
661
------------
659
-
inputs : input placeholder or tensor; zeros are paddings
662
+
inputs : input placeholder or tensor
660
663
vocabulary_size : an integer, the size of vocabulary
661
664
embedding_size : an integer, the dimension of embedding vectors
665
+
pad_value : an integer, the scalar pad value used in inputs
662
666
name : a string, the name of the layer
663
667
embeddings_initializer : the initializer of the embedding matrix
664
668
embeddings_kwargs : kwargs to get embedding matrix variable
665
669
666
670
References
667
671
------------
668
-
- [1] Joulin, A., Grave, E., Bojanowski, P., & Mikolov, T. (2016). `Bag of Tricks for Efficient Text Classification. <http://arxiv.org/abs/1607.01759>`_
669
-
- [2] Recht, B., Re, C., Wright, S., & Niu, F. (2011). `Hogwild: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent. <https://arxiv.org/abs/1106.5730>`_ In NPIS 2011 (pp. 693–701).
- [1] Iyyer, M., Manjunatha, V., Boyd-Graber, J., & Daum’e III, H. (2015). Deep Unordered Composition Rivals Syntactic Methods for Text Classification. In Association for Computational Linguistics.
673
+
- [2] Joulin, A., Grave, E., Bojanowski, P., & Mikolov, T. (2016).`Bag of Tricks for Efficient Text Classification. <http://arxiv.org/abs/1607.01759>`_
0 commit comments