From f5ef6d713de36201760ee27a908f3d90611cb570 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Mon, 14 Aug 2023 13:08:25 -0500
Subject: [PATCH] snapshot...

---
 modules/GSOC/E2_ESRGAN/main.py | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/modules/GSOC/E2_ESRGAN/main.py b/modules/GSOC/E2_ESRGAN/main.py
index 456af113..a65ea43e 100644
--- a/modules/GSOC/E2_ESRGAN/main.py
+++ b/modules/GSOC/E2_ESRGAN/main.py
@@ -55,19 +55,10 @@ def run(kwargs):
     tf.config.experimental.set_memory_growth(physical_device, True)
 
   strategy = utils.SingleDeviceStrategy()
-  # scope = utils.assign_to_worker(kwargs["tpu"])
   sett = settings.Settings(kwargs["config"])
   Stats = settings.Stats(os.path.join(sett.path, "stats.yaml"))
   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():
     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"))
@@ -155,11 +146,11 @@ parser.add_argument(
   help="each 'v' increases vebosity of logging.")
 # 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,
          'manual': False,
-         'model_dir': Path.home() + '/tf_model_esrgan/',
-         'log_dir': Path.home() + '/tf_logs_esrgan/',
+         'model_dir': str(Path.home()) + '/tf_model_esrgan/',
+         'log_dir': str(Path.home()) + '/tf_logs_esrgan/',
          'phases': 'phase1_phase2',
          'export_only': False,
          'tpu': '',
-- 
GitLab