Update model/modeling_modified.py
Browse files
model/modeling_modified.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
import logging
|
2 |
-
|
3 |
import logging
|
4 |
from transformers import BartForSequenceClassification
|
5 |
|
@@ -13,6 +11,7 @@ class ModifiedBartForSequenceClassificationWithHook(BartForSequenceClassificatio
|
|
13 |
@staticmethod
|
14 |
def forward_hook(module, inputs, outputs):
|
15 |
logger.info(f"Called forward method of {module.__class__.__name__}")
|
|
|
16 |
|
17 |
|
18 |
import logging
|
@@ -28,4 +27,5 @@ class ModifiedAutoModelWithHook(AutoModel):
|
|
28 |
@staticmethod
|
29 |
def forward_hook(module, inputs, outputs):
|
30 |
logger.info(f"Called forward method of {module.__class__.__name__}")
|
|
|
31 |
|
|
|
|
|
|
|
1 |
import logging
|
2 |
from transformers import BartForSequenceClassification
|
3 |
|
|
|
11 |
@staticmethod
|
12 |
def forward_hook(module, inputs, outputs):
|
13 |
logger.info(f"Called forward method of {module.__class__.__name__}")
|
14 |
+
print(f"Called forward method of {module.__class__.__name__}")
|
15 |
|
16 |
|
17 |
import logging
|
|
|
27 |
@staticmethod
|
28 |
def forward_hook(module, inputs, outputs):
|
29 |
logger.info(f"Called forward method of {module.__class__.__name__}")
|
30 |
+
print(f"Called forward method of {module.__class__.__name__}")
|
31 |
|