Re: activity recognition using apache singa

2016-10-12 Thread Wang Wei
Hi Arash, Make sure all tensors are copied to the same cuda device to avoid memory error. Please reinstall singa using the latest wheel file http://comp.nus.edu.sg/~dbsystem/singa/assets/file/pb2.6-cuda7.5-cudnn5/singa-1.0.0-cp27-none-linux_x86_64.whl which resolved the problem of int32<->float3

Re: activity recognition using apache singa

2016-10-09 Thread Wang Wei
The label tensor should be of shape (2947,) like this one https://github.com/apache/incubator-singa/blob/master/python/singa/metric.py#L31 I will check the problem from int32 and float32. On Sun, Oct 9, 2016 at 3:27 PM Arash Shafiei wrote: > I am facing a problem concerning creating tensor from

Re: activity recognition using apache singa

2016-10-08 Thread Wang Wei
No. Loss != Inaccuracy. If you want to compute the accuracy, you need to create an evaluator=singa.Accuracy(), and call evaluator.Evaluate(o, t), where o is the output from the dense layer and t is the ground truth tensor. You can follow the example here https://github.com/apache/incubator-singa/bl

Re: activity recognition using apache singa

2016-10-08 Thread Wei Wang
Have you moved all tensor onto the same devices? Including the tensor for the labels. > On 9 Oct 2016, at 11:02 AM, Arash Shafiei wrote: > > outputs = rnn.forward(model_pb2.kTrain, inputs)[0:-2] > grads = [] > batch_loss = 0 > g_dense_w.set_value(0.0) > g_dense_b.set_value(0.0) > print 'output

Re: activity recognition using apache singa

2016-10-08 Thread Wang Wei
Actually, the char-rnn example is from type (4), where each rnn unit would generate a prediction and has a ground truth label. For your model (type 2), you only need to use the y128 (of shape 256, 28) from the rnn::forward() as the input to the dense layer. All other yi should be ignored. Conseque

Re: activity recognition using apache singa

2016-10-08 Thread Wang Wei
Currently, numpy array of dtype=np.float32 or np.int could be converted into singa tensor. Please convert the numpy array into np.float32 and then call tensor.from_numpy(t) (without dtype=np.float32). On Sat, Oct 8, 2016 at 6:36 PM Arash Shafiei wrote: > The values that I have are floating point

Re: activity recognition using apache singa

2016-09-22 Thread Wang Wei
You may need use gcc4.8 or gcc4.9 to reinstall protobuf. BTW, there is a compatibility problem between gcc5.x and cuda 7, http://stackoverflow.com/questions/34996295/trying-to-get-cuda-7-5-to-work-with-gcc-5-x On Thu, Sep 22, 2016 at 4:31 PM, Arash Shafiei wrote: > Yes, we are using the same

Re: activity recognition using apache singa

2016-09-22 Thread Wang Wei
Are you using the singa wheel for protobuf 2.6 (i.e. the following link)? http://comp.nus.edu.sg/~dbsystem/singa/assets/file/pb2.6-cuda7.5-cudnn5/singa-1.0.0-cp27-none-linux_x86_64.whl May I know your gcc version for compiling protobuf? On Thu, Sep 22, 2016 at 4:10 PM, Arash Shafiei wrote: > H

Re: activity recognition using apache singa

2016-09-22 Thread Wang Wei
Hi Arash, Have you installed google protobuf, which is a dependent library of SINGA? Can you send me the output from running ldd /usr/local/lib/python2.7/dist-packages/singa/_singa_wrap.so It would display the version of the protobuf wheel is using. Please make sure the version of the protobuf

Re: activity recognition using apache singa

2016-09-21 Thread Wang Wei
Hi Arash, Have you installed PySINGA via the following approaches ( http://singa.apache.org/en/docs/installation.html#install-pysinga)? # in build/ folder cmake -DUSE_CUDA=ON -DUSE_PYTHON=ON .. make cd python pip install . or using the python wheel On Thu, Sep 22, 2016 at 2:02 PM, Arash Shafiei