tbepler / topaz

Pipeline for particle picking in cryo-electron microscopy images using convolutional neural networks trained from positive and unlabeled examples. Also featuring micrograph and tomogram denoising with DNNs.
GNU General Public License v3.0
170 stars 62 forks source link

PyTorch confilct with NumPy #179

Closed chris-hypercag closed 3 months ago

chris-hypercag commented 9 months ago

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

tbepler commented 9 months ago

This is annoying, but it's nothing to worry about. The warning doesn't cause any problems.