Is something wrong with this gridsearchCV?
I am currently using grid search to optimize my keras model… Something seemed a bit off during the training? https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201... <https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...> For some reason is the training for each epoch not done for all datapoints?… What could be wrong? Here is the code: http://pastebin.com/raw/itJFm5a6 <http://pastebin.com/raw/itJFm5a6> Anything that seems off?
I am not using Keras and don’t know how nicely it plays with sklearn objects these days, but you are not giving all the data to the grid search object, which is why your model doesn’t get to see the whole dataset during grid search; i.e., you have `np.asarray(input_train[:-(len(input_train)/1000)]`
On Mar 16, 2017, at 11:50 AM, Carlton Banks <noflaco@gmail.com> wrote:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
My intention with this was to shrink my dataset, to make the grid search a bit faster, and easier to go through… I guess I’ve tackled the wrong way...
Den 16. mar. 2017 kl. 17.27 skrev Sebastian Raschka <se.raschka@gmail.com>:
I am not using Keras and don’t know how nicely it plays with sklearn objects these days, but you are not giving all the data to the grid search object, which is why your model doesn’t get to see the whole dataset during grid search; i.e., you have `np.asarray(input_train[:-(len(input_train)/1000)]`
On Mar 16, 2017, at 11:50 AM, Carlton Banks <noflaco@gmail.com> wrote:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
IMO this has nothing to do with GridSearchCV itself... It rather looks like different (verbose) keras models are being trained simultaneously, and therefore "collapsing" your stdout. I recommend setting Keras verbosity level to 3, in order to avoid printing the progress bars during GridSearchCV (which can be misleading). -- Julio
El 16 mar 2017, a las 16:50, Carlton Banks <noflaco@gmail.com> escribió:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
I am running this on a super computer, so yes I am running a few training sessions. I guess i will look at the verbose, and the adjust the training data size.
Den 16. mar. 2017 kl. 17.30 skrev Julio Antonio Soto de Vicente <julio@esbet.es>:
IMO this has nothing to do with GridSearchCV itself...
It rather looks like different (verbose) keras models are being trained simultaneously, and therefore "collapsing" your stdout.
I recommend setting Keras verbosity level to 3, in order to avoid printing the progress bars during GridSearchCV (which can be misleading).
-- Julio
El 16 mar 2017, a las 16:50, Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>> escribió:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201... <https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...>
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6 <http://pastebin.com/raw/itJFm5a6>
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn <https://mail.python.org/mailman/listinfo/scikit-learn>
scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
Ohh.. actually the data size cannot be wrong.. input_train and output_train are both lists… which i then only take a part of … and then make then to a np.array… So that should not be incorrect.
Den 16. mar. 2017 kl. 17.33 skrev Carlton Banks <noflaco@gmail.com>:
I am running this on a super computer, so yes I am running a few training sessions. I guess i will look at the verbose, and the adjust the training data size.
Den 16. mar. 2017 kl. 17.30 skrev Julio Antonio Soto de Vicente <julio@esbet.es <mailto:julio@esbet.es>>:
IMO this has nothing to do with GridSearchCV itself...
It rather looks like different (verbose) keras models are being trained simultaneously, and therefore "collapsing" your stdout.
I recommend setting Keras verbosity level to 3, in order to avoid printing the progress bars during GridSearchCV (which can be misleading).
-- Julio
El 16 mar 2017, a las 16:50, Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>> escribió:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201... <https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...>
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6 <http://pastebin.com/raw/itJFm5a6>
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn <https://mail.python.org/mailman/listinfo/scikit-learn>
scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn
I haven’t a verbosity level in the code?… but set it to 3 as suggested by Julio… It did not seem to work.. https://www.dropbox.com/s/nr5rattzts0wuvd/Screenshot%20from%202017-03-16%201...
Den 16. mar. 2017 kl. 17.51 skrev Carlton Banks <noflaco@gmail.com>:
Ohh.. actually the data size cannot be wrong.. input_train and output_train are both lists… which i then only take a part of … and then make then to a np.array…
So that should not be incorrect.
Den 16. mar. 2017 kl. 17.33 skrev Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>>:
I am running this on a super computer, so yes I am running a few training sessions. I guess i will look at the verbose, and the adjust the training data size.
Den 16. mar. 2017 kl. 17.30 skrev Julio Antonio Soto de Vicente <julio@esbet.es <mailto:julio@esbet.es>>:
IMO this has nothing to do with GridSearchCV itself...
It rather looks like different (verbose) keras models are being trained simultaneously, and therefore "collapsing" your stdout.
I recommend setting Keras verbosity level to 3, in order to avoid printing the progress bars during GridSearchCV (which can be misleading).
-- Julio
El 16 mar 2017, a las 16:50, Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>> escribió:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201... <https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...>
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6 <http://pastebin.com/raw/itJFm5a6>
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn <https://mail.python.org/mailman/listinfo/scikit-learn>
scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn <https://mail.python.org/mailman/listinfo/scikit-learn>
Your code is perfectly fine. You are training 10 networks in parallel (since you have n_jobs=10), so each network started training in its own, and outputing its progress independently. Given enough amount of time, you will see that all 10 networks will eventually get to epoch number 2, and 10 messages of epoch #2 will be printed out. -- Julio
El 16 mar 2017, a las 17:59, Carlton Banks <noflaco@gmail.com> escribió:
I haven’t a verbosity level in the code?… but set it to 3 as suggested by Julio… It did not seem to work..
https://www.dropbox.com/s/nr5rattzts0wuvd/Screenshot%20from%202017-03-16%201...
Den 16. mar. 2017 kl. 17.51 skrev Carlton Banks <noflaco@gmail.com>:
Ohh.. actually the data size cannot be wrong.. input_train and output_train are both lists… which i then only take a part of … and then make then to a np.array…
So that should not be incorrect.
Den 16. mar. 2017 kl. 17.33 skrev Carlton Banks <noflaco@gmail.com>:
I am running this on a super computer, so yes I am running a few training sessions. I guess i will look at the verbose, and the adjust the training data size.
Den 16. mar. 2017 kl. 17.30 skrev Julio Antonio Soto de Vicente <julio@esbet.es>:
IMO this has nothing to do with GridSearchCV itself...
It rather looks like different (verbose) keras models are being trained simultaneously, and therefore "collapsing" your stdout.
I recommend setting Keras verbosity level to 3, in order to avoid printing the progress bars during GridSearchCV (which can be misleading).
-- Julio
El 16 mar 2017, a las 16:50, Carlton Banks <noflaco@gmail.com> escribió:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
ahh.. makes sense.. but would have hoped i could parelize it as i have so many cores to run on..
Den 16. mar. 2017 kl. 18.05 skrev Julio Antonio Soto de Vicente <julio@esbet.es>:
Your code is perfectly fine.
You are training 10 networks in parallel (since you have n_jobs=10), so each network started training in its own, and outputing its progress independently.
Given enough amount of time, you will see that all 10 networks will eventually get to epoch number 2, and 10 messages of epoch #2 will be printed out.
-- Julio
El 16 mar 2017, a las 17:59, Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>> escribió:
I haven’t a verbosity level in the code?… but set it to 3 as suggested by Julio… It did not seem to work..
https://www.dropbox.com/s/nr5rattzts0wuvd/Screenshot%20from%202017-03-16%201... <https://www.dropbox.com/s/nr5rattzts0wuvd/Screenshot%20from%202017-03-16%201...>
Den 16. mar. 2017 kl. 17.51 skrev Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>>:
Ohh.. actually the data size cannot be wrong.. input_train and output_train are both lists… which i then only take a part of … and then make then to a np.array…
So that should not be incorrect.
Den 16. mar. 2017 kl. 17.33 skrev Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>>:
I am running this on a super computer, so yes I am running a few training sessions. I guess i will look at the verbose, and the adjust the training data size.
Den 16. mar. 2017 kl. 17.30 skrev Julio Antonio Soto de Vicente <julio@esbet.es <mailto:julio@esbet.es>>:
IMO this has nothing to do with GridSearchCV itself...
It rather looks like different (verbose) keras models are being trained simultaneously, and therefore "collapsing" your stdout.
I recommend setting Keras verbosity level to 3, in order to avoid printing the progress bars during GridSearchCV (which can be misleading).
-- Julio
El 16 mar 2017, a las 16:50, Carlton Banks <noflaco@gmail.com <mailto:noflaco@gmail.com>> escribió:
I am currently using grid search to optimize my keras model…
Something seemed a bit off during the training?
https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201... <https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201...>
For some reason is the training for each epoch not done for all datapoints?…
What could be wrong?
Here is the code:
http://pastebin.com/raw/itJFm5a6 <http://pastebin.com/raw/itJFm5a6>
Anything that seems off? _______________________________________________ scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn <https://mail.python.org/mailman/listinfo/scikit-learn>
scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn <https://mail.python.org/mailman/listinfo/scikit-learn>
_______________________________________________ scikit-learn mailing list scikit-learn@python.org <mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn <https://mail.python.org/mailman/listinfo/scikit-learn>
scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
You totally can. In fact, there's a tradeoff between how many cpu cores each network uses and the number of parallel networks you can train. By default, any Keras network will use "as many cores it makes sense for the depth of your network and the amount of data you have" (both over Theano and Tensorflow). Given you are using an convnet, chances are that each network will decide to use, probably, 5 or more. Unless, the n_jobs in your GridSearchCV is "quite high" (high depends on the number of cpu cores on your machine). If your machine has 10 cores and n_jobs=10, each Keras network will use 1 core. If n_jobs=2, each network will use 5 cores, and so on. -- Julio
El 16 mar 2017, a las 18:08, Carlton Banks <noflaco@gmail.com> escribió:
ahh.. makes sense.. but would have hoped i could parelize it as i have so many cores to run on..
Den 16. mar. 2017 kl. 18.05 skrev Julio Antonio Soto de Vicente <julio@esbet.es>:
Your code is perfectly fine.
You are training 10 networks in parallel (since you have n_jobs=10), so each network started training in its own, and outputing its progress independently.
Given enough amount of time, you will see that all 10 networks will eventually get to epoch number 2, and 10 messages of epoch #2 will be printed out.
-- Julio
El 16 mar 2017, a las 17:59, Carlton Banks <noflaco@gmail.com> escribió:
I haven’t a verbosity level in the code?… but set it to 3 as suggested by Julio… It did not seem to work..
https://www.dropbox.com/s/nr5rattzts0wuvd/Screenshot%20from%202017-03-16%201...
Den 16. mar. 2017 kl. 17.51 skrev Carlton Banks <noflaco@gmail.com>:
Ohh.. actually the data size cannot be wrong.. input_train and output_train are both lists… which i then only take a part of … and then make then to a np.array…
So that should not be incorrect.
Den 16. mar. 2017 kl. 17.33 skrev Carlton Banks <noflaco@gmail.com>:
I am running this on a super computer, so yes I am running a few training sessions. I guess i will look at the verbose, and the adjust the training data size.
Den 16. mar. 2017 kl. 17.30 skrev Julio Antonio Soto de Vicente <julio@esbet.es>:
IMO this has nothing to do with GridSearchCV itself...
It rather looks like different (verbose) keras models are being trained simultaneously, and therefore "collapsing" your stdout.
I recommend setting Keras verbosity level to 3, in order to avoid printing the progress bars during GridSearchCV (which can be misleading).
-- Julio
> El 16 mar 2017, a las 16:50, Carlton Banks <noflaco@gmail.com> escribió: > > I am currently using grid search to optimize my keras model… > > Something seemed a bit off during the training? > > https://www.dropbox.com/s/da0ztv2kqtkrfpu/Screenshot%20from%202017-03-16%201... > > For some reason is the training for each epoch not done for all datapoints?… > > What could be wrong? > > Here is the code: > > http://pastebin.com/raw/itJFm5a6 > > Anything that seems off? > _______________________________________________ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
participants (3)
-
Carlton Banks -
Julio Antonio Soto de Vicente -
Sebastian Raschka