Open
Description
when i try this code from module explore_model.ipynb
`for each, epoch in model_list2[:-1:(len(model_list2)//10)+1][:2] + [model_list2[-1]]:
state = torch.load(f'{each}', map_location=lambda storage, loc: storage)
doc_weights = state['doc_weights.weight'].cpu().clone().numpy()
# distribution over the topics for each document
topic_dist = softmax(doc_weights)
# distribution of nonzero probabilities
dist = topic_dist.reshape(-1)
plt.hist(dist[dist > 0.01], bins=40);
plt.title(f'epoch: {epoch}')
plt.show()`
, i'm getting this error :
`IndexError Traceback (most recent call last)
in
----> 1 for each, epoch in model_list2[:-1:(len(model_list2)//10)+1][:2] + [model_list2[-1]]:
2 state = torch.load(f'{each}', map_location=lambda storage, loc: storage)
IndexError: list index out of range`
how to fix this plz ??
Metadata
Metadata
Assignees
Labels
No labels