Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QQ #2

Open
Phoebe-star opened this issue Sep 5, 2017 · 2 comments
Open

QQ #2

Phoebe-star opened this issue Sep 5, 2017 · 2 comments

Comments

@Phoebe-star
Copy link

1.how to do add when it is after the convolution??

  1. if my input image is different size , can it use?
@northeastsquare
Copy link

like following , in example:https://github.com/kevinzakka/spatial-transformer-network/blob/master/Sanity%20Check.ipynb, x can be feature map or input image
x = tf.placeholder(tf.float32, [None, H, W, C])

with tf.variable_scope('spatial_transformer'):
theta = theta.astype('float32')
theta = theta.flatten()

# define loc net weight and bias
loc_in = H*W*C
loc_out = 6
W_loc = tf.Variable(tf.zeros([loc_in, loc_out]), name='W_loc')
b_loc = tf.Variable(initial_value=theta, name='b_loc')

# tie everything together
fc_loc = tf.matmul(tf.zeros([B, loc_in]), W_loc) + b_loc
h_trans = transformer(x, fc_loc)

@northeastsquare
Copy link

question2, you can pad them to same size, or resize them. Or you can use batchsize 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants