Closed BoltzmannBrain closed 7 years ago
I've also posted this on SO.
As a temporary fix I'm manually iterating over the epochs and calling model.fit(), as shown in #107.
The data generator and the fitting are run in parallel. It's important to note that the generator is just that : a generator that has no idea how the data it generates is going to be used and at what epoch. It should just keep generating data forever as needed.
What happens in your log is :
max_q_size
param of the fit_generator
functionnb_epoch
epoch are done.Everything seems to be working as intended. I suggest to close the issue.
I am having a hard time trying to decipher the hidden conventions in Keras. This is basically a problem with the Python programming language that doesn't distinguish row, column vectors, and that doesn't restrict dimensions very well. Some functions in Keras expect lists, some expect Numpy arrays, this inconsistency is quite hard to grasp.
Suppose I have a feature vector of size n (a time series) and a response of size m (another time series), what the generator is expected to output?
I have a generator to pass video data frame-by-frame to a Sequential model. To train the model I'm using
fit_generator
described here:(I've added
callbacks
to print log info.)Below is my generator, that will accumulate 200 frames worth of data into
X
andY
-- i.e., batch size = 200.With this setup I expect 25 batches (of 200 frames each) to be passed from the generator to
fit_generator
, per epoch; this would be 5000 total frames per epoch -- i.e.,samples_per_epoch=5000
. Then for subsequent epochs,fit_generator
would reinitialize the generator such that we begin training again from the start of the video. Yet this is not the case. The printed output below shows a couple oddities:If there is something incorrect in my understanding of
fit_generator
please explain. I've gone through the documentation, this example, and these related issues. When I get my project running I'll be more than happy to include this as an example for running video data 😄I'm using Keras v1.0.7 with the TensorFlow backend.