Skip to content

Instantly share code, notes, and snippets.

@fancyerii
Created August 11, 2020 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fancyerii/fa04cea4e94cf9408c5d6091697fd9fa to your computer and use it in GitHub Desktop.
Save fancyerii/fa04cea4e94cf9408c5d6091697fd9fa to your computer and use it in GitHub Desktop.
diff
diff --git a/infer.py b/infer.py
index 3f31004..ec15d47 100644
--- a/infer.py
+++ b/infer.py
@@ -63,7 +63,8 @@ def infer(args):
dev_count = 1
gpu_id = 0
phase = "test"
- place = fluid.CUDAPlace(gpu_id)
+ #place = fluid.CUDAPlace(gpu_id)
+ place = fluid.CPUPlace()
task = tasks.create_task(args)
model = models.create_model(args, place)
diff --git a/interaction.py b/interaction.py
index e6134d7..60b2be4 100644
--- a/interaction.py
+++ b/interaction.py
@@ -48,8 +48,8 @@ def interact(args):
"""
dev_count = 1
gpu_id = 0
- place = fluid.CUDAPlace(gpu_id)
-
+ #place = fluid.CUDAPlace(gpu_id)
+ place = fluid.CPUPlace()
task = DialogGeneration(args)
model = models.create_model(args, place)
@@ -79,5 +79,5 @@ def interact(args):
if __name__ == "__main__":
args = setup_args()
- check_cuda(True)
+ #check_cuda(True)
interact(args)
diff --git a/plato-2/scripts/24L_plato_interact.sh b/plato-2/scripts/24L_plato_interact.sh
index 702cee7..b36a76c 100644
--- a/plato-2/scripts/24L_plato_interact.sh
+++ b/plato-2/scripts/24L_plato_interact.sh
@@ -1,7 +1,7 @@
#!/bin/bash
-set -eux
+#set -eux
-export CUDA_VISIBLE_DEVICES=0
+#export CUDA_VISIBLE_DEVICES=-1
# change to Knover working directory
SCRIPT=`realpath "$0"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment