Coder Social home page Coder Social logo

dense_tensor's People

Contributors

bstriner avatar github-bot-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jjwangnlp

dense_tensor's Issues

There is no setup.py file to install

Hi.
When installing the package, I confronted with the following error.
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-4l69r1fk-build/setup.py'

which means that there is no setup.py file to install package. Could you please add it?

Keras 2 possible issues

Just a heads up that I haven't tested on Keras-2 yet. Please comment here if you run into issues. Will try to update over the summer.

Cheers

Question about Dense Tensor Layer: f_i = a( xV_ix^T + W_ix^T + b_i).

Hello, I have some question about the formula in your program

Dense Tensor Layer: f_i = a( xV_ix^T + W_ix^T + b_i)

Your formula is different of socher's, What is x represent for in above formula?

In socher's paper, The formula should be f_i = a( e_1V_ie_2^T + W_i*(e_1,e_2)^T + b_i).

compatibility with keras 20.0.8?

Hi,
Could you please let me know whether or not it is compatible with keras 2.0.8 as there are some API change in the latest version of keras.

ValueError: Multiple target dimensions are not supported. Expected: None, int, (int, int), Provided: [[1], [1]]

Hi,

I just ran the "examples/example_tensor.py" and got an error
ValueError: Multiple target dimensions are not supported. Expected: None, int, (int, int), Provided: [[1], [1]]

I use Kera 2.2.2 and tensorflow 1.9.0.

Could you help me to check this problem?

# example code
from keras.layers import Input
from keras.models import Model
from keras.optimizers import Adam

from dense_tensor import DenseTensor, simple_tensor_factorization
from dense_tensor.example_utils import experiment
from dense_tensor.utils import l1l2


def tensor_model(input_dim=28 * 28, output_dim=10, reg=lambda: l1l2(1e-6, 1e-6)):
    """
    One layer of a DenseTensor
    """
    _x = Input(shape=(input_dim,))
    factorization = simple_tensor_factorization(tensor_regularizer=reg())
    y = DenseTensor(units=output_dim,
                    activation='softmax',
                    kernel_regularizer=reg(),
                    factorization=factorization)
    _y = y(_x)
    m = Model(_x, _y)
    m.compile(Adam(1e-3, decay=1e-4), loss='categorical_crossentropy', metrics=["accuracy"])
    return m


if __name__ == "__main__":
    path = "output/dense_tensor"
    model = tensor_model()
    experiment(path, model)

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.