Skip to content

Commit

Permalink
sync local changes
Browse files Browse the repository at this point in the history
  • Loading branch information
katiezzzzz committed Sep 14, 2021
1 parent 3269cfe commit a08b5a6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 30 deletions.
26 changes: 1 addition & 25 deletions cgan_earth/code_files/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,4 @@ def circular_transit(label1_channel, label2_channel, cur_label, z_step_size, l_s
new_label[:, label2_channel, :, :] = torch.sub(torch.ones_like(cur_label[:, label1_channel, :, :]), new_label[:, label1_channel, :, :])
return new_label, l_step, z_step, l_done_step, z_done_step

new_label = cur_label
l_step = 0
z_step = 0
l_done_step = 0
z_done_step = 0
for i in range(15):
new_label, l_step, z_step, l_done_step, z_done_step = circular_transit(0, 1, new_label, 0.3, 0.5, 4, 2, l_step, z_step,
l_done_step, z_done_step)


a = torch.randn((1, 3, 6, 13))
print(a)
#a[:, :, torch.randint(a.shape[-2], (int(a.shape[-2]/2),))][torch.randint(a.shape[-1], (int(a.shape[-1]/2),))] = 0
b = torch.zeros_like(a)
for idx0 in range(a.shape[0]):
for idx1 in range(a.shape[1]):
old = a[idx0][idx1].clone().flatten()
old[torch.randint(len(old), (int(len(old)/2),))] = 0
b[idx0][idx1] = old.reshape(a.shape[-2], a.shape[-1])
boolean = torch.eq(a, b)
print(b)
print(b[boolean])
print(b[~boolean])
b[boolean] = 0
print(b)
print(True+False)
16 changes: 11 additions & 5 deletions cgan_earth/earth_screenshots/inspect_dataset.ipynb

Large diffs are not rendered by default.

Binary file added cgan_earth/earth_screenshots/snow6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a08b5a6

Please sign in to comment.