필터 지우기
필터 지우기

Neural network training - 2 input parameter to 1 output result training

조회 수: 1 (최근 30일)
im stuck at training net with 2 parameter.
right now im trying to clasify test data. by using example "Classify Text Data Using Deep Learning".
for that example if i want to have "description" and "category" as training input and "resolution" as target output.
which part of code in the example that i have to change.
i need help

채택된 답변

Madhav Thakker
Madhav Thakker 2020년 9월 8일
편집: Madhav Thakker 2020년 9월 8일
Hi Ridza,
I understand that you want to train the LSTM network using description and category values instead of just description. As the preprocessText function, tokenization of input data is taking place. One simple way of training the network on both these values is to just prepend category data and continue with the procedure in the same way.
Note that you will have to change the target length of your training data by visualizing the histogram of the document length.
sequenceLength = %new Sequence Length;
XTrain = doc2sequence(enc,documentsTrain,'Length',sequenceLength);
Attaching code snippet for better explanation.
documentsTrain = preprocessText(dataTrain.Description + " " + dataTrain.Category);
documentsValidation = preprocessText(dataValidation.Description + " " + dataValidation.Category);
YTrain = categorical(dataTrain.Resolution);
YValidation = categorical(dataValidation.Resolution);
Refer this example for details -
Hope this helps.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by