Repository navigation
Training an embedding net in batches #1604
|
Hello, I am trying to train an embedding net with a large data-set. I am using an embedding net because my data involves higher-dimensional images. As a result, the training data is very large (too large to be stored in memory, I am working with CPUs). However, I have not found a way to write a custom training loop when using an embedding network. Is there a way to write a custom training loop when using an embedding network? If this is not possible, how would I go about training the embedding net in batches? Any help would be much appreciated. Thank you. |
Replies: 1 comment 11 replies
|
Hi there, please follow this tutorial. As you can see there, it fully exposes the dataloader, which you can modify to your needs. For the embedding net, do: from sbi.neural_nets.net_builders import build_nsf
embedding_net = ...
density_estimator = build_nsf(theta, x, embedding_net=embedding_net)See here for more neural net options. Hope this helps! |
Hi there,
please follow this tutorial. As you can see there, it fully exposes the dataloader, which you can modify to your needs. For the embedding net, do:
See here for more neural net options.
Hope this helps!
Michael