Skip to content

Commit

Permalink
test loss function
Browse files Browse the repository at this point in the history
  • Loading branch information
Arno1235 committed Mar 22, 2023
1 parent c9d9234 commit a27c0b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions unet_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,10 @@ def get_loss(self, logits, labels):

if self.weight_type == 'feedback':

# flat_labels = tf.Variable(flat_labels)
flat_labels = flat_labels.numpy()
for i in range(len(flat_labels)):
# print(flat_labels[i])
flat_labels[i] = tf.Variable(flat_labels[i]).numpy()
flat_labels[i].numpy()[0] = 0
flat_labels[i][0] = 0

weight_map = feedback_weight_map(flat_probs, flat_labels, 3, 100)
print(f'wm {np.shape(weight_map)}')
Expand Down

0 comments on commit a27c0b5

Please sign in to comment.