MCPcopy
hub / github.com/Turing-Project/WriteGPT / get_session

Function get_session

RecognizaitonNetwork/train/train.py:33–42  ·  view source on GitHub ↗
(gpu_fraction=0.2)

Source from the content-addressed store, hash-verified

31maxlabellength = 2
32
33def get_session(gpu_fraction=0.2):
34
35 num_threads = os.environ.get('OMP_NUM_THREADS')
36 gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=gpu_fraction,allow_growth = True)
37
38 if num_threads:
39 return tf.Session(config=tf.ConfigProto(
40 gpu_options=gpu_options, intra_op_parallelism_threads=num_threads))
41 else:
42 return tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
43
44def readfile(filename):
45 res = []

Callers 1

train.pyFile · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected