Skip to content

How to implement custom_loss for grid with different width, height #444

Open
@KienPM

Description

@KienPM

I'm implementing a model base on your original model with different width, height grid (28x7) according to this paper https://new.hindawi.com/journals/mpe/2018/3518959/

I got error when running the code at concat function, because according to your original, the width and height must be equal so that cell_x and cell_y can be concatenated

cell_x = tf.to_float(tf.reshape(tf.tile(tf.range(self.grid_w), [self.grid_h]), (1, self.grid_h, self.grid_w, 1, 1)))
cell_y = tf.transpose(cell_x, (0,2,1,3,4))

cell_grid = tf.tile(tf.concat([cell_x,cell_y], -1), [self.batch_size, 1, 1, self.nb_box, 1])

Can you please help me! Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions