/media/root1/D/freya/Pointnet_Pointnet2_pytorch (src)/train_semseg.py:247: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations np.mean(np.array(total_correct_class) / (np.array(total_seen_class, dtype=np.float) + 1e-6))))
时间: 2024-04-04 13:33:35 浏览: 102
这是一个来自 train_semseg.py 文件中的警告信息,告诉你 np.float 是一个被弃用的别名,应该改用 float。如果你确实需要使用 NumPy 标量类型,可以在此处使用 np.float64。此警告是由 NumPy 1.20 版本引入的,你可以查看链接中提供的更多详细信息和指导。最后一个括号中的内容是计算精度指标的表达式。
相关问题
TypeError: __init__() got an unexpected keyword argument 'size'
This error occurs when you try to pass an unexpected keyword argument to a function or method.
For example, if you have a class called `Square` that has an `__init__` method that takes in a `width` and `height` argument, but you try to pass a `size` argument instead:
```
class Square:
def __init__(self, width, height):
self.width = width
self.height = height
square = Square(size=10)
```
You will get the `TypeError: __init__() got an unexpected keyword argument 'size'` error because `__init__` does not expect a `size` argument.
To fix this error, you should either remove the unexpected keyword argument or modify the function or method to accept it. In the above example, you could modify the `__init__` method to accept a `size` argument:
```
class Square:
def __init__(self, size):
self.width = size
self.height = size
square = Square(size=10)
```
阅读全文
相关推荐
















