weight balancing in pretraining networks.

2 visualizaciones (últimos 30 días)
Si-Baek Seong
Si-Baek Seong el 27 de Mzo. de 2019
Comentada: Raza Ali el 16 de Oct. de 2019
Dear Deep Learning Team,
Hello, i have a question about training process.
During i work on transfer learning (using pretrained model),
My data has not BALANCED, how to fixing or weight balancing "the gradient value" of mini-batch depends on ratio of my data?
for examples,
now, i have 3 class; A, B, and C // ratio of class is 5:5:1
i try to give weights to gradient
:: In "TrainNetwork" function > trainer.train > computeGradientsForTraning
:: in that function , i found "gradient" variable
> (end-1) cell has 2048x3 array
> (end / the last) cell has 3 value which maybe means average gradients
in that point, i want to give weight to gradient for 3rd class training,
most of "Ypred" predicted A or B, mooooooreeeeeeeee than C
What can i do in this situation?
Thanks for help

Respuestas (1)

Maria Duarte Rosa
Maria Duarte Rosa el 5 de Abr. de 2019
  1 comentario
Raza Ali
Raza Ali el 16 de Oct. de 2019
is it applicable to images as well? becasue i am trying weighted classfication layer for images but its giving error.
can you specify how to use it for image data (what shold be the class weights for 100 images with the size 256 x 256 by 3)

Iniciar sesión para comentar.

Categorías

Más información sobre Image Data Workflows 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