Changed model.names return type hint from list to dict[int, str] (#17402)
This commit is contained in:
parent
84bfe3c2e4
commit
95368cbe54
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Union
|
from typing import Dict, List, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
|
@ -881,7 +881,7 @@ class Model(nn.Module):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def names(self) -> list:
|
def names(self) -> Dict[int, str]:
|
||||||
"""
|
"""
|
||||||
Retrieves the class names associated with the loaded model.
|
Retrieves the class names associated with the loaded model.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue