Skip to content

Instantly share code, notes, and snippets.


Christian Hundt gravitino

Block or report user

Report or block gravitino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gravitino /
Created Mar 22, 2017
dense matrix factorization
import tensorflow as tf
import tqdm
def tfmf(D, k,
params_dict={"iters":2**14, "p":2, "h":1E-2, "init":"kmeans"},
regularizer_dict={"lambda_C":1E-3, "lambda_B":1E-3, "p":1}):
m, n = D.shape[0], D.shape[1]
D_con = tf.constant(D)
gravitino /
Created Feb 28, 2016
scalable spectral clustering using efficient out of sample extension by estimating the feature transform
import numpy as np
import pylab as pl
#import seaborn as sns
from sklearn.datasets import make_blobs, make_circles
def rbf_kernel(X, beta=None, p=2):
num_data, num_feat = X.shape
kernel = np.zeros((num_data, num_data))
gravitino /
Last active Feb 16, 2016
branch divergent-free if in CUDA considered harmful (benchmarked on Titan X)
#include <iostream>
// error makro
#define CUERR { \
cudaError_t err; \
if ((err = cudaGetLastError()) != cudaSuccess) { \
std::cout << "CUDA error: " << cudaGetErrorString(err) << " : " \
<< __FILE__ << ", line " << __LINE__ << std::endl; \
exit(1); \
} \
gravitino / rngpu.hpp
Created Feb 11, 2016
lightweight cuRand alternative
View rngpu.hpp
#ifndef RNGPU_HPP
#define RNGPU_HPP
#if defined(__CUDA_ARCH__)
#define INLINE_QUALIFIERS __host__ __device__ __forceinline__
#include <math.h>
#define INLINE_QUALIFIERS inline
gravitino / inplace.hpp
Created Feb 11, 2016
Inplace Permutation
View inplace.hpp
class value_t,
class index_t>
void permute(
value_t * data,
index_t * perm,
index_t length) {

Keybase proof

I hereby claim:

  • I am gravitino on github.
  • I am hundt ( on keybase.
  • I have a public key whose fingerprint is D3F4 A995 7D3A 7400 874C D1A9 C584 38B7 5FAA 47C7

To claim this, I am signing this object:

You can’t perform that action at this time.