Skip to content

Commit

Permalink
Runs to completion, good results but slightly different as before.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjc committed Apr 24, 2016
1 parent 93dc6ec commit 346eac2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def error(message, *lines):
# Load the underlying deep learning libraries based on the device specified. If you specify THEANO_FLAGS manually,
# the code assumes you know what you are doing and they are not overriden!
os.environ.setdefault('THEANO_FLAGS', 'floatX=float32,device={},force_device=True,'\
'print_active_device=False'.format(args.device))
'print_active_device=False,optimizer=fast_compile'.format(args.device))

# Scientific Libraries
import numpy as np
Expand Down Expand Up @@ -373,12 +373,12 @@ def do_match_patches(self, layer):
dist = self.matcher_outputs[layer]
dist = dist.reshape((dist.shape[1], -1))

offset = self.matcher_history[layer]
offset = self.matcher_history[layer].reshape((-1, 1))
scores = (dist - offset * args.variety)
matches = scores.argmax(axis=0)

# Pick the best style patches for each patch in the current image, the result is an array of indices.
return [dist.argmax(axis=0), scores.max(axis=0), dist.max(axis=1)]
return [matches, scores.max(axis=0), dist.max(axis=1)]


#------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 346eac2

Please sign in to comment.