Comments (10)
Interesting- I think there was a similar problem reported in #30, but it was closed before it was investigated further.
@zxzhijia - did you manage to fix the accuracy issues, or did you just not bother with the model anymore?
from tensorflow-on-raspberry-pi.
No, I've been going at it on my spare time, but to no progress :(
from tensorflow-on-raspberry-pi.
I experienced this issue w/ the released RPI wheel, but when I compiled from source, this issue went away, ie, I got identical results.
from tensorflow-on-raspberry-pi.
I have a similar issue. When I run a tensorflow model on my Pi model 3, I only get NANs in the output vector while the same model works fine on other (non ARM) platforms.
I installed tensorflow version 0.12 using the wheel for python 2.7. I'll try to compile it from source and see if that alleviates the issue
from tensorflow-on-raspberry-pi.
Are you using a pretrained model? If so, I can try to test it out to see if I can replicate your issue.
from tensorflow-on-raspberry-pi.
I tried to compile it from source but bazel killed the pi after 3 hours (my pi restarted not sure what happened). This is my exported graph which I'm using: https://1drv.ms/u/s!AjBMlWMdSnfSg7xkXuRAhgMgRNzXRQ
Its pretrained and includes the weights, exported using freeze_graph.py
from tensorflow-on-raspberry-pi.
@dominikandreas I was able to replicate the NaN issue on my RPi. Still working through the issue, but I have a few questions in the meantime:
- It looks like some of the saved freezed Variable values are being saved as
NaN
. For example, running this code returns a bunch ofNaN
values in the very first constant Tensor used in the graph (run from my desktop rig, not Raspberry Pi):
import tensorflow as tf
# Load GraphDef
gd = tf.GraphDef()
with open('gaph.pb', 'rb') as f:
gd.ParseFromString(f.read())
# Import GraphDef to Graph
graph = tf.Graph()
with graph.as_default():
tf.import_graph_def(gd, name='')
# Run Constant Op
sess = tf.Session(graph=graph)
const = graph.get_tensor_by_name('network/conv1_7x7/weights/read/_33__cf__33:0')
print(sess.run([const]))
Could you try running that snippet and seeing if you get NaN
values?
- Interestingly enough, my desktop is till able to get real-valued outputs from the graph despite seeing a bunch of
NaN
s; not sure what to make of it.
Will try to get another look at it soon.
from tensorflow-on-raspberry-pi.
@samjabrahams good idea checking the weights, not sure why I didn't think of that. I think my model must be overfitting using very large weights. I could imagine that, with those large weights, small differences in computation lead to completely different outcomes.
Interesting to note: I used tfdeploy to export my model to python+numpy and also get NANs in the output of the resulting model. I will retrain my model using weight regularization and see if that still results in a notable difference.
from tensorflow-on-raspberry-pi.
@dominikandreas any news on that?
from tensorflow-on-raspberry-pi.
from tensorflow-on-raspberry-pi.
Related Issues (20)
- Tensorflow error
- r
- Using ARM Compute library and NN
- JNI Tensorflow compilation files
- error loading graph from retrained model HOT 1
- error in raspberry pi 3
- sed: no input files
- Latest Tensorflow for raspberry pi HOT 8
- Raspberry PI import tensorflow error HOT 4
- Bazel requires newer version for tensorflow
- softmax() got an unexpected keyword argument 'axis'
- Need a release for version 1.4 or later HOT 1
- Bazel v0.13.0 failed in RPi3B+
- Failing to build tensorflow C++ API on raspberry pi model 3 b+ HOT 1
- Memory Error trying to install TensorFlow on Raspberry PI WH HOT 2
- Is there something for raspberry pi 4B? HOT 1
- I want to run a program in which when button is pressed the led blinks 10 times with a delay and if the button is kept pressed the led while stay on until i dont rlease the button.
- Hm
- building bazel results in an error "cannot determine JDK version"
- 310
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow-on-raspberry-pi.