- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to run a UNET architecture (built using keras using tensorflow as backend) on myriad2 using NCSDK2.05. I have ubuntu 16.04.
I converted the keras model to tensorflow graph. When I try to use .meta file with mvncProfile (-s 12 -in=Images -on=PredictionMask/Sigmoid ) I get the following error:
Blob generated
USB: Transferring Data…
Time to Execute : 231.29 ms
USB: Myriad Execution Finished
Time to Execute : 189.13 ms
USB: Myriad Execution Finished
Traceback (most recent call last):
File "/usr/local/bin/mvNCProfile", line 159, in
profile_net(args.network, args.inputnode, args.outputnode, args.nshaves, args.inputsize, args.weights, args.device_no, args.explicit_concat, args.ma2480, args.scheduler, args)
File "/usr/local/bin/mvNCProfile", line 145, in profile_net
timings, myriad_output = run_myriad(graph_file, args)
File "/usr/local/bin/ncsdk/Controllers/MiscIO.py", line 321, in run_myriad
myriad_output = myriad_output.reshape(sz[1], sz[2], sz[3])
ValueError: cannot reshape array of size 2097152 into shape (128,128,1)
Any help will be appreciated.
-Regards
Baishali
- Tags:
- Keras
- Tensorflow
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
does there a concat layer at your network's end?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @zufeifei my last layer is the prediction layer ((Sigmoid ) Have a look at the last 3 layers: Its a keras using tensorflow as backend)
up9 = K.layers.concatenate([up, conv1], axis=concat_axis)
conv9 = K.layers.Conv2D(name="conv9a", filters=32, **params)(up9)
conv9 = K.layers.Conv2D(name="conv9b", filters=32, **params)(conv9)
prediction = K.layers.Conv2D(name="PredictionMask",
filters=num_chan_out, kernel_size=(1, 1),
data_format=data_format,
activation="sigmoid")(conv9)
model = K.models.Model(inputs=[inputs], outputs=[prediction])
I did go through all the forum contents concerning your prroblem. And I saw that you tried using a reshape layer after concat. Did that help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@baishali
a reshape layer can help you to bypass the concat layer's problem,
a concay layer sometimes cause the output's shape innormal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @ zulfeifei I am not sure where to add the reshape layer as i have multiple concat layers at different levels. And also I have a doubt what size of the reshape layer should I use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the shape of output is (128, 128,128), but not (128, 128, 1). I met the same error, where the active fn is sigmoid
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page