Hi to everyone,
I'm trying to make it work a very simple neural network with the following structure:
Input of 3 84 3 (row, col, channels)
Conv2D with kernel 3x3, filter 1 and stride 3
Flatten layer where the output is only 28
A series of Dense layers of 28 ---> 256 ---> 128 ---> 64 ---> 32 ---> 5 with all Relu activations except for the last one that is linear.
initial_model = load_model('stage_4_1510.h5')
input = Input(shape=(3, 84, 3), name='input')
model = Model(inputs=input, outputs=x)
shape = (1,3,3,3,1)
The network has been trained in Keras and so from .h5 I had to transform the model in .pb file.
At that point, in order to verify that everything was correct , I printed out the weights and everything was perfect.
So, I used the mvNCCompiler to get the .graph file and I generated it without problems with the following message:
Fusing DeptwiseConv + Pointwise Convolution into plain Convolution
Fusing Add and Batch after Convolution
Eliminate layers that have been parsed as NoOp
Fusing Pad and Convolution2D
Fusing Scale after Convolution or FullyConnect
Fusing standalone postOps
Fusing Permute and Flatten
Fusing Eltwise and Relu
Fusing Concat of Concats
Evaluating input and weigths for each hw layer
Network Input tensors ['input:0#17']
Network Output tensors ['sequential_1/dense_5/BiasAdd:0#33']
It seems everything fine so far, but unfortunately the network, during the inference time, gives random outputs ( not coherent with the original network).
I'm sure that the problem is in the conversion and in particular in the fully connected part because with some tests I verified that the output of the convolutional part is correct.
So, considering that I can touch and get my hand the compiler, what I have to do? Do you have any idea? Thx
Could answer the following questions:
- What are you using to test your model? If you are using your own code, do you mind sharing that with me to give it a try.
- Have you tried to test with mvNCCheck? Make sure you are specifying an input image with -i followed with the path of the file
- What version of the NCSDK are you using?