Skip to content

Commit

Permalink
Allow the output's channel number differs the input's channel number.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Ren committed Apr 2, 2016
1 parent 60321df commit a4de90e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/expand_delta_out_for_conv_f.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ function expand_delta_out_for_conv_f()
mem.deltas{current_layer} = bsxfun(@times, mem.deltas{current_layer}, mem.one_over_add_counts);
last_kernal = config.kernel_size(size(config.kernel_size, 1), :);
last_layer_size = config.feature_map_sizes{length(config.feature_map_sizes)};
expanded_delta = config.NEW_MEM(zeros(last_kernal(1) * last_kernal(2) * config.chs, last_layer_size(1)*last_layer_size(2), config.batch_size));
expanded_delta = config.NEW_MEM(zeros(last_kernal(1) * last_kernal(2) * config.output_size(3), last_layer_size(1)*last_layer_size(2), config.batch_size));
h_step = last_kernal(1) * last_kernal(2);
for b = 1:config.batch_size
h_start = 0;
for c = 1:config.chs
for c = 1:config.output_size(3)
expanded_delta(h_start+1:h_start+h_step, :, b) = config.IM2COL(mem.deltas{current_layer}(:, :, c, b), ...
[last_kernal(1), last_kernal(2)]);
h_start = h_start + h_step;
Expand Down

0 comments on commit a4de90e

Please sign in to comment.