public static void gerarArquivoRedeNeural(String nome,
			MultiLayerPerceptron rna, Double[] entradas) {
		try {
			FileWriter fileWriter = new FileWriter(nome);
			BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
			double discretizacao = 0.05;

			for (int i = 0; i < 20; i++) {
				rna.inicializarPesos(entradas.length);
				rna.executar(entradas);
				for (int j = 0; j < entradas.length; j++) {
					bufferedWriter.write(entradas[j].toString().replace('.',
							',')
							+ ";");
					entradas[j] = entradas[j] + discretizacao;
				}
				for (Double saida : rna.getCamadaDeSaida().getVetorSaida()) {
					bufferedWriter.write(saida.toString().replace('.', ',')
							+ ";");
				}
				bufferedWriter.write("\n");
			}
			for (int k = 0; k < rna.getCamadasIntermediarias().size(); k++) {
				bufferedWriter.write("\nPESOS CAMADA INTERMEDIARIA " + (k + 1)
						+ "\n");
				Double[][] pesos = rna.getCamadasIntermediarias().get(k)
						.getPesos();
				for (int i = 0; i < pesos.length; i++) {
					for (int j = 0; j < pesos[i].length; j++) {
						bufferedWriter.write("W" + (i + 1) + (j + 1) + "= "
								+ pesos[i][j].toString().replace('.', ',')
								+ ";");
					}
				}
				bufferedWriter.write("\n");
			}

			bufferedWriter.write("\nPESOS CAMADA DE SAIDA\n");
			Double[][] pesos = rna.getCamadaDeSaida().getPesos();
			for (int i = 0; i < pesos.length; i++) {
				for (int j = 0; j < pesos[i].length; j++) {
					bufferedWriter.write("W" + (i + 1) + (j + 1) + "= "
							+ pesos[i][j].toString().replace('.', ',') + ";");
				}
			}
			bufferedWriter.write("\n");
			bufferedWriter.close();
			fileWriter.close();

		} catch (IOException e) {
			e.printStackTrace();
		}

	}