Skip to content

Instantly share code, notes, and snippets.

@oak-tree
Created September 6, 2015 13:49
Show Gist options
  • Select an option

  • Save oak-tree/1cbbab022a0ffcd70781 to your computer and use it in GitHub Desktop.

Select an option

Save oak-tree/1cbbab022a0ffcd70781 to your computer and use it in GitHub Desktop.
part8_net
net_arch = {...
struct('type','input','inInd',0,'outInd',1,'blobSize',[H,W,B,batch_size],'fName',train_images_file,'scale',1/256,'dataType','uint8'), ...
struct('type','input','inInd',0,'outInd',2,'blobSize',[k,batch_size],'fName',train_labels_file,'scale',1,'dataType','uint8'), ...
...
struct('type','conv','inInd',1,'outInd',3,'kernelsize',conv_kernel,'stride',conv_stride,'nOutChannels',conv_channels1,'bias_filler',0),...
struct('type','relu','inInd',3,'outInd',3), ...
struct('type','maxpool','inInd',3,'outInd',4,'kernelsize',pool_kernel,'stride',pool_stride), ...
...
struct('type','conv','inInd',4,'outInd',5,'kernelsize',conv_kernel,'stride',conv_stride,'nOutChannels',conv_channels2,'bias_filler',0),...
struct('type','relu','inInd',5,'outInd',5), ...
struct('type','maxpool','inInd',5,'outInd',6,'kernelsize',pool_kernel,'stride',pool_stride), ...
...
struct('type','flatten','inInd',6,'outInd',6), ...
struct('type','affine','inInd',6,'outInd',7,'nOutChannels',k1,'bias_filler',0), ...
struct('type','relu','inInd',7,'outInd',7), ...
...
struct('type','affine','inInd',7,'outInd',8,'nOutChannels',k2,'bias_filler',0), ...
...
struct('type','loss','inInd',[8 2],'outInd',10,'lossType','MCLogLoss')};
net = ConvNet(net_arch,GPU, affine_weights); % Xavier initialization of conv and affine layers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment