April 2020
Intermediate to advanced
438 pages
12h 2m
English
Here are a few steps for online learning and reconstruction:
batch_size = 128 n_epochs = 2 n_batches = len(data) // batch_size
dico = MiniBatchDictionaryLearning(n_components=256, alpha=1, \ n_iter=1, batch_size=batch_size)# Now extract noisy patches as before
for epoch in range(n_epochs): for i in range(n_batches): batch = data[i * batch_size: (i + 1) * batch_size] dico.partial_fit(batch) V = dico.components_ n_updates += 1 # Now reconstruct ...
Read now
Unlock full access