447444fd06594e531ae1141afac78051481e4468,catalyst/rl/offpolicy/algorithms/sac.py,SAC,_categorical_loss,#SAC#Any#Any#Any#Any#Any#,128

Before Change


        z_target_tp1 = (self.z[None, :] - logprob_tp1[:, None]).detach()
        // B x num_atoms
        // Unsqueeze so its the same for each head
        z_target_tp1 = z_target_tp1.unsqueeze(1)

        atoms_target_t = rewards_t + (1 - done_t) * gammas * z_target_tp1
        value_loss = [
            utils.categorical_loss(

After Change



        // [bs; num_atoms] -> unsqueeze so its the same for each head
        // [bs; 1; num_atoms]
        z_target_tp1 = (
            self.z[None, :] - logprob_tp1[:, None]
        ).unsqueeze(1).detach()
        // [bs; num_heads; num_atoms] -> many-heads view transform
        // [{bs * num_heads}; num_atoms]
        atoms_target_t = (
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: catalyst-team/catalyst
Commit Name: 447444fd06594e531ae1141afac78051481e4468
Time: 2019-10-31
Author: scitator@gmail.com
File Name: catalyst/rl/offpolicy/algorithms/sac.py
Class Name: SAC
Method Name: _categorical_loss


Project Name: OpenNMT/OpenNMT-py
Commit Name: 7dcc162114ac1d3c3846150d5c600f4d8683fa73
Time: 2018-02-16
Author: srush@seas.harvard.edu
File Name: onmt/Models.py
Class Name: RNNDecoderBase
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 3bb62b0838e580201810095961db156f45368c6e
Time: 2018-12-08
Author: guillaume.klein@systrangroup.com
File Name: onmt/decoders/decoder.py
Class Name: RNNDecoderBase
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 809d0e5b52561fefd3b0d98c08d3cbb175d7e706
Time: 2017-07-04
Author: sasha.rush@gmail.com
File Name: onmt/modules/Util.py
Class Name: LayerNorm
Method Name: forward