Skip to content

UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors #13

@yksu

Description

@yksu

Hi I have the following error

GenAD/projects/mmdet3d_plugin/models/utils/grid_mask.py:115: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:180.)
mask = torch.from_numpy(mask).to(x.dtype).to(x.device)

do anyone knows how to solve it?

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions