# Path: ldif/model/hparams.py
# def backwards_compatible_hparam_defaults(ident):
# def tf_hparams_to_dict(tf_hparams):
# def build_ldif_hparams():
# def build_sif_hparams():
# def build_improved_sif_hparams():
# def build_singleview_depth_hparams():
# def write_hparams(hparams, path):
# def read_hparams_with_new_backwards_compatible_additions(path):
# def read_hparams(path):
# 
# 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/path_util.py
# def get_path_to_ldif_root():
# def get_path_to_ldif_parent():
# def package_to_abs(path):
# def gaps_path():
# def test_data_path():
# def util_test_data_path():
# def create_test_output_dir():
# 
# 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 importlib
import os
import numpy as np
from ldif.model import hparams as hparams_util
from ldif.util import file_util
from ldif.util import path_util
from ldif.util.file_util import log
    for a in self.lazy_attrs:
      val = getattr(self, a)
      is_initialized = val is not None
      if is_initialized:
        raise ValueError('Attribute %s has already been set to value %s' %
                         (a, repr(val)))

  def set_use_temp_ckpts(self, useable):
    assert useable in [True, False, 'warn']
    self._ensure_lazy_attrs_are_zero()
    self._use_temp_ckpts = useable

  @property
  def is_visible(self):
    return self.xid in self.experiment.visible_xids

  def ensure_visible(self):
    if not self.is_visible:
      raise ValueError(
          'Job failed ensure_visible() check: %i. Only %i are visible.' %
          (self.xid, self.experiment.visible_xids))

  @property
  def ckpt_dir(self):
    return self.root_dir + '/train/'

  @property
  def root_dir(self):
    if self._root_dir is None:
      self._root_dir = '%s/%s/' % (self.experiment.root, self.job_str)

# Path: ldif/model/hparams.py
# def backwards_compatible_hparam_defaults(ident):
# def tf_hparams_to_dict(tf_hparams):
# def build_ldif_hparams():
# def build_sif_hparams():
# def build_improved_sif_hparams():
# def build_singleview_depth_hparams():
# def write_hparams(hparams, path):
# def read_hparams_with_new_backwards_compatible_additions(path):
# def read_hparams(path):
# 
# 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/path_util.py
# def get_path_to_ldif_root():
# def get_path_to_ldif_parent():
# def package_to_abs(path):
# def gaps_path():
# def test_data_path():
# def util_test_data_path():
# def create_test_output_dir():
# 
# 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/inference/experiment.py
import importlib
import os
import numpy as np
from ldif.model import hparams as hparams_util
from ldif.util import file_util
from ldif.util import path_util
from ldif.util.file_util import log

    for a in self.lazy_attrs:
      val = getattr(self, a)
      is_initialized = val is not None
      if is_initialized:
        raise ValueError('Attribute %s has already been set to value %s' %
                         (a, repr(val)))

  def set_use_temp_ckpts(self, useable):
    assert useable in [True, False, 'warn']
    self._ensure_lazy_attrs_are_zero()
    self._use_temp_ckpts = useable

  @property
  def is_visible(self):
    return self.xid in self.experiment.visible_xids

  def ensure_visible(self):
    if not self.is_visible:
      raise ValueError(
          'Job failed ensure_visible() check: %i. Only %i are visible.' %
          (self.xid, self.experiment.visible_xids))

  @property
  def ckpt_dir(self):
    return self.root_dir + '/train/'

  @property
  def root_dir(self):
    if self._root_dir is None:
      self._root_dir = '%s/%s/' % (self.experiment.root, self.job_str)

      if not file_util.exists(self._root_dir):