Unverified Commit 65eb5d9a authored by Devrim's avatar Devrim Committed by GitHub
Browse files

Fix: torch.utils.checkpoint import error. (#9626)

parent 72fc9abf
...@@ -22,6 +22,7 @@ from typing import Optional, Tuple ...@@ -22,6 +22,7 @@ from typing import Optional, Tuple
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss from torch.nn import CrossEntropyLoss
......
...@@ -23,6 +23,7 @@ from typing import Optional, Tuple, Union ...@@ -23,6 +23,7 @@ from typing import Optional, Tuple, Union
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss from torch.nn import CrossEntropyLoss
......
...@@ -21,6 +21,7 @@ from typing import Optional, Tuple ...@@ -21,6 +21,7 @@ from typing import Optional, Tuple
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss from torch.nn import CrossEntropyLoss
......
...@@ -21,6 +21,7 @@ from typing import Optional, Tuple ...@@ -21,6 +21,7 @@ from typing import Optional, Tuple
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.utils.checkpoint
from torch.nn import CrossEntropyLoss, MSELoss from torch.nn import CrossEntropyLoss, MSELoss
from ...activations import ACT2FN, get_activation from ...activations import ACT2FN, get_activation
......
...@@ -21,6 +21,7 @@ from typing import List, Optional, Tuple ...@@ -21,6 +21,7 @@ from typing import List, Optional, Tuple
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.utils.checkpoint
from torch.nn import CrossEntropyLoss, MSELoss from torch.nn import CrossEntropyLoss, MSELoss
from ...activations import ACT2FN from ...activations import ACT2FN
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
import math import math
import torch import torch
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss, MSELoss from torch.nn import CrossEntropyLoss, MSELoss
......
...@@ -22,6 +22,7 @@ from typing import List, Optional, Tuple ...@@ -22,6 +22,7 @@ from typing import List, Optional, Tuple
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss from torch.nn import CrossEntropyLoss
......
...@@ -20,6 +20,7 @@ from typing import Optional, Tuple ...@@ -20,6 +20,7 @@ from typing import Optional, Tuple
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.utils.checkpoint
from torch.nn import CrossEntropyLoss, MSELoss from torch.nn import CrossEntropyLoss, MSELoss
from torch.nn import functional as F from torch.nn import functional as F
......
...@@ -22,6 +22,7 @@ from typing import Optional, Tuple ...@@ -22,6 +22,7 @@ from typing import Optional, Tuple
import numpy as np import numpy as np
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss from torch.nn import CrossEntropyLoss
......
...@@ -21,6 +21,7 @@ from typing import Optional, Tuple ...@@ -21,6 +21,7 @@ from typing import Optional, Tuple
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss from torch.nn import CrossEntropyLoss
......
...@@ -22,6 +22,7 @@ from typing import Optional, Tuple ...@@ -22,6 +22,7 @@ from typing import Optional, Tuple
import numpy as np import numpy as np
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
import torch.utils.checkpoint
from torch import nn from torch import nn
from torch.nn import CrossEntropyLoss from torch.nn import CrossEntropyLoss
......
...@@ -19,6 +19,7 @@ import math ...@@ -19,6 +19,7 @@ import math
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.utils.checkpoint
from torch.nn import CrossEntropyLoss, MSELoss from torch.nn import CrossEntropyLoss, MSELoss
from ...activations import ACT2FN, gelu from ...activations import ACT2FN, gelu
......
...@@ -23,6 +23,7 @@ from typing import Optional, Tuple ...@@ -23,6 +23,7 @@ from typing import Optional, Tuple
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.utils.checkpoint
from torch.nn import CrossEntropyLoss, MSELoss from torch.nn import CrossEntropyLoss, MSELoss
from ...activations import ACT2FN from ...activations import ACT2FN
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment