mortendahl / privateml Goto Github PK
View Code? Open in Web Editor NEWVarious material around private machine learning, some associated with blog
Home Page: https://mortendahl.github.io
Various material around private machine learning, some associated with blog
Home Page: https://mortendahl.github.io
I am running the Feature Extraction.ipynb code. I am getting this error in extractor defining code.
Code:
extractor = keras.models.Model(
inputs=model.input,
outputs=flatten_layer.output
)
AssertionError Traceback (most recent call last)
in ()
1 flatten_layer = model.get_layer(index=7)
----> 2 assert flatten_layer.name.startswith('flatten_')
3
4 extractor = keras.models.Model(
5 inputs=model.input,
AssertionError:
There is no clear indication of what error i am facing. Can anybody help.
Hi,
I tried to run the image analysis on 64-bit Windows. When the process goes to decode(), the overflow error arises. I changed
map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q)
to
map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q, otypes=[np.float64])
The error goes away, but two warnings arise:
tensor.py:102: RuntimeWarning: overflow encountered in exp
tensor.py:81: RuntimeWarning: invalid value encountered in true_divide
I tried to ignore the warnings, but the prediction results are not good (50% - 60% I guess).
Any idea how to deal with?
Thanks!
Hello. I am running the spdz/Basic SPDZ.ipynb code. When I modified the test data, I was getting this error.
The following code is the test case that you gave. I changed the w to 6497992661811505122. In fact, this will trigger mod operation and causing the result of PublicElement is not equal to v+w.
Correspondingly, some operate has similar problems with triggering mod Q operation.
# test case
v = 5
w =6497992661811505122
for x_type in [PublicElement, PrivateElement]:
for y_type in [PublicElement, PrivateElement]:
x = x_type(v)
y = y_type(w)
print('unwrap:%d---------(v + w):%d' % (z.unwrap(), v + w))
z = x + y; assert z.unwrap() == v + w
z = x - y; assert z.unwrap() == v - w
z = x * y; assert z.unwrap() == v * w
z = x.square(); assert z.unwrap() == v * v
# log
unwrap:4---------(v + w):6497992661811505127
File "privateml/spdz/aa.py", line 196, in <module>
assert z.unwrap() == v + w
AssertionError
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.