myTest01 / analysis /stuff_to_plot_attn_matrices.txt
meng2003's picture
Upload 357 files
2d5fdd1
raw
history blame contribute delete
293 Bytes
in /home/guillefix/.local/lib/python3.7/site-packages/torch/nn/functional.py, add
np.save("analysis/weight_mats/"+str(uuid.uuid4())+".np",attn_output_weights.cpu().numpy())
before the line attn_output_weights = softmax(attn_output_weights, dim=-1)
and import numpy as np, and import uuid