PeteBleackley commited on
Commit
cf5f935
·
1 Parent(s): 98ad67d

Make EPSILON a tensor

Browse files
qarac/models/QaracTrainerModel.py CHANGED
@@ -10,7 +10,7 @@ import torch
10
  import qarac.models.QaracEncoderModel
11
  import qarac.models.QaracDecoderModel
12
 
13
- EPSILON=1.0e-12
14
 
15
  class QaracTrainerModel(torch.nn.Module):
16
 
 
10
  import qarac.models.QaracEncoderModel
11
  import qarac.models.QaracDecoderModel
12
 
13
+ EPSILON=torch.tensor(1.0e-12)
14
 
15
  class QaracTrainerModel(torch.nn.Module):
16
 
qarac/models/layers/GlobalAttentionPoolingHead.py CHANGED
@@ -8,7 +8,7 @@ Created on Tue Sep 5 07:32:55 2023
8
 
9
  import torch
10
 
11
- EPSILON = 1.0e-12
12
 
13
  class GlobalAttentionPoolingHead(torch.nn.Module):
14
 
 
8
 
9
  import torch
10
 
11
+ EPSILON = torch.tensor(1.0e-12)
12
 
13
  class GlobalAttentionPoolingHead(torch.nn.Module):
14
 
scripts.py CHANGED
@@ -22,7 +22,7 @@ import scipy.spatial
22
  import seaborn
23
  import tqdm
24
 
25
- EPSILON = 1.0e-12
26
 
27
  class CombinedLoss(torch.nn.Module):
28
  def __init__(self):
 
22
  import seaborn
23
  import tqdm
24
 
25
+ EPSILON = torch.tensor(1.0e-12)
26
 
27
  class CombinedLoss(torch.nn.Module):
28
  def __init__(self):