Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Madhav Thakker
Madhav Thakker el 8 de Sept. de 2020
Editada: Madhav Thakker el 8 de Sept. de 2020
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.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by