9128a4b20336fb8c07fc4e0e0985fe299d1a5f12,tensorforce/core/memories/replay_memory.py,ReplayMemory,get_batch,#ReplayMemory#Any#,71

Before Change


            batch["states"][state] = self.states[state].take(indices)
        for action in self.actions:
            batch["actions"][action] = self.actions[action].take(indices)
        batch["rewards"] = self.rewards.take(indices)
        batch["terminals"] = self.rewards.take(indices)
        for n in range(len(self.internals)):
            batch["internals"].append(self.internals.take(indices))

After Change


            actions={name: action.take(indices) for name, action in self.actions.items()},
            rewards=self.rewards.take(indices),
            terminals=self.terminals.take(indices),
            internals=[internal.take(indices, axis=0) for internal in self.internals]
        )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: reinforceio/tensorforce
Commit Name: 9128a4b20336fb8c07fc4e0e0985fe299d1a5f12
Time: 2017-05-20
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/core/memories/replay_memory.py
Class Name: ReplayMemory
Method Name: get_batch


Project Name: scipy/scipy
Commit Name: 3c4584ebf2c457a607b5fc3da527c61682750f32
Time: 2016-10-07
Author: ralf.gommers@googlemail.com
File Name: scipy/cluster/vq.py
Class Name:
Method Name: kmeans


Project Name: BindsNET/bindsnet
Commit Name: 32b24fe5c96a8d08259e73f4406052e0777eb628
Time: 2020-03-02
Author: 280943872@qq.com
File Name: bindsnet/network/topology.py
Class Name: MaxPool2dConnection
Method Name: compute


Project Name: tensorflow/magenta
Commit Name: e5a45e3aa94a8ad91226c027c5b68c8f5fbb967f
Time: 2018-02-20
Author: adarob@google.com
File Name: magenta/models/music_vae/music_vae_train.py
Class Name:
Method Name: evaluate