likyoo / change_detection.pytorch

Deep learning models for change detection of remote sensing images
MIT License
331 stars 59 forks source link

Outdated device management #32

Open pacex opened 1 month ago

pacex commented 1 month ago

Executing the example leads to an error of mismatched devices. The model is initialized on the CPU, while during initialization weights are loaded on CUDA. Pytorch doesn't allow mismatched devices between tensors anymore. Solution: handle everythingo on the cpu until initialization is done, then move the model over to CUDA.