Jump to content

argmax as neural network output

Featured Replies

Hello all,

i have some kind of task where i want to use a Netowrk with one hidden layer.

the simpliest version of task is to find argmax of each summed row in matrix.

(ofcourse in practice this task is a bit different - outuput is not argmax but some experemental answer that should be very similiar to it )

 

for example input

[ 1 3 4

5 1 1

2 2 2 ]

wir make sum on each row

1+ 3 +4 = 8 and etc.

5 + 1 +1 = 7

2 +2+2 = 6

and as output wir should receive

[2 1 0 ] - this means that row 1 - is maximum

 

all inputs are normalized t 0 - 1

 

 

Neural network works not very fine already on 3x3 matrix - it has max precision ~70% on Train ~1000 inputs .

But i need in live 30 x 6 matrix or something simmilar . on this matrix Neural network dont find any solution and diverge from minimum on each epoch . I have tryed to use 10.000 data for training but NN diverge even faster.

 

Network has structur : 1 hidden layer with 2*input layers

 

Have somebody ideas what should i change to build this NN with satisfiable probabilty ? Or I have even another question is it in princip possible to find argmax with NN

Edited by martende

If I understand you correctly, the procedure is to the find which row in the matrix has the largest sum, and the problem is that however you're implementing it now is too slow for large matrices?

 

Generally with programming questions, its best to write out the minimum necessary code (and language) along with the example otherwise it is difficult to understand what the problem is. There's also a kind of art to asking a good statistics question.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.