machine learning - How to use opencv ann to evaluate a function output -


can compute function f(x) = sqr(x) using opencv ann ? need train ann using set of integers , square values.

i need squared value of integer output ann model.

if can using opencv ann, number input neurons, output neurons , how specify classes etc.. ??

you mention class specification, don't think class categorization problem. think better treat input x, , output sqr(x). becomes general function approximation problem.

there issue particular problem however. neural networks aren't suited functions unbounded input/output. output of neural network limited range of activation function, , input value scaled reasonable range. assuming using default activation (symmetrical sigmoid), output limited (-1, 1). if have limited range of integers want use, can still this, you'll have scale inputs , outputs accordingly.

if use method, there 1 input node, , 1 output node, corresponding scaled versions of x , sqr(x) respectively. opencv try take care of scaling automatically. it's best trust this, unless planning on providing multiple different sets of training data. different sets may have different distributions, hence different scale.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -