f53c38e5ea290616a3be50a99755272a12696070,texar/modules/decoders/rnn_decoders.py,AttentionRNNDecoder,__init__,#AttentionRNNDecoder#Any#Any#Any#Any#Any#Any#Any#Any#,310
Before Change
attn_kwargs = attn_hparams["kwargs"].todict()
// Parse the "probability_fn" argument
prob_fn = attn_kwargs.get("probability_fn", None)
if prob_fn is None:
prob_fn = tf.nn.softmax
if not callable(prob_fn):
prob_fn = get_class(prob_fn)
After Change
if "probability_fn" in attn_kwargs:
prob_fn = attn_kwargs["probability_fn"]
if prob_fn is not None and not callable(prob_fn):
prob_fn = get_function(
prob_fn,
["tensorflow.nn", "tensorflow.contrib.sparsemax",
"tensorflow.contrib.seq2seq"])
attn_kwargs["probability_fn"] = prob_fn
attn_kwargs.update({
"memory_sequence_length": memory_sequence_length,
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances Project Name: asyml/texar
Commit Name: f53c38e5ea290616a3be50a99755272a12696070
Time: 2018-01-28
Author: zhiting.hu@petuum.com
File Name: texar/modules/decoders/rnn_decoders.py
Class Name: AttentionRNNDecoder
Method Name: __init__
Project Name: dmlc/gluon-nlp
Commit Name: 1e50a6606c5215e0dc28d016bb5f57bd668f47af
Time: 2019-06-06
Author: lausen@amazon.com
File Name: src/gluonnlp/vocab/bert.py
Class Name: BERTVocab
Method Name: from_json
Project Name: dmlc/gluon-nlp
Commit Name: 5046ad770bf2c5d57ff4ce68f1e2aa8e0f69ce26
Time: 2018-11-22
Author: szha@users.noreply.github.com
File Name: docs/conf.py
Class Name:
Method Name:
Project Name: ray-project/ray
Commit Name: c9f13b0833ee499a074f15192a6eaf7a6513a296
Time: 2020-08-13
Author: ekhliang@gmail.com
File Name: python/ray/worker.py
Class Name:
Method Name: get_gpu_ids