A process for accelerating and optimizing a machine learning technique using a graphics processing unit, comprising: transferring trainable parameters and learning parameters from a central processing unit to the graphics processing unit before starting a training loop; training trainable parameters of the machine learning technique to obtain trained trainable parameters; using the trained trainable parameters to obtain results from the machine learning technique; using pixel shaders to perform at least one of the following: (a) training trainable parameters; (b) using the trained trainable parameters; within the training loop for training the trainable parameters: sending, from the CPU to the GPU, training data and target data and storing the training data and the target data on a memory of the GPU; updating the trainable parameters using the training data and the target data; wherein, inside the training loop, the graphics processing unit sends updated trainable parameters and errors to the central processing unit; and using pixel shaders to compute primitive operations on the graphics processing unit; the primitive operations comprising at least one of: (a) a vector inner product; (b) a matrix inner product; (c) an outer product; (d) a matrix transpose; specifying a rectangular viewport within a triangle that is rendered by a pixel shader; calculating at least one of the primitive operations by calculating, by the GPU, only pixels within an intersection of the viewport and the triangle; determining whether the training is completed, and, if it is determined that the training is completed, obtaining the final trained trainable parameters and outputting the results for use by an application, if it is determined that training is not completed, starting the training loop anew. transferring trainable parameters and learning parameters from a central processing unit to the graphics processing unit before starting a training loop; training trainable parameters of the machine learning technique to obtain trained trainable parameters; using the trained trainable parameters to obtain results from the machine learning technique; using pixel shaders to perform at least one of the following: (a) training trainable parameters; (b) using the trained trainable parameters; within the training loop for training the trainable parameters: sending, from the CPU to the GPU, training data and target data and storing the training data and the target data on a memory of the GPU; updating the trainable parameters using the training data and the target data; wherein, inside the training loop, the graphics processing unit sends updated trainable parameters and errors to the central processing unit; and using pixel shaders to compute primitive operations on the graphics processing unit; the primitive operations comprising at least one of: (a) a vector inner product; (b) a matrix inner product; (c) an outer product; (d) a matrix transpose; specifying a rectangular viewport within a triangle that is rendered by a pixel shader; calculating at least one of the primitive operations by calculating, by the GPU, only pixels within an intersection of the viewport and the triangle; determining whether the training is completed, and, if it is determined that the training is completed, obtaining the final trained trainable parameters and outputting the results for use by an application, if it is determined that training is not completed, starting the training loop anew. sending, from the CPU to the GPU, training data and target data and storing the training data and the target data on a memory of the GPU; updating the trainable parameters using the training data and the target data; wherein, inside the training loop, the graphics processing unit sends updated trainable parameters and errors to the central processing unit; and using pixel shaders to compute primitive operations on the graphics processing unit; the primitive operations comprising at least one of: (a) a vector inner product; (b) a matrix inner product; (c) an outer product; (d) a matrix transpose; specifying a rectangular viewport within a triangle that is rendered by a pixel shader; calculating at least one of the primitive operations by calculating, by the GPU, only pixels within an intersection of the viewport and the triangle; determining whether the training is completed, and, if it is determined that the training is completed, obtaining the final trained trainable parameters and outputting the results for use by an application, if it is determined that training is not completed, starting the training loop anew.