zhihanyue / ts2vec

A universal time series representation learning framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

retrain a model after loading

achimrom opened this issue · comments

When i fit an model, save the model, load it again and retrain the model, it seems that this doesn't work ...

model = TS2Vec(input_dims=5, batch_size = 64, device="cuda", max_train_length=680, output_dims=32, lr=0.001)
loss_log = model.fit(dvt_data, n_epochs=3, verbose=True)
model.save(f"model.sd")

Epoch #0: loss=2.07257523319938
Epoch #1: loss=1.1711310916765094
Epoch #2: loss=0.9953813534158445

for ts2iter in range(5):
model = TS2Vec(input_dims=5, batch_size = 64, device="cuda", max_train_length=680, output_dims=32, lr=0.001)
model = TS2Vec.load("model.sd")
loss_log = model.fit(dvt_data, n_epochs=1, verbose=True)
model.save(f"model.sd")

Epoch #0: loss=2.0144058981869803
Epoch #0: loss=2.1384957409088194
Epoch #0: loss=1.9966144137437456
Epoch #0: loss=2.0894507004875837
Epoch #0: loss=2.028488379587132