Open Harsh188 opened 2 weeks ago
Hello, thank you for raising this issue.
First, please note that training is not well supported in PTLFlow, and I cannot guarantee you will get good results with our generic training script. Moreover, I think CCMR did not open source their official training code, so I do know the specific settings of their training.
Regarding your memory problem, I think the main issue is that you are using the correlation block from ptlflow.utils.correlation.IterativeCorrBlock, which is just a simple and not-optimized iterative implementation. To match the original model, you should first compile the alt_cuda_corr package (check ptlflow/utils/external/alt_cuda_corr). With alt_cuda_corr, you should get faster speeds and lower memory consumption. I hope this solves your problem, but again, I do not guarantee you can match the paper.
If there are still other issues, just let me know.
Best.
I was able to compile alt_cuda_corr
I checked to ensure that I was able to import it as well.
It's not just that the memory matches the paper, it's no where near the results demonstrated by the paper.
(ptlflow) hmohan@WAN:~/Programming/T-FlowModels/ptlflow$ python train.py ccmr --train_dataset kaist --lr 0.0001 --train_batch_size 2 --max_epochs 5 --gpus 2 --no_alternate_corr
###########################################################################
# WARNING, please read! #
# #
# This training script has not been tested! #
# Therefore, there is no guarantee that a model trained with this script #
# will produce good results after the training! #
# #
# You can find more information at #
# https://ptlflow.readthedocs.io/en/latest/starting/training.html #
###########################################################################
Global seed set to 1234
Cross-att XCA
Cross-att XCA
Cross-att XCA
Self-att XCiT
Self-att XCiT
Self-att XCiT
> /home/hmohan/Programming/T-FlowModels/ptlflow/ptlflow/models/ccmr/ccmr.py(165)__init__()
-> if self.args.alternate_corr and alt_cuda_corr is None:
(Pdb) alt_cuda_corr
<module 'alt_cuda_corr' from '/home/hmohan/miniconda3/envs/ptlflow/lib/python3.10/site-packages/correlation-0.0.0-py3.10-linux-x86_64.egg/alt_cuda_corr.cpython-310-x86_64-linux-gnu.so'>
The implementation of CCMR through ptlflow takes up significantly more GPU memory than what is stated in the SOTA paper.
For 160x120 images, I'm requiring more than 24GB of VRAM for training which is inconistant with the paper.
Log: