What happens if you set the batch_size to 1? Also take a look 
at https://github.com/dmlc/mxnet/tree/master/example/memcost

Also workspace is per convolution and you should keep it small.  

On Thursday, 7 April 2016 19:13:36 UTC+9, kleinsplash wrote:
>
> Hi,
>
> I have a memory error using Quadro K5000M which has 4GB global memory. I 
> was wondering if there is some guide as to how to set my workspace and 
> Convolutional layers.
>
> My current settings: 
>
> training_data =  128x128x1x800
> batch_size = 128x128x1x8
> workspace = 2048 (I think this can go up to 4096 because of the 
> .deviceQuery)
>
> This is my net (still to be designed so just basic ):
>
> # first conv
> conv1 = @mx.chain mx.Convolution(data=data, kernel=(5,5), num_filter=20, 
> workspace=workspace)  =>
>                   mx.Activation(act_type=:relu) =>
>                   mx.Pooling(pool_type=:max, kernel=(2,2), stride=(2,2))
> # second conv
> conv2 = @mx.chain mx.Convolution(data=conv1, kernel=(5,5), num_filter=50, 
> workspace=workspace) =>
>                   mx.Activation(act_type=:relu) =>
>                   mx.Pooling(pool_type=:max, kernel=(2,2), stride=(2,2))
>                   # first fully-connected
> fc1   = @mx.chain mx.Flatten(data=conv2) =>
>                   mx.FullyConnected(num_hidden=500) =>
>                   mx.Activation(act_type=:relu)
> # second fully-connected
> fc2   = mx.FullyConnected(data=fc1, num_hidden=10) 
> # third fully-connected
> fc3   = mx.FullyConnected(data=fc2, num_hidden=2) 
> # softmax loss
> net = mx.SoftmaxOutput(data=fc3, name=:softmax)
>
> So far if I reduce my image to 28x28 it all works - but I need to up the 
> resolution to pick out features. Anyone have any ideas on thumb sucking 
> initial values for at least getting past memory issues to the design of the 
> net? 
>
>
> Thx
>
>

Reply via email to