
Pytorch
求不脱发
路漫漫其修远兮。
展开
-
A module that was compiled using NumPy 1.x cannot be run inNumPy 2.0.0
A module that was compiled using NumPy 1.x cannot be run inNumPy 2.0.0 as it may crash. To support both 1.x and 2.xversions of NumPy, modules must be compiled with NumPy 2.0.Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.原创 2024-07-21 11:10:27 · 1065 阅读 · 0 评论 -
解决TypeError: __init__() takes 1 positional argument but 2 were given
方法没有接收任何参数,但是在创建类的实例时,尝试传递了一个参数。如下图,在使用torch.nn.Sigmoid非线性激活时报错。类的实例时不传递任何参数。要解决这个问题,需要确保在创建。原创 2024-07-18 22:00:13 · 850 阅读 · 0 评论