30efaaa572d798212c926e5b2edbf2b0fe7fa2f1,opennmt/decoders/rnn_decoder.py,AttentionalRNNDecoder,_get_initial_state,#AttentionalRNNDecoder#Any#Any#Any#,117

Before Change


      self.cell.cells[0] = tfa.seq2seq.AttentionWrapper(
          self.cell.cells[0],
          attention_mechanism,
          attention_layer_size=self.cell.cells[0].output_size,
          initial_cell_state=initial_cell_state[0])
    else:
      self.cell = tfa.seq2seq.AttentionWrapper(

After Change


        self.memory,
        memory_sequence_length=self.memory_sequence_length)
    decoder_state = self.cell.get_initial_state(batch_size=batch_size, dtype=dtype)
    if initial_state is not None:
      if self.first_layer_attention:
        cell_state = list(decoder_state)
        cell_state[0] = decoder_state[0].cell_state
        cell_state = self.bridge(initial_state, cell_state)
        cell_state[0] = decoder_state[0].clone(cell_state=cell_state[0])
        decoder_state = tuple(cell_state)
      else:
        cell_state = self.bridge(initial_state, decoder_state.cell_state)
        decoder_state = decoder_state.clone(cell_state=cell_state)
    return decoder_state

  def step(self,
           inputs,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: OpenNMT/OpenNMT-tf
Commit Name: 30efaaa572d798212c926e5b2edbf2b0fe7fa2f1
Time: 2019-07-15
Author: guillaume.klein@systrangroup.com
File Name: opennmt/decoders/rnn_decoder.py
Class Name: AttentionalRNNDecoder
Method Name: _get_initial_state


Project Name: bearpaw/pytorch-pose
Commit Name: 0181fe9fc837b8cdcc612375f2f174c5652ef87a
Time: 2017-06-16
Author: platero.yang@gmail.com
File Name: example/mpii.py
Class Name:
Method Name: validate


Project Name: explosion/thinc
Commit Name: cc53003029d11839c394a9544a1394b62721869d
Time: 2019-10-18
Author: honnibal+gh@gmail.com
File Name: thinc/extra/wrappers.py
Class Name: PyTorchWrapper
Method Name: use_params


Project Name: explosion/thinc
Commit Name: 3c7d4d1240103e4c06a0110b00e11b7e1002dd0e
Time: 2020-01-12
Author: honnibal+gh@gmail.com
File Name: thinc/layers/lstm.py
Class Name:
Method Name: LSTM


Project Name: open-mmlab/mmdetection
Commit Name: cd0d37ccb398b7e80dd7af06925246e133d8178c
Time: 2019-12-18
Author: yhcao6@gmail.com
File Name: mmdet/apis/train.py
Class Name:
Method Name: parse_losses