[mlpack-git] [mlpack/mlpack] Inception layer (#757)

Marcus Edel notifications at github.com
Mon Aug 8 20:27:12 EDT 2016


> +    // Forward pass for 3x3 pool path. 
> +    pool3.InputParameter() = input;
> +    pool3.Forward(input, pool3.OutputParameter());
> +    Pad(pool3.OutputParameter(), 1, 1, convPool.InputParameter());
> +    convPool.Forward(pool3.OutputParameter(), convPool.OutputParameter());
> +    biasPool.Forward(convPool.OutputParameter(), biasPool.OutputParameter());
> +    basePool.InputParameter() = biasPool.OutputParameter();
> +    basePool.Forward(convPool.OutputParameter(), basePool.OutputParameter());
> +
> +    // concatenate outputs of all the paths.
> +    output = arma::join_slices( 
> +              arma::join_slices(
> +                arma::join_slices( 
> +                  base1.OutputParameter(), base3.OutputParameter() ), 
> +                  base5.OutputParameter() ), basePool.OutputParameter());
> +

Since the network class initializes the weights, you have to define the size e.g. using:

```
weights.set_size(rows, cols);
```

Since the inception layer combines different layer, we have to calculate the overall weight dimension accordingly. You can get the weight dimension of each layer by calling the weight function:

```
conv1.Weights().n_rows
conv1.Weights().n_cols
```



---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/757/files/06d923321f246f2c6ead9ad56e99309fe24a6f5c#r73980642
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160808/bd33d2ee/attachment.html>


More information about the mlpack-git mailing list