Neural networks

From Wiki2


neural networks

refs

nyt

<markdown>

  1. virtualenv
    1. setup
   $ pip install --upgrade pip
   $ pip install tensorflow -q
   $ pip install --upgrade matplotlib
   $ python -m pip install --upgrade pip
   $ mkdir p3test
   $ cd p3test/ 
   $ virtualenv -p /c/Users/tim/Anaconda3/python.exe venv 
   //for python 3.5 or  /c/Python27/python.exe for version2.7
   tim@TIM-HP /c/wamp/www/python/p3test (master)
   $ source venv/Scripts/activate

prove its working

   $ python
   Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import tensorflow as tf
   >>> sess=tf.Session()
   >>> answer - tf.matmul([[7,], [6,]])

deactivate isn't there but you can add it to venv/Scripts/deactivate

  1. This file must be used with "source bin/activate" *from bash*
  2. you cannot run it directly

deactivate () {

   unset pydoc
   # reset old environment variables
   if [ -n "$_OLD_VIRTUAL_PATH" ] ; then
       PATH="$_OLD_VIRTUAL_PATH"
       export PATH
       unset _OLD_VIRTUAL_PATH
   fi
   if [ -n "$_OLD_VIRTUAL_PYTHONHOME" ] ; then
       PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
       export PYTHONHOME
       unset _OLD_VIRTUAL_PYTHONHOME
   fi
   # This should detect bash and zsh, which have a hash command that must
   # be called to get it to forget past commands.  Without forgetting
   # past commands the $PATH changes we made may not be respected
   if [ -n "$BASH" -o -n "$ZSH_VERSION" ] ; then
       hash -r 2>/dev/null
   fi
   if [ -n "$_OLD_VIRTUAL_PS1" ] ; then
       PS1="$_OLD_VIRTUAL_PS1"
       export PS1
       unset _OLD_VIRTUAL_PS1
   fi
   unset VIRTUAL_ENV
   if [ ! "$1" = "nondestructive" ] ; then
   # Self destruct!
       unset -f deactivate
   fi
   }
   # unset irrelevant variables
   deactivate nondestructive



</markdown>