1113670b794b23c39cf23a9a532f866d08b63fdb,softlearning/replay_buffers/simple_replay_buffer.py,SimpleReplayBuffer,__init__,#SimpleReplayBuffer#Any#Any#,9

Before Change


        self._observation_dim = env_spec.observation_space.flat_dim
        self._action_dim = env_spec.action_space.flat_dim
        self._max_buffer_size = max_replay_buffer_size
        self._observations = np.zeros((max_replay_buffer_size,
                                       self._observation_dim))
        // It"s a bit memory inefficient to save the observations twice,
        // but it makes the code *much* easier since you no longer have to
        // worry about termination conditions.
        self._next_obs = np.zeros((max_replay_buffer_size,

After Change


        self.fields = fields
        self.field_names = list(fields.keys())

        for field_name, field_attrs in fields.items():
            field_shape = [max_replay_buffer_size] + list(field_attrs["shape"])
            setattr(self, field_name, np.zeros(field_shape))

        self._pointer = 0
        self._size = 0

    @property
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: rail-berkeley/softlearning
Commit Name: 1113670b794b23c39cf23a9a532f866d08b63fdb
Time: 2018-06-30
Author: kristian.hartikainen@gmail.com
File Name: softlearning/replay_buffers/simple_replay_buffer.py
Class Name: SimpleReplayBuffer
Method Name: __init__


Project Name: tristandeleu/pytorch-maml-rl
Commit Name: 01b8f6eef41c36f12019adfc23ace2a100d77610
Time: 2019-11-24
Author: tristan.deleu@gmail.com
File Name: maml_rl/envs/sync_vector_env.py
Class Name: SyncVectorEnv
Method Name: __init__


Project Name: pymc-devs/pymc3
Commit Name: 5b2766aae94c0615aef2c8d6ac178428e6d28745
Time: 2008-07-20
Author: fonnesbeck@15d7aa0b-6f1a-0410-991a-d59f85d14984
File Name: pymc/database/mysql.py
Class Name: Trace
Method Name: _initialize