Foncion

      function response (input : in input_type) return output_type is
                procedure Get_Input(Pattern : in     Positive;
				   Input   :    out Node_Set;
				   Desired :    out Node_Set) is
	       begin
		  for I in Input'Range loop
		     Input(I) := response.Input(I);
		  end loop;
		  for I in Desired'Range loop
		     Desired(I) := 0.0;
		  end loop;
		  
	       end Get_Input;
       	       package NN is new REM_NN
		 (
		  Num_Input_Nodes => Num_Inputs,
		  Num_Hidden_Nodes => Num_hiddens,
		  Num_Output_Nodes => Num_outputs,
		  Num_Patterns => 1,
		  New_Random_Weights => False,
		  Input_To_Output_Connections => False,
		  Weight_File_Name => Filename,
		  Get_Input => Get_input
		 );

	outset : NN.output_set := (others => 0.0);
	output : output_type;
      begin

	       
	       NN.Respond (1, Outset);   
	       
	       for I in Outset'Range loop	    
		  
		  if outset(I) >= 0.5 then
		     Output(I) := 1.0;
		  else
		     Output(I) := 0.0;
		  end if;
		  
	       end loop;
	       return output;
      end response;