Skip to content

Instantly share code, notes, and snippets.

@alsrgv
alsrgv / Tangent DL.ipynb
Last active October 19, 2019 20:35
Tangent DL
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import requests
from io import BytesIO
from PIL import Image
import numpy as np
import timeit
import torch
from maskrcnn_benchmark.config import cfg
from predictor import COCODemo, to_image_list
@alsrgv
alsrgv / test_nccl.c
Created November 19, 2017 17:57
Test NCCL
// Code from http://docs.nvidia.com/deeplearning/sdk/nccl-developer-guide/index.html#onedevprothrd
#define _BSD_SOURCE
#include <stdio.h>
#include "cuda_runtime.h"
#include "nccl.h"
#include "mpi.h"
#include <stdint.h>
#include <stdlib.h>
@alsrgv
alsrgv / keras_mnist_cnn.py
Created September 30, 2017 02:33
Keras with Horovod
from __future__ import print_function
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
import tensorflow as tf
import horovod.tensorflow as hvd