Commit cfa3f582 authored by Vipin Thomas's avatar Vipin Thomas
Browse files

Upload New File

parent 198d8dc3
%% 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
%% Cell type:code id: tags:
``` python
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment