Hi Artur,
we have been working on training the density estimators in sbi on a GPU. That worked just fine when globally setting the default tensor to torch.cuda.FloatTensor. We wanted to avoid this global setting and instead move the net and the training batches to the device manually during training (see https://github.com/mackelab/sbi/pull/331)
However, this resulted in problems in nflows (mainly CPU-cuda device mismatches). I tried to fix these problems with the two commits in this PR, following the discussion in https://github.com/bayesiains/nflows/pull/9.
I am happy to discuss the changes and feel free to change them or fix it differently.
Once this is fixed, sbi can depend on it via pyknos.
Hi Artur, we have been working on training the density estimators in sbi on a GPU. That worked just fine when globally setting the default tensor to
torch.cuda.FloatTensor
. We wanted to avoid this global setting and instead move the net and the training batches to the device manually during training (see https://github.com/mackelab/sbi/pull/331) However, this resulted in problems innflows
(mainly CPU-cuda device mismatches). I tried to fix these problems with the two commits in this PR, following the discussion in https://github.com/bayesiains/nflows/pull/9.I am happy to discuss the changes and feel free to change them or fix it differently.
Once this is fixed,
sbi
can depend on it viapyknos
.Best, Jan