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

Exercise 4 - using validation data in train #14

Open
ikvision opened this issue Apr 26, 2016 · 2 comments
Open

Exercise 4 - using validation data in train #14

ikvision opened this issue Apr 26, 2016 · 2 comments

Comments

@ikvision
Copy link

ikvision commented Apr 26, 2016

@vedaldi Thank you for the detailed tutorial, I learned a lot by playing with it.
In exercise 4 it seems the imageMean is calculated on all the data (train+validation). In realistic scenario the validation set is given after the training phase.
What do you think about the following change:
exercise4.m on line 45:
imageMean = mean(imdb.images.data(:)) ;
should maybe replaced by
imageMean = mean(imdb.images.data(imdb.images.set==1)) ;

@vedaldi
Copy link
Owner

vedaldi commented Apr 26, 2016

Hi, yes, this is probably a good suggestion. However, you would need to modify your solution a little to account for the fact that data has H x W x 3 x N dimensions.

On 26 Apr 2016, at 02:53, ik_vision [email protected] wrote:

@vedaldi https://github.com/vedaldi Thank you for the detailed tutorial, I learned a lot by playing with it.
In exercise 4 it seems the imageMean is calculated on all the data (train+validation). In realistic scenario the validation set is given after the training phase.
What do you think about the following change:
exercise4.m on line 45:
imageMean = mean(imdb.images.data(:)) ;
%should maybe replaced by
imageMean = mean(imdb.images.data( imdb.images.set==1)) ;


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #14

@ikvision
Copy link
Author

ikvision commented Apr 26, 2016

Thank you for the quick reply, I fixed my solution to:
train_data=imdb.images.data(:,:,imdb.images.set==1);
imageMean =mean(train_data(:))
It made Less than a half a percent diff in the imageMean value

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