Jiangfeng-Xiong / SiamRPN-TF

A TensorFlow implementation of SiamRPN
18 stars 5 forks source link

train batch size #4

Open huhu5036 opened 4 years ago

huhu5036 commented 4 years ago

Hello, I find the train batchsize is 128(more than 1), but in model.py line87: z = tf.reshape(z, [filter_size, filter_size, self.embed_dim , 2 self.anchor_nums_per_location]) , how can you reshape z like this, since z is (128, filter_size, file_size, embed_dim2*anchor_nums_per_location).

Hope for your reply, thanks a lot.

Jiangfeng-Xiong commented 4 years ago

Because of tf.map_fn, it will apply function _translation_match on each item of input z , i.e., tf.map_fn will slice the input in the first dim, so in function _translation_match(x, z), z has shape [filter_size, filter_szie, C]

huhu5036 commented 4 years ago

get it, thank you!