Spaces:
Build error
Build error
PeteBleackley
commited on
Commit
·
7758fd9
1
Parent(s):
4808422
Diagnostics
Browse files
qarac/models/QaracTrainerModel.py
CHANGED
@@ -98,4 +98,9 @@ class QaracTrainerModel(torch.nn.Module):
|
|
98 |
s1 = self.answer_encoder(statement1)
|
99 |
|
100 |
consistency = self.cosine(s0,s1)
|
101 |
-
return (encode_decode,question_answering,reasoning,consistency)
|
|
|
|
|
|
|
|
|
|
|
|
98 |
s1 = self.answer_encoder(statement1)
|
99 |
|
100 |
consistency = self.cosine(s0,s1)
|
101 |
+
return (encode_decode,question_answering,reasoning,consistency)
|
102 |
+
|
103 |
+
def devices(self):
|
104 |
+
print("Question encoder",self.question_encoder.device)
|
105 |
+
print('Answer Encoder',self.answer.encoder.device)
|
106 |
+
print('Decoer',self.decoder.device)
|
qarac/models/layers/FactorizedMatrixMultiplication.py
CHANGED
@@ -20,6 +20,4 @@ class FactorizedMatrixMultiplication(torch.nn.Module):
|
|
20 |
self.matrix = torch.tensordot(self.left,self.right,1)
|
21 |
|
22 |
def forward(self,X):
|
23 |
-
print(X.device)
|
24 |
-
print(self.matrix.device)
|
25 |
return torch.einsum('ij,klj->kli',self.matrix,X)
|
|
|
20 |
self.matrix = torch.tensordot(self.left,self.right,1)
|
21 |
|
22 |
def forward(self,X):
|
|
|
|
|
23 |
return torch.einsum('ij,klj->kli',self.matrix,X)
|