Seed image with arbitrary images#3
Open
ghost wants to merge 6 commits into
Open
Conversation
You might want to make the version number even higher here, but before keras 1.1.0 you'll get the error: `ModuleNotFoundError: No module named 'keras.applications'`. Before keras 2.0.0 you'll get the error: `ImportError: cannot import name 'conv_utils'`
If I let this default to the the Theano backend, I get:
```
Traceback (most recent call last):
File "synthesize.py", line 91, in <module>
pyramid_model = gram.make_pyramid_model(args.octaves, args.padding_mode)
File "/Users/ryan/mess/2017/42/subjective-functions/gram.py", line 242, in make_pyramid_model
level = reduce_layer(padding_mode=padding_mode)(gaussian_pyramid[-1])
File "/usr/local/lib/python3.6/site-packages/keras/engine/topology.py", line 602, in __call__
output = self.call(inputs, **kwargs)
File "/usr/local/lib/python3.6/site-packages/keras/layers/core.py", line 650, in call
return self.function(inputs, **arguments)
File "/Users/ryan/mess/2017/42/subjective-functions/gram.py", line 150, in fn
return K.conv2d(K.conv2d(x, kernel_3d, strides=(2,1)),
File "/usr/local/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 1878, in conv2d
kernel_shape = kernel.eval().shape
AttributeError: 'numpy.ndarray' object has no attribute 'eval'
```
Specify TensorFlow backend in README
Update requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I don't know if you're interested in this at all, but I wanted to play around with it and thought you might find it useful. Add the argument "--seed-image /path/to/seed/image.jpg" to seed with an arbitrary image file. Note that adjusting the output size can only be done with "output_width" and maintains the aspect ratio of the input image. So, if you give a seed image and specify only output_height, the original image size is used.