Skip to content

Commit 6ecede1

Browse files
committed
Make matplotlib lazy
stack-info: PR: #134, branch: drisspg/stack/9
1 parent 15201f4 commit 6ecede1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

attn_gym/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import torch
22
from typing import Optional
3-
import matplotlib.pyplot as plt
43
from pathlib import Path
54
import numpy as np
65
import math
@@ -100,6 +99,7 @@ def visualize_attention_scores(
10099
Returns:
101100
None
102101
"""
102+
import matplotlib.pyplot as plt
103103
assert score_mod is not None or mask_mod is not None, (
104104
"Must provide either score_mod or mask_mod"
105105
)

0 commit comments

Comments
 (0)