CindyDelage commited on
Commit
17b7c60
·
verified ·
1 Parent(s): 73820bb

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +2 -2
tools.py CHANGED
@@ -96,7 +96,7 @@ class evaluate_consumption_example(Tool):
96
  i=0
97
  for data in iter(test_dataset):
98
  print(i)
99
- if (i<=50):
100
  with torch.no_grad():
101
  result = classifier(np.asarray(data["input_values"]), batch_size=64)
102
  predicted_label = result[0]['label']
@@ -109,7 +109,7 @@ class evaluate_consumption_example(Tool):
109
  torch.cuda.empty_cache()
110
  gc.collect()
111
  i=i+1
112
- if(i>50):
113
  break
114
  logging.info("Fin des prédictions")
115
  del classifier
 
96
  i=0
97
  for data in iter(test_dataset):
98
  print(i)
99
+ if (i<=5):
100
  with torch.no_grad():
101
  result = classifier(np.asarray(data["input_values"]), batch_size=64)
102
  predicted_label = result[0]['label']
 
109
  torch.cuda.empty_cache()
110
  gc.collect()
111
  i=i+1
112
+ if(i>5):
113
  break
114
  logging.info("Fin des prédictions")
115
  del classifier