Skip to content

Instantly share code, notes, and snippets.

View Luonic's full-sized avatar
:shipit:

Alexandr Kislinskiy Luonic

:shipit:
  • Moscow, RU
View GitHub Profile
@Brainiarc7
Brainiarc7 / build-tensorflow-from-source.md
Last active September 9, 2024 22:48
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:

@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)