Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. getElementoVectorCapas(i).getElementoVectorNeuronas(j).getActivacion()<<endl;
  2.  
  3. getElementoVectorCapas(1).getElementoVectorNeuronas(0).setActivacion(1);
  4.  
  5. class CNeurona{
  6. private:
  7. int activacion;
  8. public:
  9. void setActivacion(int x){
  10. activacion = x;
  11. }
  12. int getActivacion(){
  13. return activacion;
  14. }
  15. };
  16. class CCapa{
  17. private:
  18. std::vector<CNeurona> vectorNeuronas;
  19. public:
  20. CCapa(int i_numNeuronas, int i_numeroInputsPorNeurona){
  21. setNumNeuronas(i_numNeuronas);
  22. for(c=0;c<i_numNeuronas;c++){
  23. vectorNeuronas.push_back(CNeurona(i_numeroInputsPorNeurona));
  24. }
  25. }
  26. CNeurona getElementoVectorNeuronas(int x){
  27. return vectorNeuronas[x];
  28. }
  29. };
  30. class CRed{
  31. private:
  32. std::vector<CCapa> vectorCapas;
  33. public:
  34. void setVectorEntrada(){
  35.  
  36. for(j=0;j<numNeuronasEntrada;j++){
  37. cout<<"Introduce activaciones de capa de entrada, N"<<j<<": "<<endl;
  38. cin >> i;
  39. getElementoVectorCapas(0).getElementoVectorNeuronas(j).setActivacion(i);
  40. }
  41.  
  42. CNeurona getElementoVectorNeuronas(int x)
  43.  
  44. getElementoVectorNeuronas(j).setActivacion(i);
  45.  
  46. CNeurona& getElementoVectorNeuronas(int x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement