weiren119 commited on
Commit
c87f309
1 Parent(s): 9a2f125

Fix: import Tensor from torh to fix the not-defined error

Browse files
src/digitizer/yolov5/models/common.py CHANGED
@@ -4,6 +4,7 @@ import math
4
  import torch
5
  import torch.nn as nn
6
  import torch.nn.functional as F
 
7
 
8
  # Avoid the use of original Hardswish at torch to avoid the error:
9
  class Hardswish(nn.Module):
 
4
  import torch
5
  import torch.nn as nn
6
  import torch.nn.functional as F
7
+ from torch import Tensor
8
 
9
  # Avoid the use of original Hardswish at torch to avoid the error:
10
  class Hardswish(nn.Module):