December 2017
Intermediate to advanced
536 pages
14h 23m
English
We proceed with activation functions as follows:
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # Threshold Activation function def threshold (x): cond = tf.less(x, tf.zeros(tf.shape(x), dtype = x.dtype)) out = tf.where(cond, tf.zeros(tf.shape(x)), tf.ones(tf.shape(x))) return out # Plotting Threshold Activation Function h = np.linspace(-1,1,50) ...
Read now
Unlock full access