You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My way to solve this TypeError is rewriting the function of get_output_shape_for in Class ConCatLayer, compatibility with summarizing while None in sizes . But rewriting package's function seems a little tricky. @hjweide , how did you do?
The text was updated successfully, but these errors were encountered:
happylicio
changed the title
TypeError: unsupported operand type(s) for +: "int" and "NoneType"
TypeError: unsupported operand type(s) for +: "int" and "NoneType" while run python train.pyOct 25, 2016
@happylicio, I'm afraid I don't entirely understand what you're asking. Running python train.py works for me using the latest versions of Lasagne and Theano. Could you please provide steps to reproduce this issue, perhaps with some terminal output?
I'm sorry for not noting your reply timely. The following picture addresses the TypeError when I firstly run your code python train.py.
According to the Traceback, the error case is like sum([None, None, ...]). So I rewrite the code in lasagne/layers/merge.py and successfully run your code. But this way is a little tricky cause rewriting lasagne library code. I just wanna whether you have the same problem and your way to solving it.
BTW, your blog and implementation adversarial-autoencoder are an awesome work and help me a lot.
Are you perhaps using an old version of Lasagne? You'll notice that the ConcatLayer already deals with None in the input shape:
# Infer output shape on concatenation axis and return
sizes = [input_shape[self.axis] for input_shape in input_shapes]
concat_size = None if any(s is None for s in sizes) else sum(sizes)
output_shape[self.axis] = concat_size
return tuple(output_shape)
Also, thank you, I'm glad to hear that my code was useful to you :)
My way to solve this TypeError is rewriting the function of get_output_shape_for in Class ConCatLayer, compatibility with summarizing while
None
insizes
. But rewriting package's function seems a little tricky. @hjweide , how did you do?The text was updated successfully, but these errors were encountered: