# Path: ldif/util/file_util.py
# def readlines(p):
# def readbin(p):
# def writebin(p, s):
# def writetxt(p, s):
# def write_np(path, arr):
# def read_grd(path):
# def read_sif_v1(path, verbose=False):
# def read_lines(p):
# def read_image(p):
# def read_npz(p):
# def read_np(p):
# def read_txt_to_np(p):
# def read_py2_pkl(p):
# def write_mesh(path, mesh):
# def read_mesh(path):
# def read_csv(path):
# def read_normals(path_to_dir, im_count=20, leading='_depth'):
# def write_points(path_ext_optional, points):
# def write_grd(path, volume, world2grid=None):
# def write_depth_image(path, depth_image):


import functools
import tensorflow as tf
import tensorflow.contrib.layers as contrib_layers
from ldif.util.file_util import log
    normalizer = contrib_layers.batch_norm
  elif model_config.hparams.nrm == 'bneitvt':
    normalizer_params = {
        'is_training': not model_config.inference,
        'trainable': not model_config.inference
    }
    normalizer = contrib_layers.batch_norm
  elif model_config.hparams.nrm == 'none':
    normalizer_params = None
    normalizer = None
  else:
    raise ValueError('The input normalization hyperparameter %s is unknown.' %
                     model_config.hparams.nrm)
  return normalizer, normalizer_params


def conv_layer(inputs, depth, model_config):
  """A single 3x3 convolutional layer with stride 1."""
  normalizer, normalizer_params = get_normalizer_and_mode(model_config)
  ibs, ih, iw, ic = inputs.get_shape().as_list()
  outputs = contrib_layers.convolution(
      inputs=inputs,
      num_outputs=depth,
      kernel_size=3,
      stride=1,
      padding='SAME',
      normalizer_fn=normalizer,
      normalizer_params=normalizer_params,
      activation_fn=tf.nn.leaky_relu)
  obs, oh, ow, oc = outputs.get_shape().as_list()

# Path: ldif/util/file_util.py
# def readlines(p):
# def readbin(p):
# def writebin(p, s):
# def writetxt(p, s):
# def write_np(path, arr):
# def read_grd(path):
# def read_sif_v1(path, verbose=False):
# def read_lines(p):
# def read_image(p):
# def read_npz(p):
# def read_np(p):
# def read_txt_to_np(p):
# def read_py2_pkl(p):
# def write_mesh(path, mesh):
# def read_mesh(path):
# def read_csv(path):
# def read_normals(path_to_dir, im_count=20, leading='_depth'):
# def write_points(path_ext_optional, points):
# def write_grd(path, volume, world2grid=None):
# def write_depth_image(path, depth_image):


# Path: ldif/util/net_util.py
import functools
import tensorflow as tf
import tensorflow.contrib.layers as contrib_layers
from ldif.util.file_util import log

    normalizer = contrib_layers.batch_norm
  elif model_config.hparams.nrm == 'bneitvt':
    normalizer_params = {
        'is_training': not model_config.inference,
        'trainable': not model_config.inference
    }
    normalizer = contrib_layers.batch_norm
  elif model_config.hparams.nrm == 'none':
    normalizer_params = None
    normalizer = None
  else:
    raise ValueError('The input normalization hyperparameter %s is unknown.' %
                     model_config.hparams.nrm)
  return normalizer, normalizer_params


def conv_layer(inputs, depth, model_config):
  """A single 3x3 convolutional layer with stride 1."""
  normalizer, normalizer_params = get_normalizer_and_mode(model_config)
  ibs, ih, iw, ic = inputs.get_shape().as_list()
  outputs = contrib_layers.convolution(
      inputs=inputs,
      num_outputs=depth,
      kernel_size=3,
      stride=1,
      padding='SAME',
      normalizer_fn=normalizer,
      normalizer_params=normalizer_params,
      activation_fn=tf.nn.leaky_relu)
  obs, oh, ow, oc = outputs.get_shape().as_list()

  log.info(