Giter Site home page Giter Site logo

Some error in project "ocr" about 500lines HOT 3 OPEN

aosabook avatar aosabook commented on July 23, 2024 1
Some error in project "ocr"

from 500lines.

Comments (3)

kaelchan avatar kaelchan commented on July 23, 2024 1

In server.py

nn = OCRNeuralNetwork(HIDDEN_NODE_COUNT, data_matrix, data_labels, list(range(5000)));
the startup training using range(5000) for train_indices, this is not a good choice as the data is ordered (from 0 to 9). This would make the neural network output 9 for every input. Instead it should be like random.sample(range(5000), 5000) or anything like this.

from 500lines.

morenoh149 avatar morenoh149 commented on July 23, 2024

I have the following notes:

  • missing closing }; in ocr.js
  • inconsistent indentation, sometimes 2, sometimes 4
  • server.py
    • some statements end with semicolon (;). Don’t do this.
  • ocr.py
    • self.theta blocks following def _rand_initialize_weights should have less indentation ?
  • typo “ while smaller values will will generate an ANN” remove second “will”
  • Testing a Trained Network: “ def predict(self, test):
    y1 = np.dot(np.mat(self.theta1), np.mat(test).T)
    y1 = y1 + np.mat(self.input_layer_bias) # Add the bias”
    lacks syntax highlighting and has an extra space after the second assignment

I'd be happy to submit a PR @emtwo .

from 500lines.

zhenfelix avatar zhenfelix commented on July 23, 2024

In server.py

nn = OCRNeuralNetwork(HIDDEN_NODE_COUNT, data_matrix, data_labels, list(range(5000)));
the startup training using range(5000) for train_indices, this is not a good choice as the data is ordered (from 0 to 9). This would make the neural network output 9 for every input. Instead it should be like random.sample(range(5000), 5000) or anything like this.

Moreover, there is only one epoch for the training process which is not enough

from 500lines.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.