This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import tensorflow as tf | |
import matplotlib.pyplot as plt | |
from tensorflow.contrib.distributions import Bernoulli | |
class VariationalDense: | |
"""Variational Dense Layer Class""" | |
def __init__(self, n_in, n_out, model_prob, model_lam): | |
self.model_prob = model_prob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modified version of a tilt shift shader from Martin Jonasson (http://grapefrukt.com/) | |
// Read http://notes.underscorediscovery.com/ for context on shaders and this file | |
// License : MIT | |
uniform sampler2D tex0; | |
varying vec2 tcoord; | |
varying vec4 color; | |
/* | |
Take note that blurring in a single pass (the two for loops below) is more expensive than separating |