def store_episode(self, episode_batch):
        """episode_batch: array(batch_size x (T or T+1) x dim_key)
        """
        batch_sizes = [len(episode_batch[key]) for key in episode_batch.keys()]
        assert np.all(np.array(batch_sizes) == batch_sizes[0])
        batch_size = batch_sizes[0]

        with self.lock:
            idxs = self._get_storage_idx(batch_size)

            # load inputs into buffers
            for key in self.buffers.keys():
                self.buffers[key][idxs] = episode_batch[key]

            self.n_transitions_stored += batch_size * self.T
def store_episode(self, episode_batch):
        """episode_batch: array(batch_size x (T or T+1) x dim_key)
        """
        batch_sizes = [len(episode_batch[key]) for key in episode_batch.keys()]
        assert np.all(np.array(batch_sizes) == batch_sizes[0])
        batch_size = batch_sizes[0]

        with self.lock:
            idxs = self._get_storage_idx(batch_size)

            # load inputs into buffers
            for key in self.buffers.keys():
                self.buffers[key][idxs] = episode_batch[key]

            self.n_transitions_stored += batch_size * self.T
def store_episode ( self , episode_batch ) : batch_sizes = [ len ( episode_batch [ key ] ) for key in episode_batch . keys ( ) ] assert np . all ( np . array ( batch_sizes ) == batch_sizes [ 0 ] ) batch_size = batch_sizes [ 0 ] with self . lock : idxs = self . _get_storage_idx ( batch_size ) # load inputs into buffers for key in self . buffers . keys ( ) : self . buffers [ key ] [ idxs ] = episode_batch [ key ] self . n_transitions_stored += batch_size * self . T
episode_batch: array(batch_size x (T or T+1) x dim_key)
episode_batch : array ( batch_size x ( T or T + 1 ) x dim_key )