using GPU
Hi, please let me know what are the modifications required to run these code on GPU server.
This being tensorflow code there shouldn't be any major obstacles to running this on the GPU. However, I haven't really tested this.
That being said, this code depends on an old version of tensorflow and I would probably recommend porting this to newer versions of tensorflow and making use of keras.
Hi, thanks for your response.
I have these additional questions too.

-
Could you please be explicit what are these instructions given?
-
My CPU system has 12 cores and 2 sockets, replacing num_cores =12 and num_sockets=2 does make any difference?
-
If I am using GPU server do I need to make any modifications here?
@spenrich Could you comment on this?
@chayan18
- For the options:
np_dtypeis used to specify the datatype for all numpy arrays to avoid such errors as trying to add two arrays of incompatible dtype (see__init__.pyandconfiguration.pyin the source code)tf_dtypeis similar and should be the TensorFlow counterpart tonp_dtypeepsis a numerical tolerance used to ensure each layer weight matrix of the Lyapunov neural network is positive definite (see eq. (2) and surrounding text in the paper)saturatespecifies whether or not saturation constraints should be applied to the fixed policy (see the cell below the title "Fixed Policy" in the example)use_zero_thresholdspecifies whether or not to consider the additional discretization term with tau in the Lyapunov decrease condition (see "Practical Considerations" on pg. 8 in the paper). If you just want to try the method out on your system without worrying about this extra term, setting this toTrueassumes a "very fine" discretization.pre_trainspecifies whether or not to pre-train the Lyapunov neural network to match some other specified Lyapunov function with supervised training. The idea is that you can use this to "initialize" the Lyapunov neural network to match, e.g., a typical quadratic function, to ensure there is an initial safe set and then apply the algorithm from theredpijust sets the DPI formatplotlibfiguresnum_coresandnum_socketscome from the performance guide on the TensorFlow website (see the sections "Optimizing for CPU" and "Tuning MKL for the best performance" in the link). These options assume you have compiled TensorFlow from source for your machine, so as long as you've done that your settings should make a difference.tf_checkpoint_pathshould specify a directory where TensorFlow checkpoints or "save points" of your session can be saved (see the cells titled "Neural Network Training" and "Initialization", and the TensorFlow docs). This is useful for prototyping different changes in your code, and even changing settings in the middle of training to see the effect they have.
-
See comment above for
num_coresandnum_sockets. -
All of these settings are related to the CPU, so they should not affect any GPU settings. I have not tried running any of this on a GPU, so I would have to defer to the TensorFlow documentation for any specifics.