- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I imported pre-trained VGG16 model in keras without dense layer. I added own dense layer and trained the model. Now I have a model those summary is
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
image_input (InputLayer) (None, 224, 224, 3) 0
_________________________________________________________________
block1_conv1 (Conv2D) (None, 224, 224, 64) 1792
_________________________________________________________________
block1_conv2 (Conv2D) (None, 224, 224, 64) 36928
_________________________________________________________________
block1_pool (MaxPooling2D) (None, 112, 112, 64) 0
_________________________________________________________________
block2_conv1 (Conv2D) (None, 112, 112, 128) 73856
_________________________________________________________________
block2_conv2 (Conv2D) (None, 112, 112, 128) 147584
_________________________________________________________________
block2_pool (MaxPooling2D) (None, 56, 56, 128) 0
_________________________________________________________________
block3_conv1 (Conv2D) (None, 56, 56, 256) 295168
_________________________________________________________________
block3_conv2 (Conv2D) (None, 56, 56, 256) 590080
_________________________________________________________________
block3_conv3 (Conv2D) (None, 56, 56, 256) 590080
_________________________________________________________________
block3_pool (MaxPooling2D) (None, 28, 28, 256) 0
_________________________________________________________________
block4_conv1 (Conv2D) (None, 28, 28, 512) 1180160
_________________________________________________________________
block4_conv2 (Conv2D) (None, 28, 28, 512) 2359808
_________________________________________________________________
block4_conv3 (Conv2D) (None, 28, 28, 512) 2359808
_________________________________________________________________
block4_pool (MaxPooling2D) (None, 14, 14, 512) 0
_________________________________________________________________
block5_conv1 (Conv2D) (None, 14, 14, 512) 2359808
_________________________________________________________________
block5_conv2 (Conv2D) (None, 14, 14, 512) 2359808
_________________________________________________________________
block5_conv3 (Conv2D) (None, 14, 14, 512) 2359808
_________________________________________________________________
block5_pool (MaxPooling2D) (None, 7, 7, 512) 0
_________________________________________________________________
reshape_1 (Reshape) (None, 1, 25088) 0
_________________________________________________________________
dense_1 (Dense) multiple 3211392
_________________________________________________________________
dropout_1 (Dropout) multiple 0
_________________________________________________________________
dense_2 (Dense) multiple 903
_________________________________________________________________
activation_1 (Activation) multiple 0
=================================================================
I converted the model in .meta file using
sess = keras.backend.get_session()
saver = tf.train.Saver()
save_path = saver.save(sess, "output/finalModel")
While compiling the model, I am getting the following error
$ mvNCCompile --new-parser -s 12 output/finalModel.meta -in=image_input -on=activation_1/truediv -is 224 224
/usr/local/bin/ncsdk/Controllers/Parsers/TensorFlowParser/Convolution.py:46: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(False, "Layer type not supported by Convolution: " + obj.type)
/usr/local/bin/ncsdk/Controllers/Parsers/Phases.py:322: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(len(pred) == 1, "Slice not supported to have >1 predecessors")
mvNCCompile v02.00, Copyright @ Intel Corporation 2017
****** Info: No Weights provided. inferred path: output/finalModel.data-00000-of-00001******
output/finalModel.meta
2018-11-23 13:14:48.986926: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
output tensor shape (?, 7, 7, 512)
Traceback (most recent call last):
File "/usr/local/bin/mvNCCompile", line 206, in <module>
create_graph(args.network, args.image, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights, args.explicit_concat, args.ma2480, args.scheduler, args.new_parser, args.cpp, args)
File "/usr/local/bin/mvNCCompile", line 185, in create_graph
load_ret = load_network(args, parser, myriad_config)
File "/usr/local/bin/ncsdk/Controllers/Scheduler.py", line 83, in load_network
input_data, expected_result, output_tensor_name = p.calculateReference(arguments)
File "/usr/local/bin/ncsdk/Controllers/Parsers/TensorFlow.py", line 278, in calculateReference
input_data = np.random.uniform(RAND_LO, RAND_HI, input_shape).astype(dtype=np.float16)
File "mtrand.pyx", line 1302, in mtrand.RandomState.uniform
File "mtrand.pyx", line 242, in mtrand.cont2_array_sc
TypeError: __index__ returned non-int (type NoneType)
Could anyone help to figure out the problem and with the suggestion to solve the error?
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page