a b/Models/Initialize_Variables/Initialize.py
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
# Import useful packages
5
import tensorflow as tf
6
7
8
# Initialize the Weights
9
def weight_variable(shape):
10
    initial = tf.truncated_normal(shape, stddev=0.01)
11
12
    return tf.Variable(initial)
13
14
15
# Initialize the Bias
16
def bias_variable(shape):
17
    initial = tf.constant(0.01, shape=shape)
18
19
    return tf.Variable(initial)