Library Settings - Gleethos/neureka GitHub Wiki

Accessing Settings

Before working with tensors it might be useful to configure Neureka to fit your needs. Accessing settings can be done as follows :

Settings settings = Neureka.get().settings();

Autograd Configuration

The following lines show the default configuration for the autograd system. You may want to adjust them to your needs. (For more information take a look at their documentation)

Neureka.get().reset(); // We can reset everything, just in case! 👍 
var settings = Neureka.get().settings().autograd();
// Then we use the following autograd settings :
settings.setIsApplyingGradientWhenTensorIsUsed( false ); // Manual applying
settings.setIsApplyingGradientWhenRequested( false ); // Not needed when manual applying!
settings.setIsRetainingPendingErrorForJITProp( false ); // Lazy gradient propagation...