Skip to content

Instantly share code, notes, and snippets.

View Luonic's full-sized avatar
:shipit:

Alexandr Kislinskiy Luonic

:shipit:
View GitHub Profile
@snakers4
snakers4 / gradient_adaptive_factor.py
Created February 2, 2021 12:44
Gradient Adaptive Factor
import torch
import itertools
# Based on https://github.com/bfs18/tacotron2
def grads_for_params(loss, parameters, optimizer):
optimizer.zero_grad()
loss.backward(retain_graph=True)
@Brainiarc7
Brainiarc7 / build-tensorflow-from-source.md
Last active July 29, 2023 21:28
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown: