Check Net Device #1687
-
|
Hi all. I haven't gone fully into the libraries, but I've noticed that in thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi Ali, this happens during composition of the user-specified density estimator ("mdn", "maf" etc), the z-scoring transforms, and the potential user-specified embedding net. The composition of the these nets always happens on the cpu, therefore the hardcoded "cpu". Thus, if you are passing an embedding net to This is how it could look like: net_builder = posterior_nn(
model="maf",
z_score_x="structured",
embedding_net=your_embedding_on_cpu
)
trainer = NPE(prior=prior, density_estimator=net_builder, device="cuda")passing Does this answer your question? |
Beta Was this translation helpful? Give feedback.
Hi Ali, this happens during composition of the user-specified density estimator ("mdn", "maf" etc), the z-scoring transforms, and the potential user-specified embedding net. The composition of the these nets always happens on the cpu, therefore the hardcoded "cpu".
Thus, if you are passing an embedding net to
posterior_nnthen this net should be on the CPU, even if you later want to train on GPU.This is how it could look like:
passing
device="cuda"(or your local device name), is all you need to trai…