2255f7f623a88b730584bb1d2a0acdbafa0cdbc8,open_seq2seq/encoders/transformer_encoder.py,TransformerEncoder,get_optional_params,#,27

Before Change


            included into the ``params`` parameter of the
            class :meth:`__init__` method.
    
    return {
      "regularizer": None,  // any valid TensorFlow regularizer
      "regularizer_params": dict,
      "initializer": None,  // any valid TensorFlow initializer
      "initializer_params": dict,
      "encoder_layers": int,
      "hidden_size": int,
      "num_heads": int,
      "attention_dropout": float,
      "filter_size": int,
      "src_vocab_size": int,
      "relu_dropout": float,
      "layer_postprocess_dropout": float,
      "dtype": [tf.float32, tf.float16, "mixed"],
    }
  Transformer model encoder
  def __init__(self, params, model, name="transformer_encoder", mode="train"):
    super(TransformerEncoder, self).__init__(
      params, model, name=name, mode=mode,

After Change


            included into the ``params`` parameter of the
            class :meth:`__init__` method.
    
    return dict(Encoder.get_optional_params(), **{
      "regularizer": None,  // any valid TensorFlow regularizer
      "regularizer_params": dict,
      "initializer": None,  // any valid TensorFlow initializer
      "initializer_params": dict,
    })

  def __init__(self, params, model, name="transformer_encoder", mode="train"):
    super(TransformerEncoder, self).__init__(
      params, model, name=name, mode=mode,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 2255f7f623a88b730584bb1d2a0acdbafa0cdbc8
Time: 2018-05-16
Author: okuchaiev@nvidia.com
File Name: open_seq2seq/encoders/transformer_encoder.py
Class Name: TransformerEncoder
Method Name: get_optional_params


Project Name: asyml/texar
Commit Name: d3a99695afb9a7e050ef00c37519b11432c5fa3f
Time: 2018-03-16
Author: zhitinghu@gmail.com
File Name: texar/data/data/text_data_base.py
Class Name: TextDataBase
Method Name: default_hparams


Project Name: tryolabs/luminoth
Commit Name: 45c42bcaa66264df7001c814b00a2c3f64e46b97
Time: 2017-06-23
Author: javirey@gmail.com
File Name: frcnn/network.py
Class Name: FasterRCNN
Method Name: _build