mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-19 13:09:56 -07:00
Backward compatibility to tensorboard < 2.0.0
This commit is contained in:
parent
37a361a300
commit
c4a39f57f2
1 changed files with 5 additions and 1 deletions
|
@ -25,11 +25,15 @@ class TensorBoardTool:
|
|||
def run(self):
|
||||
from tensorboard import default
|
||||
from tensorboard import program
|
||||
from tensorboard import version as tb_version
|
||||
# remove http messages
|
||||
log = logging.getLogger('werkzeug').setLevel(logging.ERROR)
|
||||
# Start tensorboard server
|
||||
tb = program.TensorBoard(default.get_plugins())
|
||||
tb.configure(argv=[None, '--logdir', self.dir_path, '--port', '6006', '--bind_all'])
|
||||
tb_argv = [None, '--logdir', self.dir_path, '--port', '6006']
|
||||
if int(tb_version.VERSION[0])>=2:
|
||||
tb_argv.append("--bind_all")
|
||||
tb.configure(argv=tb_argv)
|
||||
url = tb.launch()
|
||||
print('Launched TensorBoard at {}'.format(url))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue