This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Perceptron Diagram: https://datascientest.com/en/wp-content/uploads/sites/9/2021/03/perceptron-formule.png | |
| # 1 Neuron: 1 inputs -> 1 output | |
| # Perceptron will be trained to learn XOR boolean operation. | |
| # Input will be given as Vectors of length 2 in binary, | |
| # and Output is expected as a XOR of the Input. | |
| # What started out as a perceptron was randomly given a hidden layer, just for fun. | |
| # Showcases the different combinations or strategies possible for Architecture. | |
| # PyTorch and NumPy used for the model. | |
| # Ron Nathaniel | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Perceptron Diagram: https://datascientest.com/en/wp-content/uploads/sites/9/2021/03/perceptron-formule.png | |
| # 1 Neuron: 1 inputs -> 1 output | |
| # Perceptron will be trained to scale numbers by a factor. | |
| # Input will be given as integers, and Output is expected as a scaling (in this case 2x) of the Input. | |
| # Perceptron should produce 2x the given input. | |
| # No Third Party modules have been used. | |
| # Ron Nathaniel | |
| class Perceptron: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | type handler struct { | |
| config *epsagon.Config | |
| } | |
| func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |
| epsagon.GoWrapper(h.config, epsagonHandler) (w, r) | |
| } | |
| func epsagonHandler(w http.ResponseWriter, r *http.Request) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | func post (c *gin.Context) { | |
| epsagon_config := newEpsagonConfig() | |
| epsagon.GoWrapper(epsagon_config, postEpsagon) (c) | |
| } | |
| func postEpsagon (c *gin.Context) { | |
| c.JSON(200, gin.H { | |
| "message": "pong back from Epsagon", | |
| "name": c.Param("name"), | |
| }) |