Skip to content

Prevent UserWarning in PyTorch#9

Open
eakirtas wants to merge 1 commit into
passalis:masterfrom
eakirtas:patch-2
Open

Prevent UserWarning in PyTorch#9
eakirtas wants to merge 1 commit into
passalis:masterfrom
eakirtas:patch-2

Conversation

@eakirtas

Copy link
Copy Markdown

Prevents the following warning:

 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.```

Prevents the following warning:

```/pytorch/torch/csrc/utils/tensor_numpy.cpp:141:
 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.```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant