feat: update model
Browse files
model.py
CHANGED
|
@@ -1,16 +1,13 @@
|
|
| 1 |
-
import warnings
|
| 2 |
from typing import Optional
|
|
|
|
| 3 |
import torch
|
| 4 |
-
from torch import nn
|
| 5 |
-
from torch.nn import Module
|
| 6 |
import torch.nn.functional as F
|
| 7 |
-
from torch import Tensor
|
| 8 |
-
from huggingface_hub import PyTorchModelHubMixin
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
|
| 13 |
-
class Transpose(Module):
|
| 14 |
def __init__(self, *dims, contiguous=False):
|
| 15 |
super(Transpose, self).__init__()
|
| 16 |
self.dims, self.contiguous = dims, contiguous
|
|
|
|
|
|
|
| 1 |
from typing import Optional
|
| 2 |
+
|
| 3 |
import torch
|
| 4 |
+
from torch import nn, Tensor
|
|
|
|
| 5 |
import torch.nn.functional as F
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
from huggingface_hub import PyTorchModelHubMixin
|
| 8 |
|
| 9 |
|
| 10 |
+
class Transpose(nn.Module):
|
| 11 |
def __init__(self, *dims, contiguous=False):
|
| 12 |
super(Transpose, self).__init__()
|
| 13 |
self.dims, self.contiguous = dims, contiguous
|