5e76b6981d0b48def00d4fa97caec24accf402fd,contents/5.2_Prioritized_Replay_DQN/RL_brain.py,Memory,sample,#Memory#,116

Before Change


            batch_memory.append(data)

        ISWeights = np.vstack(ISWeights)
        ISWeights = np.power(ISWeights, -self.beta) / maxiwi  // normalize
        return batch_idx, np.vstack(batch_memory), ISWeights

    def update(self, idx, error):

After Change


            v = np.random.uniform(a, b)
            idx, p, data = self.tree.get_leaf(v)
            prob = p / self.tree.total_p
            ISWeights[i, 0] = np.power(prob/min_prob, -self.beta)
            b_idx[i], b_memory[i, :] = idx, data
        return b_idx, b_memory, ISWeights

    def batch_update(self, tree_idx, abs_errors):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: MorvanZhou/Reinforcement-learning-with-tensorflow
Commit Name: 5e76b6981d0b48def00d4fa97caec24accf402fd
Time: 2017-08-16
Author: morvanzhou@gmail.com
File Name: contents/5.2_Prioritized_Replay_DQN/RL_brain.py
Class Name: Memory
Method Name: sample


Project Name: r9y9/deepvoice3_pytorch
Commit Name: c6af9b877a757d7a5f92eac4bffd83bfb24ada08
Time: 2018-02-25
Author: zryuichi@gmail.com
File Name: audio.py
Class Name:
Method Name: _db_to_amp


Project Name: r9y9/wavenet_vocoder
Commit Name: 26e4305dab0eec33fc8d54f717f12ca603e17ca6
Time: 2018-02-25
Author: zryuichi@gmail.com
File Name: audio.py
Class Name:
Method Name: _db_to_amp