Skip to content

Commit

Permalink
search
Browse files Browse the repository at this point in the history
  • Loading branch information
sharath committed May 9, 2019
1 parent 7a8e9e7 commit db8f737
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion experiments/csnn/csnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def add_sample(self, sample, label):
def classify(self, new_sample):
distances = [(None, float('inf'))]*self.k
for sample, label in self.data:
dist = torch.sum(torch.abs(new_sample-sample))
dist = torch.dist(new_sample, sample)
for i, (_, best_dist) in enumerate(distances):
if dist < best_dist:
distances[i] = (label, dist)
Expand Down
36 changes: 17 additions & 19 deletions experiments/csnn/search.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.010
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.009
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.008
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.007
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.006
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.005
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.004
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.003
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.002
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 1
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.1
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.01
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.010
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.009
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.008
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.007
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.006
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.005
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.004
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.003
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.002
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 6 0.001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.0001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.00001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.000001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.0000001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 1 0.00000001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 1
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.1
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.01
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.0001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.00001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.000001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.0000001
sbatch -p 1080ti-long --gres=gpu:1 run_search.sh 2 0.00000001

0 comments on commit db8f737

Please sign in to comment.