Skip to content

"image_seq_length" vs "input_length" in ops/inputs.py #12

@brewer71

Description

@brewer71

In this section of code

START

image_seq_length = tf.shape(image_ids)[0]

input_length = tf.subtract(image_seq_length, 0) # change 1 to 0

cap_indicator = tf.cast(tf.not_equal(captions,tf.zeros_like(captions)),tf.int32)

indicator = tf.ones(tf.expand_dims(input_length, 0), dtype=tf.int32)

loss_indicator = tf.ones(tf.expand_dims(image_seq_length, 0), dtype=tf.int32)

END

what is the difference between "image_seq_length" and "input_length" ?

both the variable "image_seq_length" and "input_length" will have same value , is that correct ?

if both are same then why are we using two seperate varaibles and creating two seperate mask ?

what is the use of input_mask vs loss_mask ?

tf.subtract(image_seq_length, 0) # change 1 to 0

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