Commit 467d056d authored by Artem Oppermann's avatar Artem Oppermann

Update data_gen.py

parent 43f8e6a1
......@@ -36,17 +36,15 @@ class Rectangle:
def get_matrix(self):
return self.matrix
def gen_data():
def gen_data(n_samples):
rectangles={0:Rectangle(0,0,2,2),
1:Rectangle(3,3,2,2),
2:Rectangle(5,5,2,2),
3:Rectangle(7,7,2,2),}
rect_data=[]
labels=[]
data=[]
for i in range(0,1000):
for i in range(0,n_samples):
label=i%4
rect=np.array(rectangles[label].add_noise())
rect_reshaped=np.reshape(rect,[1,100])
......
Markdown is supported
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