Update:
I tried to look into the activations() function that is provided in the faster rcnn class and it reads data as below:
output = activations(this, data, roi, outputLayer, inputLayer)
where outputLayer and inputLayer need to be scalars and roi I belive should be the bounding boxes for data. Then I proceed to call this function as below:
featureMap = activations(detector.Network, I, bboxes, 11, 9);
Where my softmax layer is located in layer 10 and so I specified the outputLayer = 11, inputLayer = 9. But then I get a deadly error as below, and then matlab refuses to work with GPU, and I need to restart matlab to be able to call gpuDevice again.
Error using nnet.internal.cnngpu.reluForward
An error occurred during PTX compilation of <image>.
The information log was:
<No information>
The error log was:
<No information>
The CUDA error code was: CUDA_ERROR_ILLEGAL_ADDRESS.
Error in nnet.internal.cnn.layer.util.ReLUGPUStrategy/forward (line 8)
Z = nnet.internal.cnngpu.reluForward(X);
Error in nnet.internal.cnn.layer.ReLU/forward (line 39)
[Z, memory] = this.ExecutionStrategy.forward(X);
Error in vision.internal.cnn.internalFastRCNNSeriesNetwork/activations (line 87)
clsOutput = this.Layers{currentLayer}.forward( clsOutput );
Error in vision.cnn.FastRCNN/activations (line 250)
YChannelFormat = predictNetwork.activations(X, roi, layerID, inputLayerID);
There is something weird going on here, and I would be thankful if you could assist me with this issue.