(att_tensor, T)
| 60 | # Core DiT Model # |
| 61 | ################################################################################# |
| 62 | def plot_att(att_tensor, T): |
| 63 | |
| 64 | att_arr = att_tensor.detach().cpu().numpy()[0][0] |
| 65 | time_str = str(time.time())[-5:] |
| 66 | filename = 'atten_map/ours/fig/' + time_str + '_' +str(T[0].item()) + '.png' |
| 67 | arr_name = 'atten_map/ours/arr/' + time_str + '_' +str(T[0].item()) + '.npy' |
| 68 | ax = sns.heatmap(att_arr) |
| 69 | plt.savefig(filename) |
| 70 | np.save(arr_name, att_arr) |
| 71 | plt.clf() |
| 72 | |
| 73 | |
| 74 | class Attention(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected