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

Why do we load the data once prior to the loop of epochs in the main function of training phase? #16

Open
Harry-Zhi opened this issue Dec 5, 2016 · 0 comments

Comments

@Harry-Zhi
Copy link

Hi, Dimatura.

In your main function of file 'train.py', you first load the data once and then in the loop of every epoch you load the data again.

` loader = (data_loader(cfg, args.training_fname))

    for epoch in xrange(cfg['max_epochs']):

           loader = (data_loader(cfg, args.training_fname))`

I wonder why we first use the data_loader function before the loop (as the bold face codes show)?

Is it unnecessary or I do not get your point?
That is to say, how about just writing:
`
for epoch in xrange(cfg['max_epochs']):

           loader = (data_loader(cfg, args.training_fname))`

Could you please help me on that?

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

Successfully merging a pull request may close this issue.

1 participant