Giter Site home page Giter Site logo

Comments (3)

samjabrahams avatar samjabrahams commented on September 13, 2024

I'll try to give a more comprehensive answer by the end of the weekend, but yes, you should be able to evaluate your graph in batches. Basically, instead of passing in the entire set of 10000 images, you should take subsets of it at a time and keep a running tally of the statistics you are interested in. For accuracy, you would want a running total of the "correct" guesses, and then you can take a floating point division of num_correct / total_test_samples.

In real use, it's probably best to do the model training and evaluation on a more powerful rig than the RPi. It's a fun exercise to figure out how to run these examples on the RPi, but it's hardware is better suited for taking in pre-trained models. I'm sure it could learn smaller traditional models, though!

from tensorflow-on-raspberry-pi.

SuperJonotron avatar SuperJonotron commented on September 13, 2024

I look forward to the more detailed answer. I would love to see how one would go about breaking up the mnist test data into batches and/or a more general approach for a data set and load that into the evalutation.

I agree with the sentiment of training and evaluating on a more powerful system but at the moment my pi is the only thing I have that can run tensorflow so i'm trying to see what I can and can't get away with. I also like the idea of doing large scale training evaluating on a "base" model elsewhere and then possibly collecting more data on the pi and teaching/evaluating it in runtime and then rejecting or keeping the new model based on the results. Just gotta find it's limitations first.

from tensorflow-on-raspberry-pi.

samjabrahams avatar samjabrahams commented on September 13, 2024

Hey @SuperJonotron - sorry for the extra late reply; this month has been nutty.

Here's a simple example from a workshop I gave last week- check out the section titled "Validate" toward the bottom of the notebook:

https://github.com/samjabrahams/tensorflow-workshop/blob/master/AlexNet%20Transfer%20Learning.ipynb

Basically, it takes batches of the validation data and increments a counter for how many it got correct in that batch. At the end, you do a floating point division of the num_correct / total

from tensorflow-on-raspberry-pi.

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.