title: Neuroph - Getting the Neuron Output for Java
body: <p>Using neuroph, I was able to train and test data for image recognition. During testing, the Neuroph Studio was able to show the neuron output for each data sets for example:</p>
  
  <p>Cat: 0.78457.....
  Dog: 0.05545.....</p>
  
  <p>How would I output it Java. I don't know what parameters or functions to call in order to display the neuron output. </p>
  
  <p>This is my sample code for testing an image under java:</p>
  
  <pre><code> import org.neuroph.core.NeuralNetwork;
   import org.neuroph.contrib.imgrec.ImageRecognitionPlugin;
   import java.util.HashMap;
   import java.io.File;
   import java.io.IOException;
  
   public class ImageRecognitionSample {
  
    public static void main(String[] args) {
    // load trained neural network saved with Neuroph Studio (specify some existing neural network   file here)
   NeuralNetwork nnet = NeuralNetwork.load("MyImageRecognition.nnet"); // load trained neural network saved with Neuroph Studio
  // get the image recognition plugin from neural network
  ImageRecognitionPlugin imageRecognition = (ImageRecognitionPlugin)nnet.getPlugin(ImageRecognitionPlugin.class); // get the image recognition plugin from neural network
  
  try {
       // image recognition is done here (specify some existing image file)
      HashMap&lt;String, Double&gt; output = imageRecognition.recognizeImage(new File("someImage.jpg"));
      System.out.println(output.toString());
  } catch(IOException ioe) {
      ioe.printStackTrace();
  }
  }
  }
  </code></pre>
  
  <p>However, this is just how to input a test image. </p>