zhongkaifu / RNNSharp

RNNSharp is a toolkit of deep recurrent neural network which is widely used for many different kinds of tasks, such as sequence labeling, sequence-to-sequence and so on. It's written by C# language and based on .NET framework 4.6 or above versions. RNNSharp supports many different types of networks, such as forward and bi-directional network, sequence-to-sequence network, and different types of layers, such as LSTM, Softmax, sampled Softmax and others.
BSD 3-Clause "New" or "Revised" License
285 stars 92 forks source link

NullReferenceException in DropoutLayer #40

Open gen35 opened 6 years ago

gen35 commented 6 years ago

Decoding crashes when using dropout layer in current code version. Although works in latest demo package release version.

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at RNNSharp.DropoutLayer.Load(BinaryReader br, LayerType layerType, Boolean forTraining) in D:\RNNSharp-master\RNNSharp\Layers\DropoutLayer.cs:line 174 at RNNSharp.Networks.RNN1.Load(LayerType layerType, BinaryReader br, Boolean forTraining) in D:\RNNSharp-master\RNNSharp\Networks\RNN.cs:line 509 at RNNSharp.Networks.BiRNN1.LoadModel(String filename, Boolean bTrain) in D:\RNNSharp-master\RNNSharp\Networks\BiRNN.cs:line 598 at RNNSharp.RNNDecoder..ctor(Config config) in D:\RNNSharp-master\RNNSharp\RNNDecoder.cs:line 24 at RNNSharpConsole.Program.Test() in D:\RNNSharp-master\RNNSharpConsole\Program.cs:line 371 at RNNSharpConsole.Program.Main(String[] args) in D:\RNNSharp-master\RNNSharpConsole\Program.cs:line 305