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
相关文章
|
4月前
|
机器学习/深度学习 Python
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
95 0
|
4月前
|
Python
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
241 0
|
4月前
|
开发者 Python
【Python】已解决:SyntaxError: positional argument follows keyword argument
【Python】已解决:SyntaxError: positional argument follows keyword argument
121 0
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
|
算法框架/工具
Keras报错:TypeError: (‘Keyword argument not understood:‘, ‘offset‘)
Keras报错:TypeError: (‘Keyword argument not understood:‘, ‘offset‘)
180 0
|
6月前
|
开发工具
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
195 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
524 0
Syntax Error: TypeError: this.getOptions is not a function
|
C语言
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
147 0