Hello everybody!
I am trying to generate some images from pretrained models to see how it works in general. But after calling
python2 demo_generation.py models/honey_filters64_npx161_5gL_5dL_60Global_3Periodic_FalseAffine_30Local_epoch100.psgan
I'm facing an error:
using stored model models/honey_filters64_npx161_5gL_5dL_60Global_3Periodic_FalseAffine_30Local_epoch100.psgan
loading parameters from file: models/honey_filters64_npx161_5gL_5dL_60Global_3Periodic_FalseAffine_30Local_epoch100.psgan
global dimensions of loaded config file 60
Compiling the network...
Discriminator done. (took 13.628841877 s)
Generator done. (took 7.85284900665 s)
generate function done. (took 2.22278308868 s)
nz 96 global Dimensions 60 periodic Dimensions 3
G values [512, 256, 128, 64, 3] [(5, 5), (5, 5), (5, 5), (5, 5), (5, 5)]
D values [3, 64, 128, 256, 512] [(5, 5), (5, 5), (5, 5), (5, 5), (5, 5)]
Traceback (most recent call last):
File "demo_generation.py", line 70, in
sample_texture(psgan)
File "demo_generation.py", line 61, in sample_texture
data = psgan.generate(z_sample)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/theano/compile/function_module.py", line 886, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/theano/compile/function_module.py", line 873, in call
self.fn() if output_subset is None else\
AssertionError: AbstractConv_gradInputs shape mismatch: shape of filters does not match given kshp.
Apply node that caused the error: Assert{msg='AbstractConv_gradInputs shape mismatch: shape of filters does not match given kshp.'}(W, Elemwise{eq,no_inplace}.0, Elemwise{eq,no_inplace}.0, Elemwise{eq,no_inplace}.0, Elemwise{eq,no_inplace}.0)
Toposort index: 72
Inputs types: [TensorType(float64, 4D), TensorType(bool, scalar), TensorType(bool, scalar), TensorType(bool, scalar), TensorType(bool, scalar)]
Inputs shapes: [(96, 512, 5, 5), (), (), (), ()]
Inputs strides: [(102400, 200, 40, 8), (), (), (), ()]
Inputs values: ['not shown', array(False), array(True), array(True), array(True)]
Inputs type_num: [12, 0, 0, 0, 0]
Outputs clients: [[Subtensor{::, ::, ::int64, ::int64}(Assert{msg='AbstractConv_gradInputs shape mismatch: shape of filters does not match given kshp.'}.0, Constant{-1}, Constant{-1})]]
Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
File "demo_generation.py", line 64, in
psgan = PSGAN(name=name)
File "/Users/michaelmedved/Development/kaleidoscope/psgan/psgan/psgan.py", line 174, in init
self._build_sgan()
File "/Users/michaelmedved/Development/kaleidoscope/psgan/psgan/psgan.py", line 327, in _build_sgan
prediction_gen = lasagne.layers.get_output(gen_X)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/lasagne/layers/helper.py", line 197, in get_output
all_outputs[layer] = layer.get_output_for(layer_inputs, kwargs)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/lasagne/layers/conv.py", line 352, in get_output_for
conved = self.convolve(input, kwargs)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/lasagne/layers/conv.py", line 981, in convolve
conved = op(self.W, input, output_size)
Hello everybody! I am trying to generate some images from pretrained models to see how it works in general. But after calling
python2 demo_generation.py models/honey_filters64_npx161_5gL_5dL_60Global_3Periodic_FalseAffine_30Local_epoch100.psgan
I'm facing an error:
using stored model models/honey_filters64_npx161_5gL_5dL_60Global_3Periodic_FalseAffine_30Local_epoch100.psgan loading parameters from file: models/honey_filters64_npx161_5gL_5dL_60Global_3Periodic_FalseAffine_30Local_epoch100.psgan global dimensions of loaded config file 60 Compiling the network... Discriminator done. (took 13.628841877 s) Generator done. (took 7.85284900665 s) generate function done. (took 2.22278308868 s) nz 96 global Dimensions 60 periodic Dimensions 3 G values [512, 256, 128, 64, 3] [(5, 5), (5, 5), (5, 5), (5, 5), (5, 5)] D values [3, 64, 128, 256, 512] [(5, 5), (5, 5), (5, 5), (5, 5), (5, 5)] Traceback (most recent call last): File "demo_generation.py", line 70, in
sample_texture(psgan)
File "demo_generation.py", line 61, in sample_texture
data = psgan.generate(z_sample)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/theano/compile/function_module.py", line 886, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/theano/compile/function_module.py", line 873, in call
self.fn() if output_subset is None else\
AssertionError: AbstractConv_gradInputs shape mismatch: shape of filters does not match given kshp.
Apply node that caused the error: Assert{msg='AbstractConv_gradInputs shape mismatch: shape of filters does not match given kshp.'}(W, Elemwise{eq,no_inplace}.0, Elemwise{eq,no_inplace}.0, Elemwise{eq,no_inplace}.0, Elemwise{eq,no_inplace}.0)
Toposort index: 72
Inputs types: [TensorType(float64, 4D), TensorType(bool, scalar), TensorType(bool, scalar), TensorType(bool, scalar), TensorType(bool, scalar)]
Inputs shapes: [(96, 512, 5, 5), (), (), (), ()]
Inputs strides: [(102400, 200, 40, 8), (), (), (), ()]
Inputs values: ['not shown', array(False), array(True), array(True), array(True)]
Inputs type_num: [12, 0, 0, 0, 0]
Outputs clients: [[Subtensor{::, ::, ::int64, ::int64}(Assert{msg='AbstractConv_gradInputs shape mismatch: shape of filters does not match given kshp.'}.0, Constant{-1}, Constant{-1})]]
Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer): File "demo_generation.py", line 64, in
psgan = PSGAN(name=name)
File "/Users/michaelmedved/Development/kaleidoscope/psgan/psgan/psgan.py", line 174, in init
self._build_sgan()
File "/Users/michaelmedved/Development/kaleidoscope/psgan/psgan/psgan.py", line 327, in _build_sgan
prediction_gen = lasagne.layers.get_output(gen_X)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/lasagne/layers/helper.py", line 197, in get_output
all_outputs[layer] = layer.get_output_for(layer_inputs, kwargs)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/lasagne/layers/conv.py", line 352, in get_output_for
conved = self.convolve(input, kwargs)
File "/Users/michaelmedved/Library/Python/2.7/lib/python/site-packages/lasagne/layers/conv.py", line 981, in convolve
conved = op(self.W, input, output_size)
Debugprint of the apply node: Assert{msg='AbstractConv_gradInputs shape mismatch: shape of filters does not match given kshp.'} [id A] <TensorType(float64, 4D)> ''
|W [id B] <TensorType(float64, 4D)> |Elemwise{eq,no_inplace} [id C] <TensorType(bool, scalar)> ''
| |Shape_i{0} [id D] <TensorType(int64, scalar)> ''
| | |W [id B] <TensorType(float64, 4D)> | |TensorConstant{102} [id E] <TensorType(int8, scalar)> |Elemwise{eq,no_inplace} [id F] <TensorType(bool, scalar)> ''
| |Shape_i{1} [id G] <TensorType(int64, scalar)> ''
| | |W [id B] <TensorType(float64, 4D)> | |TensorConstant{512} [id H] <TensorType(int16, scalar)> |Elemwise{eq,no_inplace} [id I] <TensorType(bool, scalar)> ''
| |Shape_i{2} [id J] <TensorType(int64, scalar)> ''
| | |W [id B] <TensorType(float64, 4D)> | |TensorConstant{5} [id K] <TensorType(int8, scalar)> |Elemwise{eq,no_inplace} [id L] <TensorType(bool, scalar)> ''
|Shape_i{3} [id M] <TensorType(int64, scalar)> ''
| |W [id B] <TensorType(float64, 4D)> |TensorConstant{5} [id K] <TensorType(int8, scalar)>
Storage map footprint:
Can you explain please where is the problem and how can it be fixed