http://neuralcloud.org/Your title hereVivitiCMS2017-02-11T11:56:00-06:00Your title heretag:neuralcloud.org,2016-06-11:/entries/48971GPU Computing: The Revolution!!!2017-02-11T11:56:00-06:002017-02-19T01:16:15-06:00<p><span style="color:#696969">Solve a problem more quickly. Parallel processing would be faster, but the learning curve is steep – isn't it?<br>
Not anymore. With CUDA, you can send C, C++ and Fortran code straight to GPU, no assembly language required.<br>
Developers at companies such as Adobe, ANSYS, Autodesk, MathWorks and Wolfram Research are waking that sleeping giant – the GPU -- to do general-purpose scientific and engineering computing across a range of platforms.<br>
Using high-level languages, GPU-accelerated applications run the sequential part of their workload on the CPU – which is optimized for single-threaded performance – while accelerating parallel processing on the GPU. This is called "GPU computing."<br>
GPU computing is possible because today's GPU does much more than render graphics: It sizzles with a teraflop of floating point performance and crunches application tasks designed for anything from finance to medicine.<br>
CUDA is widely deployed through thousands of applications and published research papers and supported by an installed base of over 375 million CUDA-enabled GPUs in notebooks, workstations, compute clusters and supercomputers.<br>
- See more at: http://www.nvidia.com/object/cuda_home_new.html#sthash.q3lhDItx.dpuf</span></p>
tag:neuralcloud.org,2014-05-08:/entries/31427blog post2016-12-08T14:15:00-06:002017-02-19T01:16:42-06:00<p><span style="color:#696969"><span style="font-size:14px">Find more complex relationships in your data<br>
IBM® SPSS® Neural Networks software offers nonlinear data modeling procedures that enable you to discover more complex relationships in your data. The software lets you set the conditions under which the network learns. You can control the training stopping rules and network architecture, or let the procedure automatically choose the architecture for you.<br>
With SPSS Neural Networks software, you can develop more accurate and effective predictive models.<br>
Mine your data for hidden relationships using the Multilayer Perceptron (MLP) or Radial Basis Function (RBF) procedure.<br>
Control the process from start to finish by specifying the variables.<br>
Combine with other statistical procedures or techniques for greater insight.</span></span></p>
<p><span style="color:#696969"><span style="font-size:14px">http://www-03.ibm.com/software/products/en/spss-neural-networks</span></span></p>
tag:neuralcloud.org,2014-04-27:/entries/31251Using Matlab to call Python std's2016-10-27T22:21:00-05:002017-02-19T01:17:11-06:00<div class="hentry p3 post publish author-ilyasu1 category-uncategorized untagged y2012 m02 d13 h05" id="post-141">
<div class="entry-content">
<p><span style="color:#696969"><span style="font-size:small">There is a simple strategy that should do: first, figure out how to call python from stand-alone C functions, and then use that code within a mex function. While tedious, at least this is straightforward. By using the not terribly complicated PyObject stuff we can create python objects in C, send them to python functions, and unpack whatever the python functions give us back. However, everything goes bad if we try to import numpy in our python code. We’ll get an error that looks like this:</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">……../pylib/numpy/core/<span class="skimlinks-unlinked">multiarray.so</span>:</span><br>
<span style="font-size:small">undefined symbol: _Py_ZeroStruct</span><br>
<span style="font-size:small">even though all the required symbols are defined in libpython2.x.</span></span></p>
<p><span style="font-size:small"><span style="color:#696969">This problem was asked several times on stackoverflow, with no satisfactory answer. But luckily, after much searching, I stumbled upon </span><a href="https://github.com/pv/pythoncall" rel="nofollow" sl-processed="1"><span style="color:#696969">https://github.com/pv/pythoncall</span></a><span style="color:#696969"> which discovered a way to solve this problem.</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">Basically, matlab imports dynamic libraries in a peculiar way that messes up the symbols somehow. But if we execute the code</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">int dlopen_python_hack(){</span><br>
<span style="font-size:small">if (!dlopen_hacked){</span><br>
<span style="font-size:small">printf(“Preloading the library for the hack: %s\n”, LIBPYTHON_PATH);</span><br>
<span style="font-size:small">dlopen(LIBPYTHON_PATH, RTLD_NOW|RTLD_GLOBAL);</span><br>
<span style="font-size:small">dlopen_hacked = 1;</span><br>
<span style="font-size:small">}</span><br>
<span style="font-size:small">}</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">where LIBPYTHON_PATH points to libpython2.x.so, then suddenly all the messed-up symbols will fix themselves, and we won’t have undefined symbol problems anymore.Reinforce is one of my favorite algorithms in machine learning. It’s useful for reinforcement learning.</span></span></p>
</div>
</div>
<div class="hentry p4 post publish author-ilyasu1 category-uncategorized untagged y2011 m09 d13 h03 alt" id="post-63">
<div class="entry-content">
<p><span style="color:#696969"><span style="font-size:small">The formal goal of reinforce is to maximize an expectation, <img alt="\sum_x p_\theta(x)r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=%5Csum_x+p_%5Ctheta%28x%29r%28x%29&bg=ffffff&fg=000&s=0" title="\sum_x p_\theta(x)r(x)">, where <img alt="r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=r%28x%29&bg=ffffff&fg=000&s=0" title="r(x)"> is the reward function and <img alt="p_\theta(x)" class="latex" src="http://s0.wp.com/latex.php?latex=p_%5Ctheta%28x%29&bg=ffffff&fg=000&s=0" title="p_\theta(x)"> is a distribution. To apply reinforce, all we need is to be able to sample from <img alt="p(x)" class="latex" src="http://s0.wp.com/latex.php?latex=p%28x%29&bg=ffffff&fg=000&s=0" title="p(x)"> and to evaluate the reward <img alt="r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=r%28x%29&bg=ffffff&fg=000&s=0" title="r(x)">, which is really nothing.</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">This is the case because of the following simple bit of math:</span></span></p>
<p><span style="color:#696969"><span style="font-size:small"><img alt="\nabla_\theta \sum_x p_\theta(x) r(x) = \sum_x p_\theta(x)\nabla_\theta \log p_\theta(x) r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=%5Cnabla_%5Ctheta+%5Csum_x+p_%5Ctheta%28x%29+r%28x%29+%3D+%5Csum_x+p_%5Ctheta%28x%29%5Cnabla_%5Ctheta+%5Clog+p_%5Ctheta%28x%29+r%28x%29&bg=ffffff&fg=000&s=0" title="\nabla_\theta \sum_x p_\theta(x) r(x) = \sum_x p_\theta(x)\nabla_\theta \log p_\theta(x) r(x)"></span></span></p>
<p><span style="color:#696969"><span style="font-size:small">which clearly shows that to estimate the gradient wrt the expected reward, we merely need to sample from <img alt="p(x)" class="latex" src="http://s0.wp.com/latex.php?latex=p%28x%29&bg=ffffff&fg=000&s=0" title="p(x)"> and weigh the gradient <img alt="\nabla_\theta \log p_\theta(x)" class="latex" src="http://s0.wp.com/latex.php?latex=%5Cnabla_%5Ctheta+%5Clog+p_%5Ctheta%28x%29&bg=ffffff&fg=000&s=0" title="\nabla_\theta \log p_\theta(x)"> by the reward <img alt="r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=r%28x%29&bg=ffffff&fg=000&s=0" title="r(x)">.</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">Reinforce is so tantalizing because sampling from a distribution is very easy. For example, the distribution <img alt="p(x)" class="latex" src="http://s0.wp.com/latex.php?latex=p%28x%29&bg=ffffff&fg=000&s=0" title="p(x)"> could be the combination of a parametrized control policy and the actual responses of the real world to our actions: <img alt="x" class="latex" src="http://s0.wp.com/latex.php?latex=x&bg=ffffff&fg=000&s=0" title="x"> could be the sequence of states and actions chosen by our policy and the environment, so</span></span></p>
<p><span style="color:#696969"><span style="font-size:small"><img alt="p(x)=\prod_t p_{\textrm{world}}(x_t|x_{t-1},a_t)p_\theta(a_t|x_t)" class="latex" src="http://s0.wp.com/latex.php?latex=p%28x%29%3D%5Cprod_t+p_%7B%5Ctextrm%7Bworld%7D%7D%28x_t%7Cx_%7Bt-1%7D%2Ca_t%29p_%5Ctheta%28a_t%7Cx_t%29&bg=ffffff&fg=000&s=0" title="p(x)=\prod_t p_{\textrm{world}}(x_t|x_{t-1},a_t)p_\theta(a_t|x_t)">,</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">and only part of <img alt="p(x)" class="latex" src="http://s0.wp.com/latex.php?latex=p%28x%29&bg=ffffff&fg=000&s=0" title="p(x)"> is parameterized by <img alt="\theta" class="latex" src="http://s0.wp.com/latex.php?latex=%5Ctheta&bg=ffffff&fg=000&s=0" title="\theta">.</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">Similarly, <img alt="r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=r%28x%29&bg=ffffff&fg=000&s=0" title="r(x)"> is obviously easily computable from the environment.</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">So reinforce is dead easy to apply: for example, it could be applied to a robot’s policy. To sample from our distribution, we’d run the policy, get the robot to interact with our world, and collect our reward. And we’ll get an unbiased estimate of the gradient, and presto: we’d be doing stochastic gradient descent on the policy’s parameters.Unfortunately, this simple approach is not so easy to apply. The problem lies in the huge variance of our estimator <img alt="\nabla_\theta p(x) r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=%5Cnabla_%5Ctheta+p%28x%29+r%28x%29&bg=ffffff&fg=000&s=0" title="\nabla_\theta p(x) r(x)">. It is easy to see, intuitively, where this variance comes from. Reinforce obtains its learning signal from the noise in its policy distribution <img alt="p_\theta" class="latex" src="http://s0.wp.com/latex.php?latex=p_%5Ctheta&bg=ffffff&fg=000&s=0" title="p_\theta">. In effect, reinforce makes a large number of random choices through the randomness in its policy distribution, and if they do better than average, then we’ll change our parameters so that these choices are more likely in the future. Similarly, if the random choices end up doing worse than random, the model will try to avoid choosing this specific configuration of actions.</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">(<img alt="\sum_x p_\theta(x)\nabla_\theta \log p_\theta(x) r(x)" class="latex" src="http://s0.wp.com/latex.php?latex=%5Csum_x+p_%5Ctheta%28x%29%5Cnabla_%5Ctheta+%5Clog+p_%5Ctheta%28x%29+r%28x%29&bg=ffffff&fg=000&s=0" title="\sum_x p_\theta(x)\nabla_\theta \log p_\theta(x) r(x)"> = <img alt="\sum_x p_\theta(x)\nabla_\theta \log" class="latex" src="http://s0.wp.com/latex.php?latex=%5Csum_x+p_%5Ctheta%28x%29%5Cnabla_%5Ctheta+%5Clog&bg=ffffff&fg=000&s=0" title="\sum_x p_\theta(x)\nabla_\theta \log"> <img alt="p_\theta(x)(r(x)-r_\textrm{avg})" class="latex" src="http://s0.wp.com/latex.php?latex=p_%5Ctheta%28x%29%28r%28x%29-r_%5Ctextrm%7Bavg%7D%29&bg=ffffff&fg=000&s=0" title="p_\theta(x)(r(x)-r_\textrm{avg})"> because <img alt="\sum_x p(x)\nabla \log p(x)=0" class="latex" src="http://s0.wp.com/latex.php?latex=%5Csum_x+p%28x%29%5Cnabla+%5Clog+p%28x%29%3D0&bg=ffffff&fg=000&s=0" title="\sum_x p(x)\nabla \log p(x)=0">. There is a simple formula for choosing the optimal <img alt="r_\textrm{avg}" class="latex" src="http://s0.wp.com/latex.php?latex=r_%5Ctextrm%7Bavg%7D&bg=ffffff&fg=000&s=0" title="r_\textrm{avg}">).</span></span></p>
<p><span style="color:#696969"><span style="font-size:small">To paraphrase, reinforce adds a small perturbation to the choices and sees if the total reward has improved. If we’re trying to do something akin to supervised learning with reinforce with a small label set, then reinforce won’t do so terribly: each action would be a classification, and we’d have a decent chance to guess the correct answer. So we’ll be guessing the correct answer quite often, which will supply our neural net with training signal, and learning will succeed. However, it’s completely hopeless to train a system that makes a large number of decisions with a tiny reward in the end.On a more optimistic note, large companies that deploy millions of robots could refine their robot’s policies with large scale reinforce. During the day, the robots will collect the data for the policy, and during the night, the policy will be updated.</span></span></p>
</div>
</div>