ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

CLTensor to CLTensor copy

Open Subarukun opened this issue 9 years ago • 8 comments

Hi, I am implementing the Alexnet using armcompute CL apis and got stuck for implementing the grouped convolution.Could you let me know whether grouped convolution is supported for armcompute CL APIS.

If not supported then could you give us a sample code on how to Split the CLTensor in 2 halfs(2CLTensors) , and also combining the 2 CLTensors into 1 CLTensor.

Thanks in advance..

Subarukun avatar Jul 04 '17 10:07 Subarukun

Hello @Subarukun,

We have already implemented Alexnet here. We use sub-tensors to implement the grouped convolution.

GeorgeARM avatar Jul 04 '17 11:07 GeorgeARM

Hi George, Are this subtensors newly introduced in v17_06, or are they already present in the armcompute v17_05. Thanks.

Subarukun avatar Jul 05 '17 04:07 Subarukun

Hi George, I think they are newly introduced in v17_06. Anyways apart from subtensors , could you give me sample code for the above specified requirement. Thanks.

Subarukun avatar Jul 05 '17 06:07 Subarukun

Have a look at the example George pointed you at: it does exactly what you're asking for.

AnthonyBarbier avatar Jul 05 '17 08:07 AnthonyBarbier

thanks guys for your tremendous support and pointing me in the right direction..

Subarukun avatar Jul 05 '17 08:07 Subarukun

Hello George - is there a way to test out your implemented Alexnet model mentioned above. could you please provide instructions to test its functionality ... thank you

kamrao

mkamrao avatar Jul 05 '17 11:07 mkamrao

Hello @mkamrao, You could do something like the following:

using NEAlexNetModel = model_objects::AlexNet<ITensor,
      Tensor,
      SubTensor,
      NEAccessor,
      NEActivationLayer,
      NEConvolutionLayer,
      NEFullyConnectedLayer,
      NENormalizationLayer,
      NEPoolingLayer,
      NESoftmaxLayer>;

    NEAlexNetModel network{};

    network.init_weights(batches);
    network.build();
    network.allocate();
    network.fill(weight_files, bias_files); // You have to add this method in the model
    network.feed(input_file); // You have to add this method in the model
    network.run();

    return network.get_classifications();

You will have to add the fill and feed methods to the model object to fill the layer and input data from the files. You can use or do something similar with this.

Hope this helps.

GeorgeARM avatar Jul 05 '17 11:07 GeorgeARM

Not an update, thus closing, reopen if needed.

GeorgeARM avatar Sep 29 '17 10:09 GeorgeARM