import tensorflow as tf
import tensorbayes as tb
import numpy as np
from tensorbayes.layers import *
from tensorbayes.distributions import *
from tensorflow.contrib.framework import arg_scope, add_arg_scope

################
# Extra layers #
################
@add_arg_scope
def basic_accuracy(a, b, scope=None):
    with tf.name_scope(scope, 'basic_acc'):
        a = tf.argmax(a, 1)
        b = tf.argmax(b, 1)
        eq = tf.cast(tf.equal(a, b), 'float32')
        output = tf.reduce_mean(eq)
    return output

@add_arg_scope
def leaky_relu(x, a=0.2, name=None):
    with tf.name_scope(name, 'leaky_relu'):
        return tf.maximum(x, a * x)

import tensorflow as tf
import tensorbayes as tb
import numpy as np
from tensorbayes.layers import *
from tensorbayes.distributions import *
from tensorflow.contrib.framework import arg_scope, add_arg_scope

################
# Extra layers #
################
@add_arg_scope
def basic_accuracy(a, b, scope=None):
    with tf.name_scope(scope, 'basic_acc'):
        a = tf.argmax(a, 1)
        b = tf.argmax(b, 1)
        eq = tf.cast(tf.equal(a, b), 'float32')
        output = tf.reduce_mean(eq)
    return output

@add_arg_scope
def leaky_relu(x, a=0.2, name=None):
    with tf.name_scope(name, 'leaky_relu'):
        return tf.maximum(x, a * x)

################ # Extra layers # ################