Skip to content
Snippets Groups Projects
Commit f5ef6d71 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent b37f1bd6
No related merge requests found
...@@ -55,19 +55,10 @@ def run(kwargs): ...@@ -55,19 +55,10 @@ def run(kwargs):
tf.config.experimental.set_memory_growth(physical_device, True) tf.config.experimental.set_memory_growth(physical_device, True)
strategy = utils.SingleDeviceStrategy() strategy = utils.SingleDeviceStrategy()
# scope = utils.assign_to_worker(kwargs["tpu"])
sett = settings.Settings(kwargs["config"]) sett = settings.Settings(kwargs["config"])
Stats = settings.Stats(os.path.join(sett.path, "stats.yaml")) Stats = settings.Stats(os.path.join(sett.path, "stats.yaml"))
tf.random.set_seed(10) tf.random.set_seed(10)
# if kwargs["tpu"]:
# cluster_resolver = tf.distribute.cluster_resolver.TPUClusterResolver(
# kwargs["tpu"])
# tf.config.experimental_connect_to_host(cluster_resolver.get_master())
# tf.tpu.experimental.initialize_tpu_system(cluster_resolver)
# strategy = tf.distribute.experimental.TPUStrategy(cluster_resolver)
# with tf.device(scope), strategy.scope():
with strategy.scope(): with strategy.scope():
summary_writer_1 = tf.summary.create_file_writer(os.path.join(kwargs["log_dir"], "phase1")) summary_writer_1 = tf.summary.create_file_writer(os.path.join(kwargs["log_dir"], "phase1"))
summary_writer_2 = tf.summary.create_file_writer(os.path.join(kwargs["log_dir"], "phase2")) summary_writer_2 = tf.summary.create_file_writer(os.path.join(kwargs["log_dir"], "phase2"))
...@@ -155,11 +146,11 @@ parser.add_argument( ...@@ -155,11 +146,11 @@ parser.add_argument(
help="each 'v' increases vebosity of logging.") help="each 'v' increases vebosity of logging.")
# FLAGS, unparsed = parser.parse_known_args() # FLAGS, unparsed = parser.parse_known_args()
FLAGS = {'config': Path.home() + '/dev/python/modules/GSOC/E2_ESRGAN' + '/config/config.yaml', FLAGS = {'config': str(Path.home()) + '/dev/python/modules/GSOC/E2_ESRGAN' + '/config/config.yaml',
'data_dir': None, 'data_dir': None,
'manual': False, 'manual': False,
'model_dir': Path.home() + '/tf_model_esrgan/', 'model_dir': str(Path.home()) + '/tf_model_esrgan/',
'log_dir': Path.home() + '/tf_logs_esrgan/', 'log_dir': str(Path.home()) + '/tf_logs_esrgan/',
'phases': 'phase1_phase2', 'phases': 'phase1_phase2',
'export_only': False, 'export_only': False,
'tpu': '', 'tpu': '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment