Closed greatken999 closed 7 years ago
This bug seems to be related to the Keras 2 update, which should have been fixed in Kur v0.4.0rc0. Do you have an older version of Kur (kur --version
)? You can also try installing the bleeding edge from GitHub, too. The final v0.4.0 release should be on PyPI within 24 hours.
yes,i use 0.3.0 version. waiting your 0.4.0 update.
great job!
It has been released. Enjoy!
[WARNING 2017-03-23 20:43:09,774 py.warnings:87] /usr/local/lib/python3.5/dist-packages/kur/containers/layers/convolution.py:165: UserWarning: Update your
Conv1D
call to the Keras 2 API:Conv1D(padding="valid", name="..convolution.0", kernel_size=11, strides=2, filters=1000, activation="linear")
yield func(**kwargs)Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 557, in merge_with self.assert_same_rank(other) File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 603, in assert_same_rank "Shapes %s and %s must have the same rank" % (self, other)) ValueError: Shapes (11, 161, 1000) and (?, ?, ?, ?) must have the same rank
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 633, in with_rank return self.merge_with(unknown_shape(ndims=rank)) File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 564, in merge_with (self, other)) ValueError: Shapes (11, 161, 1000) and (?, ?, ?, ?) are not compatible
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/bin/kur", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/kur/main.py", line 269, in main
sys.exit(args.func(args) or 0)
File "/usr/local/lib/python3.5/dist-packages/kur/main.py", line 48, in train
func = spec.get_training_function()
File "/usr/local/lib/python3.5/dist-packages/kur/kurfile.py", line 282, in get_training_function
model = self.get_model(provider)
File "/usr/local/lib/python3.5/dist-packages/kur/kurfile.py", line 148, in get_model
self.model.build()
File "/usr/local/lib/python3.5/dist-packages/kur/model/model.py", line 282, in build
self.build_graph(input_nodes, output_nodes, network)
File "/usr/local/lib/python3.5/dist-packages/kur/model/model.py", line 339, in build_graph
target=layer
File "/usr/local/lib/python3.5/dist-packages/kur/backend/keras_backend.py", line 238, in connect
return target(inputs)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/topology.py", line 554, in call
output = self.call(inputs, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/keras/layers/convolutional.py", line 156, in call
dilation_rate=self.dilation_rate[0])
File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 2822, in conv1d
data_format=tf_data_format)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/nn_ops.py", line 639, in convolution
op=op)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/nn_ops.py", line 308, in with_space_to_batch
return op(input, num_spatial_dims, padding)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/nn_ops.py", line 631, in op
name=name)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/nn_ops.py", line 87, in _non_atrous_convolution
filter_shape = filter.get_shape().with_rank(input.get_shape().ndims)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/tensor_shape.py", line 635, in with_rank
raise ValueError("Shape %s must have rank %d" % (self, rank))
ValueError: Shape (11, 161, 1000) must have rank 4