aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Bauman <logan_bauman@brown.edu>2022-05-05 11:12:46 -0400
committerLogan Bauman <logan_bauman@brown.edu>2022-05-05 11:12:46 -0400
commit6e5f2d1a62f4f3bf0e87829082b2120ca440ddf0 (patch)
treeecfd65137a4209465c2a6fa4734b1116d9aefeff
parent75881fd64d214280c9a5e41a49d016f9b1cf3d12 (diff)
hi
-rw-r--r--__pycache__/hyperparameters.cpython-38.pycbin324 -> 341 bytes
-rw-r--r--__pycache__/losses.cpython-38.pycbin4378 -> 4409 bytes
-rw-r--r--hyperparameters.py2
-rw-r--r--losses.py4
-rw-r--r--save.jpgbin20991 -> 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
--- a/__pycache__/hyperparameters.cpython-38.pyc
+++ b/__pycache__/hyperparameters.cpython-38.pyc
Binary files differ
diff --git a/__pycache__/losses.cpython-38.pyc b/__pycache__/losses.cpython-38.pyc
index 1fa5462b..71b86245 100644
--- a/__pycache__/losses.cpython-38.pyc
+++ b/__pycache__/losses.cpython-38.pyc
Binary files 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
--- a/save.jpg
+++ b/save.jpg
Binary files differ