Spaces:
Sleeping
Sleeping
Remove torchsummary
Browse files- siamese_nn.py +1 -7
siamese_nn.py
CHANGED
|
@@ -9,7 +9,6 @@ two vectors of similarity which then in turn are being passed to Contrastive Los
|
|
| 9 |
indicates whether or not the samples were similar or dissimilar.
|
| 10 |
"""
|
| 11 |
import torch.nn as nn
|
| 12 |
-
from torchsummary import summary
|
| 13 |
|
| 14 |
class Siamese_nn(nn.Module):
|
| 15 |
"""
|
|
@@ -75,9 +74,4 @@ class Siamese_nn(nn.Module):
|
|
| 75 |
"""
|
| 76 |
output1 = self.forwardOne(input1)
|
| 77 |
output2 = self.forwardOne(input2)
|
| 78 |
-
return output1, output2
|
| 79 |
-
|
| 80 |
-
if __name__ == '__main__':
|
| 81 |
-
model = Siamese_nn().to('cuda')
|
| 82 |
-
summary(model, [(1, 153, 136), (1, 153, 136)], 1)
|
| 83 |
-
# %%
|
|
|
|
| 9 |
indicates whether or not the samples were similar or dissimilar.
|
| 10 |
"""
|
| 11 |
import torch.nn as nn
|
|
|
|
| 12 |
|
| 13 |
class Siamese_nn(nn.Module):
|
| 14 |
"""
|
|
|
|
| 74 |
"""
|
| 75 |
output1 = self.forwardOne(input1)
|
| 76 |
output2 = self.forwardOne(input2)
|
| 77 |
+
return output1, output2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|