'Load network weights.
data_path: The path to the numpy-serialized network weights
session: The current TensorFlow session
ignore_missing: If true, serialized weights for missing layers are ignored.'

def load(self, data_path, session, ignore_missing=False):

    data_dict = np.load(data_path).item()
    for op_name in data_dict:
        with tf.variable_scope(op_name, reuse=True):
            for (param_name, data) in data_dict[op_name].iteritems():
                try:
                    var = tf.get_variable(param_name)
                    session.run(var.assign(data))
                except ValueError:
                    if (not ignore_missing):
                        raise
