Skip to content

Commit

Permalink
Update gitignore with server configuration files & change config to r…
Browse files Browse the repository at this point in the history
…un code on GPU (#24)
  • Loading branch information
yashkant authored and RishabhJain2018 committed Sep 17, 2019
1 parent 03201c8 commit 74e84fd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ viscap/checkpoints/
viscap/data/
env/
static/
chat.ini
server-log.txt
uwsgi_params
visual_dialog_nginx.conf


*.pyc
db.sqlite3
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,4 @@ BSD
[23]: https://s3.amazonaws.com/visual-dialog/data/v1.0/2019/features_mask_rcnn_x101_test.h5
[24]: https://rishabhjain2018.github.io/


3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Django==1.11.23
channels==0.17.2
asgi-redis==0.14.1
Expand All @@ -20,4 +21,4 @@ torch==1.0.0
tqdm==4.28.1
yacs==0.1.6
opencv-python==4.1.0.25
torchtext==0.3.1
torchtext==0.3.1
6 changes: 1 addition & 5 deletions viscap/visdialch/utils/checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ def load_checkpoint(checkpoint_pthpath, device=None):
f"({checkpoint_commit_sha}) at which checkpoint was saved,"
" are different. This might affect reproducibility."
)

# load encoder, decoder, optimizer state_dicts
if device == torch.device('cpu'):
components = torch.load(checkpoint_pthpath, map_location='cpu')
else:
components = torch.load(checkpoint_pthpath)
components = torch.load(checkpoint_pthpath, map_location=device)
return components["model"], components["optimizer"]

0 comments on commit 74e84fd

Please sign in to comment.