70a188776f7470c838dd22b1636462b75573a734,src/gluonnlp/layers.py,LearnedPositionalEmbedding,__init__,#LearnedPositionalEmbedding#Any#Any#Any#Any#Any#Any#Any#,503
Before Change
self._max_length = max_length
self._mode = mode
with self.name_scope():
self.weight = self.params.get("weight", shape=(max_length, units),
init=weight_initializer, dtype=dtype,
allow_deferred_init=True)
def __repr__(self):
s = "{name}(units={units}, max_length={max_length}, mode={mode}, dtype={dtype})"
return s.format(name=self.__class__.__name__,
units=self._units,
After Change
init=embedding_initializer,
allow_deferred_init=True))
setattr(self, "inter_proj{}_weight".format(i),
Parameter("inter_proj{}_weight".format(i),
shape=(inner_embed_size, units),
init=weight_initializer,
allow_deferred_init=True))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: src/gluonnlp/layers.py
Class Name: LearnedPositionalEmbedding
Method Name: __init__
Project Name: dmlc/gluon-cv
Commit Name: 4999f9795af7a21ca69adf5f72301b79f719498e
Time: 2018-06-05
Author: 8041160+zhanghang1989@users.noreply.github.com
File Name: gluoncv/model_zoo/pspnet.py
Class Name: PSPNet
Method Name: __init__
Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: src/gluonnlp/layers.py
Class Name: PositionalEmbedding
Method Name: __init__