zhongkaifu/RNNSharp

imncremental training NullReferenceException after last update

bill3code opened this issue · 2 comments

Hello!
After the last update, I get this error:

Необработанное исключение: System.AggregateException: Произошла одна или несколько ошибок. ---> System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в RNNSharp.SimpleLayer.BackwardPass() в C:\Users\vanin\Documents\GitHub\RNNSharp\RNNSharp\Layers\SimpleLayer.cs:строка 288
в RNNSharp.Networks.ForwardRNN1.ProcessSequenceCRF(Sequence pSequence, RunningMode runningMode) в C:\Users\vanin\Documents\GitHub\RNNSharp\RNNSharp\Networks\FowardRNN.cs:строка 483 в RNNSharp.RNNEncoder1.Process(RNN1 rnn, DataSet1 trainingSet, RunningMode runningMode) в C:\Users\vanin\Documents\GitHub\RNNSharp\RNNSharp\RNNEncoder.cs:строка 81
в System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.<ForWorker>b__1() в System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) в System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object ) --- Конец трассировки внутреннего стека исключений --- в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) в System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally)
в System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action1 body) в RNNSharp.RNNEncoder1.Train() в C:\Users\vanin\Documents\GitHub\RNNSharp\RNNSharp\RNNEncoder.cs:строка 227
в RNNSharpConsole.Program.Train() в C:\Users\vanin\Documents\GitHub\RNNSharp\RNNSharpConsole\Program.cs:строка 550
в RNNSharpConsole.Program.Main(String[] args) в C:\Users\vanin\Documents\GitHub\RNNSharp\RNNSharpConsole\Program.cs:строка 310`

before update it is working without problems.

My config is :

`CURRENT_DIRECTORY = .\model2cfg

MODEL_TYPE = SEQLABEL

#Forward and BiDirectional are supported
NETWORK_TYPE = Forward

MODEL_FILEPATH = model.bin

HIDDEN_LAYER = LSTM:200, LSTM:100

OUTPUT_LAYER = Simple

CRF_LAYER = True

TFEATURE_FILENAME = tfeatures

#Binary and Freq are supported
TFEATURE_WEIGHT_TYPE = Freq

TFEATURE_CONTEXT = -7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5

PRETRAIN_TYPE = Embedding

WORDEMBEDDING_FILENAME = vector_big.bin

WORDEMBEDDING_CONTEXT = -1,0,1

WORDEMBEDDING_COLUMN = 0

AUTOENCODER_CONFIG = D:\RNNSharpDemoPackage\config_autoencoder.txt

#SEQ2SEQ_AUTOENCODER_CONFIG: D:\RNNSharpDemoPackage\config_seq2seq_autoencoder.txt

RTFEATURE_CONTEXT = -2,-1`

This happens after 47 iterations...

Hi @bill3code ,

Thanks for letting me know this issue. I have already fixed it. Please sync the latest code.

In addition, the content of configuration file has been updated, please refresh your configuration file according examples in home page.