Below you will find pages that utilize the taxonomy term “howto”
Blogs
How to quickly insert a figure in LyX
I will show one of the user-defined commands that I use in Lyx, a \(\LaTeX\) frontend, to quickly insert figures with captions.
Blogs
How to handle python job cancelation in Slurm job manager
If you use Slurm job manager to run jobs on shared cluster, it often occurs that your job reaches the time limit and is terminated by Slurm. To allow a user to deal with the job termination, Slurm does this in two stages: first, the job receives SIGTERM signal that indicates that the job will be killed soon, and then the job receives SIGKILL signal that actually kills it. The time interval between these two signals is specified via Slurm’s configuration parameter KillWait.
Blogs
Saving state for tf.function-decorated functions
When you decorate a function with `tf.function` decorator, sometimes you need to keep state between invocations of this function.
The problem here is that the changes to the state will not be visible in the decorated function if the state is saved in the Python variables.
To illustrate the problem, Tensorflow 2.2 is used:
import tensorflow as tf print(tf.__version__) 2.2.0 To see the problem, let’s consider the following code. Let’s assume that we need to scale a given Tensor `x` and we do it using `tf.
Blogs
Hyperopt Basics
This is an introduction to using Hyperopt library. I will use mostly terminology of machine learning (ML) as this library appeared in the ML community.
Hyperopt library is used to choose the hyperparameters, that is, parameters that must be set before the learning process. The learning process is the process of fitting a given model to some dataset, which is done by minimization of some function.
For example, when you fit model \(\hat f (x)\) by optimizing function \[ \frac{1}{N} \sum_{i=1}^N \left( y_i - \hat f (x_i) \right)^2 + \lambda R(f), \]