Giter VIP home page Giter VIP logo

lightnet's People

Contributors

umd-cognitive-robot avatar yechengxi 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  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  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

lightnet's Issues

train_lstm.m bug in Matlab 2015a

Hi,

I run into trouble of running Main_Char_LSTM.m.
I've fixed the issue with these changes:
train_lstm.m line 94-97

[ net{1},res.Gate,opts ] = opts.parameters.learning_method( net{1},res.Gate,opts); [ net{2},res.Input,opts ] = opts.parameters.learning_method (net{2},res.Input,opts ); [ net{3},res.Cell,opts ] = opts.parameters.learning_method( net{3},res.Cell,opts ); [ net{4},res.Fit,opts ] = opts.parameters.learning_method( net{4},res.Fit,opts );
changed to:
[ net{1},res.Gate,opts ] = feval(opts.parameters.learning_method,net{1},res.Gate,opts); [ net{2},res.Input,opts ] = feval(opts.parameters.learning_method,net{2},res.Input,opts ); [ net{3},res.Cell,opts ] = feval(opts.parameters.learning_method, net{3},res.Cell,opts ); [ net{4},res.Fit,opts ] = feval(opts.parameters.learning_method,net{4},res.Fit,opts );

QRNN

I want to use the QRNN based on your code to solve the squence to squence problem. how can i write the code based on lightnet?
Thankyou!

Dimension mismatch for matrix operations in provided examples with MATLAB R2015b

Hello,
I tried running your examples (unaltered) within MATLAB R2015b x64. Unfortunately, I get errors like the following for all types of the example networks:

clear all;
cd('./RNN');
disp('Testing training an LSTM.')
Main_Char_RNN();
cd ..
Testing training an LSTM.
Error using  + 
Matrix dimensions must agree.

Error in linear_layer (line 56)
        y=y+bias;

Error in net_ff (line 56)
                [res(layer+1).x,~,~,opts] = linear_layer(
                res(layer).x,net.layers{layer}.weights{1},net.layers{layer}.weights{2},[], opts );

Error in lstm_ff (line 45)
        [ net{1},res.Gates{f},opts ] = net_ff( net{1},res.Gates{f},opts );

Error in train_rnn (line 29)
            [ net,res,opts ] = lstm_ff( net,opts );

Error in Main_Char_RNN (line 146)
    [net,opts]=train_rnn(net,opts);

I know that you specified the MATLAB-Version to be R2016b or higher. Unfortunately, I do not have that version available yet.
So I tried R2015b. As far as I was able to trace back the code, I could not see that the dimensions would be different in MATLAB R2016b. Can the newer MATLAB version simply handle the mismatching dimensions? I would have guessed no. Are the Example data maybe faulty?

Every help is appreciated!

Split into custom layers

Is it possible to create split custom layer-wise layers? If so, would you provide an example?
Here's my intended implementation:
screen shot 2018-05-23 at 12 33 40

Some CNN example files are missing

PrepareData_MNIST_CNN and net_init_cnn_mnist are missing and there maybe more. Please check the commented parts in the Main_Template file. %% Also can you please update your comments (especially for the RL example.)

Great job tho!

RNN example can't work

When I run Main_char_RNN.m, some error happend.
错误使用 +
矩阵维度必须一致。

出错 linear_layer (line 56)
y=y+bias;

出错 net_ff (line 56)
[res(layer+1).x,,,opts] = linear_layer(
res(layer).x,net.layers{layer}.weights{1},net.layers{layer}.weights{2},[],
opts );

出错 rnn_ff (line 46)
[ net{1},res.Input{f},opts ] = net_ff( net{1},res.Input{f},opts
);

出错 train_rnn (line 36)
[ net,res,opts ] = rnn_ff( net,opts );

出错 Main_Char_RNN (line 146)
[net,opts]=train_rnn(net,opts);

the shape of y is [90,97],the bias's shape is [90,1]

Error with RNNs when "use_nntoolbox" = 1 & "use_gpu" = 0, request for RNN documentation

Hello,
I have been trying to see if I can get more use out of LightNet than I have so far gotten out of the NNToolbox. I am using MatLab R2016b, with Neural Network toolbox installed. My PC is a 16-core Xeon system, w/ GTX 1070 GPU.

One issue I have run into is that when I try to run the provided example script "Main_Char_RNN" with opts.use_nntoolbox=1 and use_gpu=0, an error occurs. I have traced the source of the error to the function "linear_layer.m", line 26:

y=fc_nntb.forward(I);

What appears to be happening is that the 'forward' method of the 2dconvolutional layer class returns a 4-D gpuArray, and the remainder of the function is not expecting a gpuArray because use_gpu is set to 0.

I have found that changing this to y=gather(fc_nntb.forward(I)); fixes the problem, but it does not solve the problem of what to do if you don't want to use GPU at all. I have found that it is substantially faster simply to set 'use_nntoolbox' to 0.

Also, is there any more documentation available for the LSTM / GRU modules? I want to apply them to neural spike train data (as binary time series). I am having some difficulty understanding the data prep and network initialization functions.

Thanks for any help you can provide!

A problem for your developed LightNet

Hi,
I am trying use your LightNet to implement RNN/CNN in Matlab2015a, but failed. It seems that there is no successful demo.
Could you please tell me why?
The error information of performing Main_Char_RNN:

%%%%%%%%%%%%%%%%%%%%%%%%
Error using +
Matrix dimensions must agree.
Error in linear_layer (line 56)
y=y+bias;
Error in net_ff (line 40)
[res(layer+1).x,,,opts] = linear_layer(
res(layer).x,net.layers{1,layer}.weights{1},net.layers{1,layer}.weights{2},[], opts);

Error in lstm_ff (line 45)
[ net{1},res.Gates{f},opts ] = net_ff( net{1},res.Gates{f},opts );

Error in train_rnn (line 29)
[ net,res,opts ] = lstm_ff( net,opts );

Error in Main_Char_RNN (line 146)
[net,opts]=train_rnn(net,opts);

%%%%%%%%%%%%%%%%%%%%%%%
The error information of performing Main_CNN_ImageNet_minimal
Error using +
Matrix dimensions must agree.
Error in conv_layer_2d (line 103)
y=y+bias_p;

Error in net_ff (line 37)
[res(layer+1).x,,,opts] = conv_layer_2d(
res(layer).x,net.layers{1,layer}.weights{1},net.layers{1,layer}.weights{2},net.layers{1,layer}.stride,net.layers{1,layer}.pad,[],opts
);

Error in Main_CNN_ImageNet_minimal (line 33)
[ net,res,opts ] = net_ff( net,res,opts );
%%%%%%%%%%%%%%%

zeros(4,MaxUpdateDelay,'like',state);

Main_Cart_Pole_Q_Network
Error using zeros
Leading inputs must be numeric.

Error in Main_Cart_Pole_Q_Network (line 63)
InputBatch=zeros(4,MaxUpdateDelay,'like',state);

what is problem?

Matlab has error
zeros(4,MaxUpdateDelay,'like',state);
Error using zeros
Leading inputs must be numeric.

or
I run runall

RunAll
Testing training a multilayer perceptron.

use_gpu =

 0

opts =

use_nntoolbox: 1

Undefined variable "nnet" or class "nnet.internal.cnn.layer.Convolution2D".

Error in linear_layer (line 14)
opts.layer{opts.current_layer}.fc_nntb=nnet.internal.cnn.layer.Convolution2D('conv2d_nntb',
[1,1], in ,out, [1,1], [0,0]);

Error in net_ff (line 54)
[res(layer+1).x,,,opts] = linear_layer(
res(layer).x,net.layers{1,layer}.weights{1},net.layers{1,layer}.weights{2},[], opts);

Error in select_learning_rate (line 38)
[ net,res,opts ] = net_ff( net,res,opts );

Error in selective_sgd (line 13)
[lr_best]=select_learning_rate(net,opts);

Error in train_net (line 20)
[ net,opts ] = selective_sgd( net,opts );

Error in TrainingScript (line 51)
[net,opts]=train_net(net,opts);

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.