Coder Social home page Coder Social logo

neural-semantic-encoders's Introduction

neural-semantic-encoders's People

Contributors

pdasigi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neural-semantic-encoders's Issues

ImportError: No module named 'overrides'

First of all thanks for open sourcing this.

Issue is as follows:

$ python3 test_nse.py
Using Theano backend.
Traceback (most recent call last):
File "test_nse.py", line 5, in
from nse import NSE, MultipleMemoryAccessNSE, InputMemoryMerger
File "nse.py", line 2, in
from overrides import overrides
ImportError: No module named 'overrides'

Regards,
Luke

fail to run test

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.

Which version of keras and theano should i install?

Hi.

This toolkit is awesome, since it achieved better performance than tree-lstm and dynamic memory network for sentiment ananlysis.

I've tried various combination of different version of keras and theano. Unfortunately, it always return me an error (besides overrides). So, would you plz list the requirement for this toolkit?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.