topaz
topaz copied to clipboard
PyTorch confilct with NumPy
When running topaz train in 01_quick_start_guide.ipyn:
$ topaz train -n 400 --num-workers=8 --train-images data/EMPIAR-10025/processed/micrographs/ --train-targets data/EMPIAR-10025/processed/particles.txt --save-prefix=saved_models/EMPIAR-10025/model -o saved_models/EMPIAR-10025/model_training.txt
The following warning is issued:
UserWarning: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /croot/pytorch_1686931851744/work/torch/csrc/utils/tensor_numpy.cpp:206.)
The warning repeated multiple times while the training was in progress.
This topaz executable was run on an HPC cluster and built in conda with:
python 3.9.18
pytorch 2.1.0
pytorch-cuda 11.8
numpy 1.26.0
This is annoying, but it's nothing to worry about. The warning doesn't cause any problems.