TypeError: custom() got an unexpected keyword argument ‘path‘

简介: TypeError: custom() got an unexpected keyword argument ‘path‘

torch.hub.load 加载本地yolov5模型时报错TypeError: custom() got an unexpected keyword argument ‘path’


解决办法,将代码改成如下:


self.model = torch.hub.load('C:/Users/叶绿体不忘呼吸/Desktop/yolov5-5.0', 'custom', 'runs/trai
相关文章
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
|
5月前
|
机器学习/深度学习 Python
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
160 0
|
5月前
|
Python
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
315 0
|
5月前
|
开发者 Python
【Python】已解决:SyntaxError: positional argument follows keyword argument
【Python】已解决:SyntaxError: positional argument follows keyword argument
204 0
|
算法框架/工具
Keras报错:TypeError: (‘Keyword argument not understood:‘, ‘offset‘)
Keras报错:TypeError: (‘Keyword argument not understood:‘, ‘offset‘)
193 0
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror Error: Missing required argument #1
760 0
|
计算机视觉
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
|
Dart 前端开发 JavaScript
Syntax Error: TypeError: this.getOptions is not a function
Syntax Error: TypeError: this.getOptions is not a function
536 0
Syntax Error: TypeError: this.getOptions is not a function
python TypeError: missing 1 required positional argument:'self'
python TypeError: missing 1 required positional argument:'self'
python TypeError: missing 1 required positional argument:'self'