Ejemplo n.º 1
0
def SampleText(model_file, op_file, base_output_dir, data_proto, gpu_mem,
               main_mem):
    datasets = ['train']
    layernames = [
        'RNA1seq_input_layer', 'RNA2seq_input_layer', 'RNA3seq_input_layer'
    ]
    layernames_to_unclamp = [
        'RNA1seq_input_layer', 'RNA2seq_input_layer', 'RNA3seq_input_layer',
        'joint_hidden1'
    ]
    method = 'gibbs'  # 'gibbs'
    steps = 1000

    inference.DoInference(model_file,
                          op_file,
                          base_output_dir,
                          layernames,
                          layernames_to_unclamp,
                          memory='10G',
                          method=method,
                          steps=steps,
                          datasets=datasets,
                          gpu_mem=gpu_mem,
                          main_mem=main_mem,
                          data_proto=data_proto)
Ejemplo n.º 2
0
def SampleText(model_file, op_file, base_output_dir, data_proto, gpu_mem, main_mem):
  datasets = ['test']
  layernames = ['joint_hidden', 'text_layer']
  layernames_to_unclamp = ['text_layer']
  method = 'mf'  # 'gibbs'
  steps = 10

  inference.DoInference(model_file, op_file, base_output_dir, layernames,
                        layernames_to_unclamp, memory='1G', method=method,
                        steps=steps, datasets=datasets, gpu_mem=gpu_mem,
                        main_mem=main_mem, data_proto=data_proto)
Ejemplo n.º 3
0
def SampleImage(model_file, op_file, base_output_dir, data_proto, gpu_mem, main_mem):
#  datasets = ['train']
#  datasets = ['test']
  datasets = ['validation']
  layernames = ['joint_hidden', 'image_hidden2']
  layernames_to_unclamp = ['image_hidden2']
  method = 'mf'  # 'gibbs'
  steps = 10

  inference.DoInference(model_file, op_file, base_output_dir, layernames,
                        layernames_to_unclamp, memory='1G', method=method,
                        steps=steps, datasets=datasets, gpu_mem=gpu_mem,
                        main_mem=main_mem, data_proto=data_proto)