Fix shuffle=False in .fit()
This commit is contained in:
parent
f596d7a57f
commit
c8a104b8fa
@ -182,10 +182,7 @@ class Sequential(object):
|
|||||||
|
|
||||||
batches = make_batches(len(X), batch_size)
|
batches = make_batches(len(X), batch_size)
|
||||||
for batch_index, (batch_start, batch_end) in enumerate(batches):
|
for batch_index, (batch_start, batch_end) in enumerate(batches):
|
||||||
if shuffle:
|
|
||||||
batch_ids = index_array[batch_start:batch_end]
|
batch_ids = index_array[batch_start:batch_end]
|
||||||
else:
|
|
||||||
batch_ids = slice(batch_start, batch_end)
|
|
||||||
seen += len(batch_ids)
|
seen += len(batch_ids)
|
||||||
X_batch = X[batch_ids]
|
X_batch = X[batch_ids]
|
||||||
y_batch = y[batch_ids]
|
y_batch = y[batch_ids]
|
||||||
@ -329,3 +326,5 @@ class Sequential(object):
|
|||||||
weights = [g['param_{}'.format(p)] for p in range(g.attrs['nb_params'])]
|
weights = [g['param_{}'.format(p)] for p in range(g.attrs['nb_params'])]
|
||||||
self.layers[k].set_weights(weights)
|
self.layers[k].set_weights(weights)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user