EscVM/RAMS

#issue help wanted 8 reference for mask matrix of 1s

Open

#11 aberto em 2 de ago. de 2021

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)Jupyter Notebook (22 forks)github user discovery
help wanted

Métricas do repositório

Stars
 (91 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

@fsalv @EscVM With reference to https://github.com/EscVM/RAMS/issues/8#issuecomment-867725589 Matrix of how many ones should I set cropped_y_mask as ?

cropped_y_mask = tf.cast([1,1,1,1,1], tf.float32)

    cropped_predictions_masked = tf.cast(
        cropped_predictions, tf.float32)*cropped_y_mask
    cropped_labels_masked = cropped_labels*cropped_y_mask

    total_pixels_masked = tf.reduce_sum(cropped_y_mask, axis=[1, 2])

I am getting error InvalidArgumentError: Invalid reduction dimension (1 for input with 1 dimension(s) [Op:Sum] D:\SuperResolution\RAMS\utils\loss.py in l1_loss(y_true, y_pred, HR_SIZE) 50 cropped_labels_masked = cropped_labels*cropped_y_mask 51 ---> 52 total_pixels_masked = tf.reduce_sum(cropped_y_mask, axis=[1, 2]) 53 54 # bias brightness

I tried all combos cropped_y_mask =[1,1,1,1,1] cropped_y_mask =[1] cropped_y_mask =[1,1]

FullError.txt Any help appreciated

Guia do colaborador