Disable fine-tuning
@@ -6,6 +6,7 @@ import torch
from .util import get_pytt_model, Activations
+FINE_TUNE = False
GRAD_CLIP_FACTOR = 100
LEARN_RATE_FACTOR = 100
CONFIG = {"output_hidden_states": True, "output_attentions": True}
@@ -54,6 +55,7 @@ class PyTT_Wrapper(PyTorchWrapper):
# raise ValueError("Gradients on all hidden states not supported yet.")
# if dy_data.has_all_attentions:
# raise ValueError("Gradients on all attentions not supported yet.")
+ if FINE_TUNE:
torch.autograd.backward(y_for_bwd, grad_tensors=dy_for_bwd)
if sgd is not None:
if self._optimizer is None:
