Skip to content

Commit

Permalink
Adopt branch 'server'
Browse files Browse the repository at this point in the history
  • Loading branch information
fmease committed Aug 22, 2021
1 parent 9926dfe commit c42144d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
__pycache__
*.pyc
*.pyo
*.egg-info/
*.egg-info/

bin/
lib/
lib64
pyvenv.cfg
12 changes: 6 additions & 6 deletions type4py/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ def forward(self, a, p, n):
"""
A triplet consists of anchor, positive examples and negative examples
"""
# return self.model(*(s.to(DEVICE) for s in a)), \
# self.model(*(s.to(DEVICE) for s in p)), \
# self.model(*(s.to(DEVICE) for s in n))
return self.model(*(s.to(DEVICE) for s in a)), \
self.model(*(s.to(DEVICE) for s in p)), \
self.model(*(s.to(DEVICE) for s in n))

return self.model(*(s for s in a)), \
self.model(*(s for s in p)), \
self.model(*(s for s in n))
# return self.model(*(s for s in a)), \
# self.model(*(s for s in p)), \
# self.model(*(s for s in n))

def load_model(model_type: str, model_params: dict):
"""
Expand Down

0 comments on commit c42144d

Please sign in to comment.