[ 
https://issues.apache.org/jira/browse/SINGA-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16476937#comment-16476937
 ] 

SHEYUJIAN edited comment on SINGA-369 at 5/16/18 6:52 AM:
----------------------------------------------------------

2.Imagenet

a.googlenet 
After download the parameter checkpoint file, use $ python serve.py -C to run 
the program and use  $ curl -i -F [email protected] http://localhost:9999/api to 
submit image.

Here we can get intialization done but have a check failure:

total num of params 116
End intialization............
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0516 14:02:43.203186 2490057600 common.h:70] Check failed: initialized_ Must 
initialize data before reading it
*** Check failure stack trace: ***
Abort trap: 6

b.Inception 
after getting the parameter checkpoint file,I use $ python serve.py -C to run 
the program, then get an error:

Traceback (most recent call last):
  File "serve.py", line 17, in <module>
    import model
ImportError: No module named model

Here I change import model to import inception_v4 as model
and run again and submit the image.

then it can finish initialization but:

Traceback (most recent call last):
  File "serve.py", line 72, in serve
    y = net.predict(x)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/net.py", 
line 249, in predict
    return tensor.softmax(xx)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/tensor.py",
 line 783, in softmax
    return _call_singa_func(singa.SoftMax, t.singa_tensor)
AttributeError: 'dict' object has no attribute 'singa_tensor'

3.resnet
After use $ python serve.py --use_cpu --parameter_file resnet-18.pickle --model 
resnet --depth 18 to run the program and submit the image, we can finish 
loading models but get:

Finish loading models
input:  1.01205956936
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0516 14:39:20.944815 2490057600 common.h:70] Check failed: initialized_ Must 
initialize data before reading it
*** Check failure stack trace: ***
Abort trap: 6

4.vgg
Firstly, there is one problem in the instruction:
here we can change $ python serve.py --use_cpu --parameter_file vgg11.pickle 
--depth 11 --use_cpu to $ python serve.py --use_cpu --parameter_file 
vgg11.pickle --depth 11 to use cpu run the program.

Then after submitting the image, we get the error:

Finish loading models
('input: ', 1.1942412853240967)
Traceback (most recent call last):
  File "serve.py", line 70, in serve
    y = net.predict(images)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/net.py", 
line 249, in predict
    return tensor.softmax(xx)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/tensor.py",
 line 783, in softmax
    return _call_singa_func(singa.SoftMax, t.singa_tensor)
AttributeError: 'Tensor' object has no attribute 'singa_tensor'






was (Author: sheyujian):
2.Imagenet

a.googlenet 
After download the parameter checkpoint file, use $ python serve.py -C to run 
the program and use  $ curl -i -F [email protected] http://localhost:9999/api to 
submit image.

Here we can get intialization done but have a check failure:
total num of params 116
End intialization............
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0516 14:02:43.203186 2490057600 common.h:70] Check failed: initialized_ Must 
initialize data before reading it
*** Check failure stack trace: ***
Abort trap: 6

b.Inception 
after getting the parameter checkpoint file,I use $ python serve.py -C to run 
the program, then get an error:

Traceback (most recent call last):
  File "serve.py", line 17, in <module>
    import model
ImportError: No module named model

Here I change import model to import inception_v4 as model
and run again and submit the image.

then it can finish initialization but:

Traceback (most recent call last):
  File "serve.py", line 72, in serve
    y = net.predict(x)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/net.py", 
line 249, in predict
    return tensor.softmax(xx)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/tensor.py",
 line 783, in softmax
    return _call_singa_func(singa.SoftMax, t.singa_tensor)
AttributeError: 'dict' object has no attribute 'singa_tensor'

3.resnet
After use $ python serve.py --use_cpu --parameter_file resnet-18.pickle --model 
resnet --depth 18 to run the program and submit the image, we can finish 
loading models but get:

Finish loading models
input:  1.01205956936
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0516 14:39:20.944815 2490057600 common.h:70] Check failed: initialized_ Must 
initialize data before reading it
*** Check failure stack trace: ***
Abort trap: 6

4.vgg
Firstly, there is one problem in the instruction:
here we can change $ python serve.py --use_cpu --parameter_file vgg11.pickle 
--depth 11 --use_cpu to $ python serve.py --use_cpu --parameter_file 
vgg11.pickle --depth 11 to use cpu run the program.

Then after submitting the image, we get the error:
Finish loading models
('input: ', 1.1942412853240967)
Traceback (most recent call last):
  File "serve.py", line 70, in serve
    y = net.predict(images)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/net.py", 
line 249, in predict
    return tensor.softmax(xx)
  File 
"/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/tensor.py",
 line 783, in softmax
    return _call_singa_func(singa.SoftMax, t.singa_tensor)
AttributeError: 'Tensor' object has no attribute 'singa_tensor'




> the errors of examples in testing
> ---------------------------------
>
>                 Key: SINGA-369
>                 URL: https://issues.apache.org/jira/browse/SINGA-369
>             Project: Singa
>          Issue Type: Bug
>         Environment: SINGA Version:  osx-64/singa-1.1.1-py27_cpu
> OS: Mac OS 10.13.4
>            Reporter: SHEYUJIAN
>            Priority: Major
>
> 1.Cifar10
> After getting data from Cifar-10 dataset 
> I use python train.py vgg cifar-10-batches-py  --use_cpu to train in cpu
> and get an error:
> Traceback (most recent call last):
>   File "train.py", line 42, in <module>
>     import alexnet
> ImportError: No module named alexnet
> Here I comment the line: #import alexnet
> and then have a new error:
> Traceback (most recent call last):
>   File "train.py", line 212, in <module>
>     use_cpu=args.use_cpu)
>   File "train.py", line 156, in train
>     grads, (l, a) = net.train(tx, ty)
>   File 
> "/Users/sheyujian/anaconda3/envs/a/lib/python2.7/site-packages/singa/net.py", 
> line 185, in train
>     return backprob(x, y)
> NameError: global name 'backprob' is not defined
> After revising the return backprob(x,y) in line 185 to return 
> self.backprob(x, y), get:
> Start intialization............
> Using CPU
> Epoch 0
> -->conv1_1_1: 0.252035
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> F0516 13:19:27.929081 2490057600 batchnorm.cc:100] Trainning 
> SpatialBatchNormalization has not been implemented yet...
> *** Check failure stack trace: ***
> Abort trap: 6



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to