tensorflow / tensor2tensor

Library of deep learning models and datasets designed to make deep learning more accessible and accelerate ML research.
Apache License 2.0
15.5k stars 3.49k forks source link

how to change tf.ConfigProto related parameter in tensor2tensor (such as gpu_mem_fraction) #1268

Closed yuwen-yan closed 5 years ago

yuwen-yan commented 5 years ago

I try to set it with tf.flags.FLAGS.DEFINE_float("worker_gpu_memory_fraction", 0.5, "") according to the source code https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/bin/t2t_trainer.py#L246 , but the program just throw absl.flags._exceptions.DuplicateFlagError with info The flag 'worker_gpu_memory_fraction' is defined twice. First from tensor2tensor.utils.flags, Second from usr_dir.text_cnn., looks I have to change the source code of the installed local package?

yuwen-yan commented 5 years ago

pls ignore my question, I just find that I can set it by command line parameter t2t_trainer --worker_gpu_memory_fraction=0.5