Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible error in ReplayBuffer class init method #115

Open
BruceDai003 opened this issue Nov 28, 2018 · 1 comment
Open

Possible error in ReplayBuffer class init method #115

BruceDai003 opened this issue Nov 28, 2018 · 1 comment

Comments

@BruceDai003
Copy link

BruceDai003 commented Nov 28, 2018

The original code I copy pasted here:

class ReplayBuffer:
    def __init__(self, start_index, end_index, batch_size, is_permed, coin_number, sample_bias=1.0):
        """
        :param start_index: start index of the training set on the global data matrices
        :param end_index: end index of the training set on the global data matrices
        """
        self.__coin_number = coin_number
        self.__experiences = [Experience(i) for i in range(start_index, end_index)]

I think it should be replaced with self.__experiences = [Experience(i) for i in range(start_index, end_index+1)], otherwise the length will be 1 item shorter than other objects, e.g., _train_ind is from 0 to 32248.

@dexhunter
Copy link
Collaborator

I think end_index+1 makes sense @ZhengyaoJiang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants