2

I trained a model using deeplearning4j on a first part of my data and saved it.

ModelSerializer.writeModel(model, locationToSave, true);

Now, I want to train this saved model on the next part of data.

I loaded the model:

MultiLayerNetwork model = ModelSerializer.restoreMultiLayerNetwork("location");

and then I used to train it on the new data

model.fit(trainingDataIt);

but the model seems not fitting because I don't see the stat of each iteration

11:56:56.161 [ADSI prefetch thread] DEBUG o.n.l.memory.abstracts.Nd4jWorkspace - Steps: 4
11:59:30.072 [main] DEBUG o.d.d.iterator.AsyncDataSetIterator - Manually destroying ADSI workspace
11:59:30.123 [ADSI prefetch thread] DEBUG o.n.l.memory.abstracts.Nd4jWorkspace - Steps: 4
12:01:39.760 [main] DEBUG o.d.d.iterator.AsyncDataSetIterator - Manually destroying ADSI workspace
12:01:39.793 [ADSI prefetch thread] DEBUG o.n.l.memory.abstracts.Nd4jWorkspace - Steps: 4
12:03:46.496 [main] DEBUG o.d.d.iterator.AsyncDataSetIterator - Manually destroying ADSI workspace
12:03:46.551 [ADSI prefetch thread] DEBUG o.n.l.memory.abstracts.Nd4jWorkspace - Steps: 4

is it normal, or there is something wrong with my approach ?

Rayan
  • 31
  • 2
  • Did you try attaching the ScoreIterationsListener again after loading it? The absence of any logging does not mean that the model is not being trained, so if you just save your model again after fitting everything is working as intended – fkajzer Jan 10 '19 at 10:04

1 Answers1

2

You just have to call ModelSerializer.writeModel after you load it and call fit.

Adam Gibson
  • 3,055
  • 1
  • 10
  • 12