if not os.path.exists(out_dir):
    os.makedirs(out_dir)
    shutil.copyfile(sys.argv[0], out_dir + '/training_script.py')

sys.stdout = mutil.Logger(out_dir)
gpu = 3
torch.cuda.set_device(gpu)
mb_size = 600  # mini-batch_size
mode_num = 3

distance = 10
R = np.array([1, 2, 3]) * 2
theta = np.array([[-15, 15], [75, 105], [165, 195]])
# theta[:, 0] = theta[:, 0] - 15
# theta[:, 1] = theta[:, 1] + 15
data = data_prepare.Data_2D_Curve(mb_size, theta, R)
grid_num = 100
data_mesh = data_prepare.Data_2D_Curve(grid_num * grid_num, theta, R)

Z_dim = 2
X_dim = 2
h_dim = 128
c_dim = mode_num
cnt = 0

num = '0'

# else:
#     print("you have already creat one.")
#     exit(1)
if not os.path.exists(out_dir):
    os.makedirs(out_dir)
    shutil.copyfile(sys.argv[0], out_dir + '/training_script.py')

sys.stdout = mutil.Logger(out_dir)
gpu = 0
torch.cuda.set_device(gpu)
mb_size = 600  # mini-batch_size
mode_num = 3

distance = 10
R = np.array([1, 2, 3])*2
theta = np.array([[-15, 15], [75, 105], [165, 195]])
# theta[:, 0] = theta[:, 0] - 15
# theta[:, 1] = theta[:, 1] + 15
data = data_prepare.Data_2D_Curve(mb_size, theta, R)

Z_dim = 2
X_dim = 2
h_dim = 128
c_dim = mode_num
cnt = 0

num = '0'

# else:
#     print("you have already creat one.")
#     exit(1)

G = model.G_Net(Z_dim+c_dim, X_dim, h_dim).cuda()
D = model.D_Net(X_dim, 1, h_dim).cuda()