Skip to content

Commit 1142f31

Browse files
committed
minor docstring fix for pytorch yolo
Signed-off-by: Farhan Ahmed <[email protected]>
1 parent 38e2458 commit 1142f31

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

art/estimators/object_detection/pytorch_yolo.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,19 @@ def __init__(
216216
@property
217217
def native_label_is_pytorch_format(self) -> bool:
218218
"""
219-
Are the native labels in PyTorch format [x1, y1, x2, y2]?
219+
Return are the native labels in PyTorch format [x1, y1, x2, y2]?
220+
221+
:return: Are the native labels in PyTorch format [x1, y1, x2, y2]?
220222
"""
221223
return True
222224

223225
@property
224226
def model(self) -> "torch.nn.Module":
227+
"""
228+
Return the model.
229+
230+
:return: The model.
231+
"""
225232
return self._model
226233

227234
@property
@@ -453,9 +460,9 @@ def predict(self, x: np.ndarray, batch_size: int = 128, **kwargs) -> List[Dict[s
453460
:return: Predictions of format `List[Dict[str, np.ndarray]]`, one for each input image. The fields of the Dict
454461
are as follows:
455462
456-
- boxes [N, 4]: the boxes in [x1, y1, x2, y2] format, with 0 <= x1 < x2 <= W and 0 <= y1 < y2 <= H.
457-
- labels [N]: the labels for each image.
458-
- scores [N]: the scores of each prediction.
463+
- boxes [N, 4]: the boxes in [x1, y1, x2, y2] format, with 0 <= x1 < x2 <= W and 0 <= y1 < y2 <= H.
464+
- labels [N]: the labels for each image.
465+
- scores [N]: the scores of each prediction.
459466
"""
460467
import torch
461468

0 commit comments

Comments
 (0)