Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """Takes the output from the decapitated googlenet and transforms the output
- from a NxCxWxH to (NxWxH)xCx1x1 that is used as input for the lstm layers.
- N = batch size, C = channels, W = grid width, H = grid height."""
- def generate_intermediate_layers(net):
- """Takes the output from the decapitated googlenet and transforms the output
- from a NxCxWxH to (NxWxH)xCx1x1 that is used as input for the lstm layers.
- N = batch size, C = channels, W = grid width, H = grid height."""
- net.f(Convolution("post_fc7_conv", bottoms=["inception_5b/output"],
- param_lr_mults=[1., 2.], param_decay_mults=[0., 0.],
- num_output=1024, kernel_dim=(1, 1),
- weight_filler=Filler("gaussian", 0.005),
- bias_filler=Filler("constant", 0.)))
- net.f(Power("lstm_fc7_conv", scale=0.01, bottoms=["post_fc7_conv"]))
- net.f(Transpose("lstm_input", bottoms=["lstm_fc7_conv"]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement