Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vipin Thomas
Cathumbnailer
Commits
5e43421c
Commit
5e43421c
authored
Jun 29, 2021
by
Vipin Thomas
Browse files
Upload New File
parent
8f003c85
Changes
1
Hide whitespace changes
Inline
Side-by-side
comparison.ipynb
0 → 100644
View file @
5e43421c
%% Cell type:code id: tags:
```
python
from
PIL
import
Image
import
PIL
import
numpy
as
np
import
time
import
matplotlib.pyplot
as
plt
%
matplotlib
inline
import
pickle
```
%% Cell type:code id: tags:
```
python
data
=
'data.pickle'
with
open
(
data
,
'rb'
)
as
f
:
speedups
=
pickle
.
load
(
f
)
```
%% Cell type:code id: tags:
```
python
# x=[]
# y=[]
# z=[]
# for i in range(len(speedups)):
# x.append(speedups[i][0])
# y.append(speedups[i][1])
# z.append(speedups[i][2])
```
%% Cell type:code id: tags:
```
python
speedups_fpga
=
[
s
for
s
in
speedups
if
s
[
2
]
>
1
]
# speedups_cpu={s for s in speedups if s[2]<1}
speedups_cpu
=
[
s
for
s
in
speedups
if
s
[
2
]
<
1
]
```
%% Cell type:code id: tags:
```
python
x
=
[]
y
=
[]
z
=
[]
for
i
in
range
(
len
(
speedups_fpga
)):
x
.
append
(
speedups_fpga
[
i
][
0
])
y
.
append
(
speedups_fpga
[
i
][
1
])
z
.
append
(
speedups_fpga
[
i
][
2
])
```
%% Cell type:code id: tags:
```
python
xc
=
[]
yc
=
[]
zc
=
[]
for
i
in
range
(
len
(
speedups_cpu
)):
xc
.
append
(
speedups_cpu
[
i
][
0
])
yc
.
append
(
speedups_cpu
[
i
][
1
])
zc
.
append
(
speedups_cpu
[
i
][
2
])
```
%% Cell type:code id: tags:
```
python
import
matplotlib.pyplot
as
plt
from
mpl_toolkits.mplot3d
import
Axes3D
%
matplotlib
widget
```
%% Cell type:code id: tags:
```
python
fig
=
plt
.
figure
()
ax
=
Axes3D
(
fig
)
xs
,
ys
,
zs
=
x
,
y
,
z
ax
.
scatter
(
xs
,
ys
,
zs
,
marker
=
'o'
,
label
=
'fpga'
)
xs
,
ys
,
zs
=
xc
,
yc
,
zc
ax
.
scatter
(
xs
,
ys
,
zs
,
marker
=
'*'
,
label
=
'cpu'
)
plt
.
xlabel
(
'pixels in'
)
plt
.
ylabel
(
'pixels out'
)
plt
.
legend
()
plt
.
show
()
```
%%%% Output: display_data
%% Cell type:code id: tags:
```
python
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment