shivalikasingh commited on
Commit
0170c1c
·
1 Parent(s): dc0b091

Update utils/predict.py

Browse files
Files changed (1) hide show
  1. utils/predict.py +4 -5
utils/predict.py CHANGED
@@ -21,10 +21,9 @@ AUTO = tf.data.AUTOTUNE
21
 
22
  def predict(image_path):
23
  """
24
- This function is used for fetching predictions corresponding to input_dataframe.
25
- It outputs another dataframe containing:
26
- 1. prediction probability for each class
27
- 2. actual expected outcome for each entry in the input dataframe
28
  """
29
 
30
  test_image1 = load_img(image_path,target_size =(32,32))
@@ -48,7 +47,7 @@ def predict(image_path):
48
 
49
 
50
  def predict_batch(image_path):
51
-
52
  test_ds = tf.data.Dataset.from_tensor_slices((x_test, y_test))
53
  test_ds = test_ds.batch(config.batch_size).prefetch(AUTO)
54
  slice = test_ds.take(1)
 
21
 
22
  def predict(image_path):
23
  """
24
+ This function is used for fetching predictions corresponding to input_image.
25
+
26
+ It outputs confidence scores corresponding to each class on which the model was trained
 
27
  """
28
 
29
  test_image1 = load_img(image_path,target_size =(32,32))
 
47
 
48
 
49
  def predict_batch(image_path):
50
+
51
  test_ds = tf.data.Dataset.from_tensor_slices((x_test, y_test))
52
  test_ds = test_ds.batch(config.batch_size).prefetch(AUTO)
53
  slice = test_ds.take(1)