hardmaru / supercell

supercell
190 stars 42 forks source link

orthogonal_initializer cause trouble in r0.10 #1

Closed MycChiu closed 8 years ago

MycChiu commented 8 years ago

First off, thank you so much for releasing the code! It would really save people tons of time!

Now the real issue:

After Tensorflow r0.10 the initializer will be expected to have a keyword argument called partition_info, so the current code would not run on TF version beyond r0.10, but it only takes a small modification to run properly. we can just replace the initializer with this:

def orthogonal_initializer(scale=1.0):
    def _initializer(shape, dtype=tf.float32, partition_info=None):
        return tf.constant(orthogonal(shape) * scale, dtype)
    return _initializer

Though I am not sure, I don't think adding this will break the code for earlier versions of TF.

hardmaru commented 8 years ago

Sounds good, will make the change.