a947d66d28baaae1302363556a8a18b04fa6aa40,gluonnlp/embedding/evaluation.py,ThreeCosMul,__init__,#ThreeCosMul#Any#Any#Any#,249
Before Change
self.k = k
self.eps = eps
self._vocab_size, self._embed_size = idx_to_vec.shape
idx_to_vec = mx.nd.L2Normalization(idx_to_vec, eps=self.eps)
with self.name_scope():
self.weight = self.params.get_constant("weight", idx_to_vec)
def hybrid_forward(self, F, words1, words2, words3, weight): // pylint: disable=arguments-differ
Implement forward computation.
words123 = F.concat(words1, words2, words3, dim=0)
embeddings_words123 = F.Embedding(words123, weight,
After Change
Parameters
----------
kind : ["similarity", "analogy", None]
Return only valid names for similarity, analogy or both kinds of functions.
Returns
-------
dict or list:
A list of all the valid evaluation function names for the specified
kind. If kind is set to None, returns a dict mapping each valid name to
its respective output list. The valid names can be plugged in
`gluonnlp.model.word_evaluation_model.create(name)`.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: dmlc/gluon-nlp
Commit Name: a947d66d28baaae1302363556a8a18b04fa6aa40
Time: 2018-08-16
Author: leonard@lausen.nl
File Name: gluonnlp/embedding/evaluation.py
Class Name: ThreeCosMul
Method Name: __init__
Project Name: dmlc/gluon-nlp
Commit Name: a947d66d28baaae1302363556a8a18b04fa6aa40
Time: 2018-08-16
Author: leonard@lausen.nl
File Name: gluonnlp/embedding/evaluation.py
Class Name: ThreeCosMul
Method Name: __init__
Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: src/gluonnlp/models/albert.py
Class Name: AlbertForPretrain
Method Name: __init__
Project Name: osmr/imgclsmob
Commit Name: c1d2e0e7dc79e4f1a91ef007771347e475f301e5
Time: 2019-08-20
Author: osemery@gmail.com
File Name: gluon/gluoncv2/models/bninception.py
Class Name: Inception3x3Branch
Method Name: __init__