I'm working with SNPE v.1.6.0.
I have followed steps in UDL Tutorial. (snpe-1.6.0/doc/html/udl_tutorial.html).
When I run snpe-caffe-to-dlc-udl, it gave me following error!
Encountered Error'module' object has no attribute 'UdlBlobOutput'
These are my outcomes. Please fix the problem.
sujungbae@sujungbae-VirtualBox:~/Qualcomm/snpe-1.6.0/examples/Python/UdlExample$ python snpe-caffe-to-dlc-udl \
> --caffe_txt $CAFFE_HOME/examples/mnist/mycustomlenet.prototxt \
> --caffe_bin $CAFFE_HOME/mycustomlenet_iter_10000.caffemodel \
> --dlc mycustomlenet.dlc
WARNING: Logging before InitGoogleLogging() is written to STDERR
W1103 11:42:46.729535 29946 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface
W1103 11:42:46.729598 29946 _caffe.cpp:140] Use this instead (with the named "weights" parameter):
W1103 11:42:46.729606 29946 _caffe.cpp:142] Net('/home/sujungbae/caffe/examples/mnist/mycustomlenet.prototxt', 1, weights='/home/sujungbae/caffe/mycustomlenet_iter_10000.caffemodel')
I1103 11:42:46.730643 29946 net.cpp:51] Initializing net from parameters:
name: "LeNet"
state {
phase: TEST
level: 0
}
layer {
name: "data"
type: "Input"
top: "data"
input_param {
shape {
dim: 64
dim: 1
dim: 28
dim: 28
}
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 20
kernel_size: 5
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv2"
type: "Convolution"
bottom: "pool1"
top: "conv2"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 50
kernel_size: 5
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "pool2"
type: "Pooling"
bottom: "conv2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "ip1"
type: "InnerProduct"
bottom: "pool2"
top: "ip1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 500
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "ip1"
top: "ip1"
}
layer {
name: "scale"
type: "MyCustomScale"
bottom: "ip1"
top: "scale"
scale_param {
bias_term: false
}
}
layer {
name: "ip2"
type: "InnerProduct"
bottom: "scale"
top: "ip2"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "prob"
type: "Softmax"
bottom: "ip2"
top: "prob"
}
I1103 11:42:46.730976 29946 layer_factory.hpp:77] Creating layer data
I1103 11:42:46.730993 29946 net.cpp:84] Creating Layer data
I1103 11:42:46.731003 29946 net.cpp:380] data -> data
I1103 11:42:46.731030 29946 net.cpp:122] Setting up data
I1103 11:42:46.731045 29946 net.cpp:129] Top shape: 64 1 28 28 (50176)
I1103 11:42:46.731052 29946 net.cpp:137] Memory required for data: 200704
I1103 11:42:46.731081 29946 layer_factory.hpp:77] Creating layer conv1
I1103 11:42:46.731096 29946 net.cpp:84] Creating Layer conv1
I1103 11:42:46.731106 29946 net.cpp:406] conv1 <- data
I1103 11:42:46.731117 29946 net.cpp:380] conv1 -> conv1
I1103 11:42:46.731377 29946 net.cpp:122] Setting up conv1
I1103 11:42:46.731392 29946 net.cpp:129] Top shape: 64 20 24 24 (737280)
I1103 11:42:46.731400 29946 net.cpp:137] Memory required for data: 3149824
I1103 11:42:46.731415 29946 layer_factory.hpp:77] Creating layer pool1
I1103 11:42:46.731427 29946 net.cpp:84] Creating Layer pool1
I1103 11:42:46.731436 29946 net.cpp:406] pool1 <- conv1
I1103 11:42:46.731446 29946 net.cpp:380] pool1 -> pool1
I1103 11:42:46.731462 29946 net.cpp:122] Setting up pool1
I1103 11:42:46.731472 29946 net.cpp:129] Top shape: 64 20 12 12 (184320)
I1103 11:42:46.731479 29946 net.cpp:137] Memory required for data: 3887104
I1103 11:42:46.731488 29946 layer_factory.hpp:77] Creating layer conv2
I1103 11:42:46.731499 29946 net.cpp:84] Creating Layer conv2
I1103 11:42:46.731508 29946 net.cpp:406] conv2 <- pool1
I1103 11:42:46.731519 29946 net.cpp:380] conv2 -> conv2
I1103 11:42:46.731659 29946 net.cpp:122] Setting up conv2
I1103 11:42:46.731673 29946 net.cpp:129] Top shape: 64 50 8 8 (204800)
I1103 11:42:46.731681 29946 net.cpp:137] Memory required for data: 4706304
I1103 11:42:46.731693 29946 layer_factory.hpp:77] Creating layer pool2
I1103 11:42:46.731703 29946 net.cpp:84] Creating Layer pool2
I1103 11:42:46.731712 29946 net.cpp:406] pool2 <- conv2
I1103 11:42:46.731722 29946 net.cpp:380] pool2 -> pool2
I1103 11:42:46.731735 29946 net.cpp:122] Setting up pool2
I1103 11:42:46.731745 29946 net.cpp:129] Top shape: 64 50 4 4 (51200)
I1103 11:42:46.731753 29946 net.cpp:137] Memory required for data: 4911104
I1103 11:42:46.731761 29946 layer_factory.hpp:77] Creating layer ip1
I1103 11:42:46.731771 29946 net.cpp:84] Creating Layer ip1
I1103 11:42:46.731781 29946 net.cpp:406] ip1 <- pool2
I1103 11:42:46.731789 29946 net.cpp:380] ip1 -> ip1
I1103 11:42:46.734031 29946 net.cpp:122] Setting up ip1
I1103 11:42:46.734048 29946 net.cpp:129] Top shape: 64 500 (32000)
I1103 11:42:46.734056 29946 net.cpp:137] Memory required for data: 5039104
I1103 11:42:46.734068 29946 layer_factory.hpp:77] Creating layer relu1
I1103 11:42:46.734079 29946 net.cpp:84] Creating Layer relu1
I1103 11:42:46.734088 29946 net.cpp:406] relu1 <- ip1
I1103 11:42:46.734097 29946 net.cpp:367] relu1 -> ip1 (in-place)
I1103 11:42:46.734108 29946 net.cpp:122] Setting up relu1
I1103 11:42:46.734118 29946 net.cpp:129] Top shape: 64 500 (32000)
I1103 11:42:46.734125 29946 net.cpp:137] Memory required for data: 5167104
I1103 11:42:46.734133 29946 layer_factory.hpp:77] Creating layer scale
I1103 11:42:46.734143 29946 net.cpp:84] Creating Layer scale
I1103 11:42:46.734151 29946 net.cpp:406] scale <- ip1
I1103 11:42:46.734161 29946 net.cpp:380] scale -> scale
I1103 11:42:46.734177 29946 net.cpp:122] Setting up scale
I1103 11:42:46.734187 29946 net.cpp:129] Top shape: 64 500 (32000)
I1103 11:42:46.734195 29946 net.cpp:137] Memory required for data: 5295104
I1103 11:42:46.734205 29946 layer_factory.hpp:77] Creating layer ip2
I1103 11:42:46.734215 29946 net.cpp:84] Creating Layer ip2
I1103 11:42:46.734223 29946 net.cpp:406] ip2 <- scale
I1103 11:42:46.734233 29946 net.cpp:380] ip2 -> ip2
I1103 11:42:46.734272 29946 net.cpp:122] Setting up ip2
I1103 11:42:46.734283 29946 net.cpp:129] Top shape: 64 10 (640)
I1103 11:42:46.734290 29946 net.cpp:137] Memory required for data: 5297664
I1103 11:42:46.734302 29946 layer_factory.hpp:77] Creating layer prob
I1103 11:42:46.734313 29946 net.cpp:84] Creating Layer prob
I1103 11:42:46.734321 29946 net.cpp:406] prob <- ip2
I1103 11:42:46.734330 29946 net.cpp:380] prob -> prob
I1103 11:42:46.734344 29946 net.cpp:122] Setting up prob
I1103 11:42:46.734361 29946 net.cpp:129] Top shape: 64 10 (640)
I1103 11:42:46.734369 29946 net.cpp:137] Memory required for data: 5300224
I1103 11:42:46.734378 29946 net.cpp:200] prob does not need backward computation.
I1103 11:42:46.734386 29946 net.cpp:200] ip2 does not need backward computation.
I1103 11:42:46.734395 29946 net.cpp:200] scale does not need backward computation.
I1103 11:42:46.734403 29946 net.cpp:200] relu1 does not need backward computation.
I1103 11:42:46.734411 29946 net.cpp:200] ip1 does not need backward computation.
I1103 11:42:46.734421 29946 net.cpp:200] pool2 does not need backward computation.
I1103 11:42:46.734428 29946 net.cpp:200] conv2 does not need backward computation.
I1103 11:42:46.734436 29946 net.cpp:200] pool1 does not need backward computation.
I1103 11:42:46.734446 29946 net.cpp:200] conv1 does not need backward computation.
I1103 11:42:46.734453 29946 net.cpp:200] data does not need backward computation.
I1103 11:42:46.734462 29946 net.cpp:242] This network produces output prob
I1103 11:42:46.734472 29946 net.cpp:255] Network initialization done.
I1103 11:42:46.735786 29946 net.cpp:744] Ignoring source layer mnist
I1103 11:42:46.736049 29946 net.cpp:744] Ignoring source layer loss
Encountered Error'module' object has no attribute 'UdlBlobOutput'
I am having the same issue as well. Please check !
Hello,
It seems that the example script is attempting to access the UdlBlobOutput utiliy from the wrong module. Could you please modify line 86 of snpe-caffe-to-dlc-udl to read as follows:
and let us know if that resolves the error?