Commit 9415e3e8 authored by Elif Ceylan's avatar Elif Ceylan
Browse files

GROUPWORK_create to generate data points

parent 6be824cf
# External
import torch
import math
def generate_disc_set(nb):
input = torch.empty(nb, 2).uniform_(0, 1)
target = input.add(-0.5).pow(2).sum(1).sub(1/(2*math.pi)).sign().add(-3).div(2).long()
return input, ~target
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