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

change the size of training data #99

Closed
ErisGe opened this issue Mar 15, 2020 · 2 comments
Closed

change the size of training data #99

ErisGe opened this issue Mar 15, 2020 · 2 comments
Labels

Comments

@ErisGe
Copy link

ErisGe commented Mar 15, 2020

I saw that your answer about training data'size, and said that 'by setting the length of the first axis to a smaller number'. But how can I change this value?

def load_data_from_npz(filename): """Load and return the training data from a npz file (sparse format).""" with np.load(filename) as f: data = np.zeros(f['shape'], np.bool_) data[[x for x in f['nonzero']]] = True return data

@salu133445
Copy link
Owner

Hi, you can replace the last line with return data[:5000] for example.

@ErisGe
Copy link
Author

ErisGe commented Mar 19, 2020

Oh, thank you so much!

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

No branches or pull requests

2 participants