Showing posts with label Neural Network. Show all posts
Showing posts with label Neural Network. Show all posts

Friday, 2 August 2013

Neural Network with hidden Layers Example on Matlab | Matlab Neural Network with 2 hidden Layers

Neural network is one of the artificial intelligence technique,it solve problems in more areas ,like as patter recognition,clustering ,fitting and ect.

Neural network Steps as follow


1.Create the network

2.Train the network



1.Create the network


1st thing we design a network for our inputs for ex we have 2 input and 1 output.

ex:-
>>input = [2 2;4 5;6 7; 7 8; 9 10];
>>output = [1;1;2;2;2];

we create neural network with default hidden layer as follow.

>>net = newff(input,output);


if we want design with users hidden layers then we design as follow.

>>net = newff(input,output,[3 4]);

here [3 4] are two hidden layer. Each layer has each neurons.ex 1st hidden layer has 3 neurons and 2nd one 4 neurons.


2.Train Network


Its train our input data on neural network.

ex:

>>net = train(net,input,output);


Saturday, 19 May 2012

Matlab Neural Network Watermarking Code

 Watermark Embedding
  1. Divide the original image I into blocks of size 8X8 and perform three-level DWT transform on each block. Select the position of watermark embedding coefficient using random sequence with a secret key and quantize the DWT coefficient C(I,j) by Q and use that value as the input T of BPN.
  2. Create the improved neural network and initialize its parameters, we use T as the supervised signal and the average of each block is used as the desired output value of the BPN to train BPN. Training error is set to be 0.001.
  3. Perform the inverse discrete wavelet transform (IDWT) on the coefficients where the watermark is embedded to obtain the watermarked image.
Watermark Extraction

  1. Perform the three-level DWT transformation on the watermarked image blocks.
  2. Select the position of coefficient C(i, j), where watermark is embedded with the same secret key , which is used in watermark embedding sequence.
  3. Quantize the DWT coefficient by Q, and use it as input value of the trained BPN to get the output T.
  4. Extract the watermark according to (6) below using the output T and coefficient C(i ,j)
Related Posts Plugin for WordPress, Blogger...