From 6e5f2d1a62f4f3bf0e87829082b2120ca440ddf0 Mon Sep 17 00:00:00 2001 From: Logan Bauman Date: Thu, 5 May 2022 11:12:46 -0400 Subject: hi --- __pycache__/hyperparameters.cpython-38.pyc | Bin 324 -> 341 bytes __pycache__/losses.cpython-38.pyc | Bin 4378 -> 4409 bytes hyperparameters.py | 2 +- losses.py | 4 +++- save.jpg | Bin 20991 -> 39903 bytes 5 files changed, 4 insertions(+), 2 deletions(-) diff --git a/__pycache__/hyperparameters.cpython-38.pyc b/__pycache__/hyperparameters.cpython-38.pyc index 1e5b0ee5..e1a90bd4 100644 Binary files a/__pycache__/hyperparameters.cpython-38.pyc and b/__pycache__/hyperparameters.cpython-38.pyc differ diff --git a/__pycache__/losses.cpython-38.pyc b/__pycache__/losses.cpython-38.pyc index 1fa5462b..71b86245 100644 Binary files a/__pycache__/losses.cpython-38.pyc and b/__pycache__/losses.cpython-38.pyc differ diff --git a/hyperparameters.py b/hyperparameters.py index 40120a53..b03db017 100644 --- a/hyperparameters.py +++ b/hyperparameters.py @@ -9,7 +9,7 @@ Number of epochs. If you experiment with more complex networks you might need to increase this. Likewise if you add regularization that slows training. """ -num_epochs = 10000 +num_epochs = 5000 """ A critical parameter that can dramatically affect whether training diff --git a/losses.py b/losses.py index 7c99d73a..7198ebf4 100644 --- a/losses.py +++ b/losses.py @@ -11,7 +11,7 @@ class YourModel(tf.keras.Model): self.content_image = transform.resize(content_image, tf.shape(style_image), anti_aliasing=True) self.content_image = tf.expand_dims(self.content_image, axis=0) - + #perhaps consider cropping to avoid distortion self.style_image = transform.resize(style_image, tf.shape(style_image), anti_aliasing=True) self.style_image = tf.expand_dims(self.style_image, axis=0) @@ -19,6 +19,8 @@ class YourModel(tf.keras.Model): self.alpha = hp.alpha self.beta = hp.beta + print(self.x.shape) + print(self.content_image.shape, self.style_image.shape) self.optimizer = tf.keras.optimizers.Adam() diff --git a/save.jpg b/save.jpg index c19eff65..86b5f854 100644 Binary files a/save.jpg and b/save.jpg differ -- cgit v1.2.3-70-g09d2