Comments (5)
Hi @affot, to obtain the predictions you should first obtain a reference to the prediction operation by
op = protoNNObj.getPredictionsOp() # or
op = bonsaiObj.getPredictions()
Once you have this, use your text data in the input X placeholder and evaluate this operation to obtain the predictions:
predictions = sess.run(op, feed_dict ={ X: X_test})
from edgeml.
Hello @metastableB
thanks a lot for your fast help here!! :-)
For protoNN it works. In the example I can handover for example the first 20 samples of the test set with:
predictions = sess.run(op, feed_dict ={ X: x_test[0:20]})
and it returns me an array with 20 predicted classes.
With the BonsaiObject I still have a problem. When I do the same here I get an error:
"InvalidArgumentError: You must feed a value for placeholder tensor 'sigmaI' with dtype float [[{{node sigmaI}}]]"
and
"InvalidArgumentError: You must feed a value for placeholder tensor 'sigmaI' with dtype float [[node sigmaI (defined at C:\Users\CK\anaconda3_neu\envs\BT36\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) ]]"
I allready tried predictions = sess.run(op, feed_dict ={ X: x_test[0:20], sigmaI: 1.0})
but here I get
"NameError: name 'sigmaI' is not defined" and don't find a solution.
Do you know where is the problem?
from edgeml.
You will need a reference to the sigmaI
placeholder in the computation graph. You could try,
sigmaI = bonsaiTrainer.sigmaI
predictions = sess.run(op, feed_dict ={ X: x_test[0:20], sigmaI: 1.0})
See the declaration of sigmaI
here.
Also for inference, you should set sigmaI
to some large value ( 1e10
) instead of 1.0.
from edgeml.
Thanks for your fast help here!! It works.
from edgeml.
Closing this for now, since the query is answered.
from edgeml.
Related Issues (20)
- USE_DROPOUT = True HOT 3
- FastGRNN HOT 7
- Exception: FastGRNNCUDA is supported only on GPU devices. HOT 6
- Inference Code to deploy KWS on bluecoin HOT 2
- Question about F1 score for Cifar-10 HOT 5
- DROCC Learning Rate Sheduler HOT 2
- Error while converting .onnx model to .pb format HOT 2
- Question about Bonsai training HOT 2
- KWS-demo throwing errors on running FastGRNNCUDA inference on google speech commands dataset HOT 1
- Seedot HOT 7
- SeeDot-dev.py only working for fastgrnn HOT 22
- The model of DROCC seems missing HOT 3
- How to get predictions from trained model for FastCells in Tensorflow HOT 3
- Why Bonsai and ProtoNN does not return logits but only the argmax of predictions? HOT 1
- For Image Anomaly, custom dataset HOT 6
- Select protoypes without projecting
- This repo is missing important files HOT 1
- Why is the GRNN much slower than a GRU HOT 1
- ImageNet-10 dataset RNN-Pooling HOT 1
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 edgeml.