RashiAgarwal commited on
Commit
39230cc
·
1 Parent(s): d55a993

Update display.py

Browse files
Files changed (1) hide show
  1. display.py +1 -2
display.py CHANGED
@@ -16,8 +16,7 @@ def inference(image: np.ndarray, iou_thresh: float = 0.5, thresh: float = 0.5,sh
16
  # thresh = 0.75
17
  scaled_anchors = config.SCALED_ANCHORS
18
 
19
- backbone = model
20
- target_layer_list = list(backbone.children())[-2]
21
 
22
  cam = YoloCAM(model=model, target_layers = target_layer_list, use_cuda=False)
23
  transforms = A.Compose(
 
16
  # thresh = 0.75
17
  scaled_anchors = config.SCALED_ANCHORS
18
 
19
+ target_layer_list = model.layers[-2]
 
20
 
21
  cam = YoloCAM(model=model, target_layers = target_layer_list, use_cuda=False)
22
  transforms = A.Compose(