neural-semantic-encoders icon indicating copy to clipboard operation
neural-semantic-encoders copied to clipboard

fail to run test

Open StevenLOL opened this issue 8 years ago • 0 comments

Errors come out :

nse_output = nse_encoder(nse_embed_input1)

TypeError                                 Traceback (most recent call last)
<ipython-input-8-bc8144b2d901> in <module>()
----> 1 nse_output = nse_encoder(nse_embed_input1)  # (None, 11, 50)
      2 
      3 

/usr/local/lib/python2.7/dist-packages/Keras-1.1.2-py2.7.egg/keras/engine/topology.pyc in __call__(self, x, mask)
    515         if inbound_layers:
    516             # This will call layer.build() if necessary.
--> 517             self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
    518             # Outputs were already computed when calling self.add_inbound_node.
    519             outputs = self.inbound_nodes[-1].output_tensors

/usr/local/lib/python2.7/dist-packages/Keras-1.1.2-py2.7.egg/keras/engine/topology.pyc in add_inbound_node(self, inbound_layers, node_indices, tensor_indices)
    569         # creating the node automatically updates self.inbound_nodes
    570         # as well as outbound_nodes on inbound layers.
--> 571         Node.create_node(self, inbound_layers, node_indices, tensor_indices)
    572 
    573     def get_output_shape_for(self, input_shape):

/usr/local/lib/python2.7/dist-packages/Keras-1.1.2-py2.7.egg/keras/engine/topology.pyc in create_node(cls, outbound_layer, inbound_layers, node_indices, tensor_indices)
    153 
    154         if len(input_tensors) == 1:
--> 155             output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
    156             output_masks = to_list(outbound_layer.compute_mask(input_tensors[0], input_masks[0]))
    157             # TODO: try to auto-infer shape if exception is raised by get_output_shape_for.

/data/development/development_doc_vector_snli/data/nse.pyc in call(self, x, mask)
    205             expanded_last_output = K.expand_dims(last_output, dim=1)  # (batch_size, 1, output_dim)
    206             # (batch_size, 1+input_length, output_dim)
--> 207             return K.concatenate([expanded_last_output, last_memory], axis=1)
    208 
    209     def get_config(self):

/usr/local/lib/python2.7/dist-packages/Keras-1.1.2-py2.7.egg/keras/backend/theano_backend.pyc in concatenate(tensors, axis)
    474             raise Exception('Invalid concat axis for sparse matrix: ' + axis)
    475     else:
--> 476         return T.concatenate([to_dense(x) for x in tensors], axis=axis)
    477 
    478 

/usr/local/lib/python2.7/dist-packages/Theano-0.9.0.dev2-py2.7.egg/theano/tensor/basic.pyc in concatenate(tensor_list, axis)
   4292             "or a list, make sure you did not forget () or [] around "
   4293             "arguments of concatenate.", tensor_list)
-> 4294     return join(axis, *tensor_list)
   4295 
   4296 

/usr/local/lib/python2.7/dist-packages/Theano-0.9.0.dev2-py2.7.egg/theano/gof/op.pyc in __call__(self, *inputs, **kwargs)
    600         """
    601         return_list = kwargs.pop('return_list', False)
--> 602         node = self.make_node(*inputs, **kwargs)
    603 
    604         if config.compute_test_value != 'off':

/usr/local/lib/python2.7/dist-packages/Theano-0.9.0.dev2-py2.7.egg/theano/tensor/basic.pyc in make_node(self, *axis_and_tensors)
   3812 
   3813         return self._make_node_internal(
-> 3814             axis, tensors, as_tensor_variable_args, output_maker)
   3815 
   3816     def _make_node_internal(self, axis, tensors,

/usr/local/lib/python2.7/dist-packages/Theano-0.9.0.dev2-py2.7.egg/theano/tensor/basic.pyc in _make_node_internal(self, axis, tensors, as_tensor_variable_args, output_maker)
   3878         if not python_all([x.ndim == len(bcastable)
   3879                            for x in as_tensor_variable_args[1:]]):
-> 3880             raise TypeError("Join() can only join tensors with the same "
   3881                             "number of dimensions.")
   3882 

TypeError: Join() can only join tensors with the same number of dimensions.

StevenLOL avatar Jan 11 '17 09:01 StevenLOL