f056fb8f6226c83d340c869e0d5312d61acf07f0,src/garage/torch/q_functions/discrete_dueling_cnn_q_function.py,DiscreteDuelingCNNQFunction,forward,#DiscreteDuelingCNNQFunction#Any#,115

Before Change


            obs_shape = ((len(observations), ) +
                         self._env_spec.observation_space.shape)
            observations = observations.reshape(obs_shape)
        return super().forward(observations)

After Change


            torch.Tensor: Output value
        
        // We"re given flattened observations.
        observations = observations.reshape(
            -1, *self._env_spec.observation_space.shape)
        out = self._module(observations)
        val = self._val(out)
        act = self._act(out)
        act = act - act.mean(1).unsqueeze(1)
        return val + act
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rlworkgroup/garage
Commit Name: f056fb8f6226c83d340c869e0d5312d61acf07f0
Time: 2021-03-23
Author: 41180126+krzentner@users.noreply.github.com
File Name: src/garage/torch/q_functions/discrete_dueling_cnn_q_function.py
Class Name: DiscreteDuelingCNNQFunction
Method Name: forward


Project Name: GPflow/GPflow
Commit Name: f4559a3d47510f776b3e38d5aceb07ee4b4b0ea9
Time: 2017-11-24
Author: james@prowler.io
File Name: gpflow/transforms.py
Class Name: DiagMatrix
Method Name: forward


Project Name: dmlc/gluon-nlp
Commit Name: 6e4ae87778510fb8894583ad0a69d86ad6b6a724
Time: 2019-09-24
Author: linhaibin.eric@gmail.com
File Name: scripts/bert/run_pretraining.py
Class Name: ParallelBERT
Method Name: forward_backward