Tagged: python Toggle Comment Threads | Keyboard Shortcuts

  • CG 8:15 pm on May 28, 2017 Permalink | Reply
    Tags: image recognition, python,   

    Image Recognition with TensorFlow – python 

    Bildschirmfoto 2017-05-28 um 7.53.32 PM Bildschirmfoto 2017-05-28 um 7.53.56 PM

    1. Start with this link https://www.tensorflow.org/tutorials/image_recognition#usage_with_python_api
    2. Download TensorFlow models repo from Github here https://github.com/tensorflow/models/blob/master/inception/inception/image_processing.py
    3. If you got errors with python, go here https://stackoverflow.com/questions/40357548/inception-v3-guide-on-tensorflow-broken-for-c-and-python
      or
      https://github.com/samjabrahams/tensorflow-on-raspberry-pi/issues/47
    4. Remove the argv command
    Advertisements
     
    • Brooks 11:35 am on June 30, 2017 Permalink | Reply

      magnificent issues altogether, you just gained a emblem new reader. What may you recommend about your publish that you made some days ago? Any certain?

    • restaurant frankfurt oder 1:39 pm on June 30, 2017 Permalink | Reply

      Grüße! Sehr hilfreiche Beratung in diesem Beitrag! Es sind die kleinen Veränderungen, die die größten Veränderungen bewirken werden. Danke für das Teilen!

    • anexo monografia 2:52 am on August 31, 2017 Permalink | Reply

      Heya i’m for the primary tikme here. I came across this board and I in finding It really helpful & it helped me out
      a lot. I hope to offer one thing again and aid others like you helped me.

  • CG 9:54 pm on May 26, 2017 Permalink | Reply
    Tags: macos, pip, python, Sierra, , virtualenv   

    Installing TensorFlow on MacOS Sierra 

    I can’t remember every steps but I need to leave some notes that I can refer to later 🙂 I just put everything I can remember here 🙂

    The directory:

    cd /usr/local/lib/python2.7/site-packages/tensorflow/bin
    source activate tensorflow

    code example to test

    >> import tensorflow as tf
    >>> hello = tf.constant(‘Hello, TensorFlow!’)
    >>> sess = tf.Session()
    >>> print sess.run(hello)
    Hello, TensorFlow!
    >>> a = tf.constant(10)
    >>> b = tf.constant(32)
    >>> print sess.run(a+b)
    42
    >>> quit()
    (tensorflow) CG-MacBook-Pro-2:bin Marisa$ deactivate

    Activating virtualenv

    $ cd /path/to/tensorflow/bin
    $ source activate tensorflow
    $ python
    >>> import tensorflow as tf
    >>> print(tf.__version__)
    1.0.1

    Important links:

    1. https://www.tensorflow.org/install/install_mac#the_url_of_the_tensorflow_python_package
    2. https://thkim.org/tensorflow/tensorflowinstallation/tensorflowinstallationvirtualenv/
    3. https://github.com/tensorflow/tensorflow/issues/647
    4. https://codedump.io/share/6Oq22H5Uhoab/1/virtualenv-tensorflow-instalation-validation-with-importerror-no-module-named-tensorflow
    5. https://stackoverflow.com/questions/43647090/virtualenv-tensorflow-installation-validation-with-importerror-no-module-named
    6. http://python-guide-pt-br.readthedocs.io/en/latest/dev/virtualenvs/
    7. https://hackercodex.com/guide/python-development-environment-on-mac-osx/
    8. http://sourabhbajaj.com/mac-setup/Python/virtualenv.html

    The journey:

    Downloading TensorFlow

    Bildschirmfoto 2017-05-25 um 7.09.57 PM

    Install and update

    Bildschirmfoto 2017-05-25 um 7.18.58 PM

    Removing Anaconda

    Bildschirmfoto 2017-05-25 um 7.25.06 PM

    tensorflow library couldn’t be recognized. Installing gpu version

    Bildschirmfoto 2017-05-25 um 8.01.42 PM

    installing for python 2.7

    Bildschirmfoto 2017-05-25 um 9.57.24 PM

    reinstalling python and fixing the PATH

    Bildschirmfoto 2017-05-25 um 10.25.47 PM

    installing virtualenv

    Bildschirmfoto 2017-05-25 um 11.33.43 PM

    installing tensorflow on virtualenv

    Bildschirmfoto 2017-05-26 um 1.14.44 PM

    tensorflow had been successfully installed on virtualenv

    Bildschirmfoto 2017-05-26 um 1.24.11 PM

    tensorflow library still not recognized

    Bildschirmfoto 2017-05-26 um 1.32.30 PM

    finally figure out how to activate the virtualenv

    Bildschirmfoto 2017-05-26 um 1.50.15 PM

    library recognized but there were errors!

    Bildschirmfoto 2017-05-26 um 1.50.42 PM

    reinstall tensorflow to the activated virtualenv, and it worked!

    Bildschirmfoto 2017-05-26 um 1.54.14 PM

    YES!!! 🙂 Now I’m ready to explore! 😉

    Bildschirmfoto 2017-05-26 um 2.16.10 PM

     
  • CG 3:32 pm on March 7, 2013 Permalink | Reply
    Tags: bit operations, python   

    Python: Bit Operations 

    Basic bit operations in Python:

    
    #!/usr/bin/python 
    
    a = 60            # 60 = 0011 1100 
    b = 13            # 13 = 0000 1101 
    c = 0
    
    print "a = ", (bin(a)[2:]);
    print "b = ", (bin(b)[2:]);
    
    c = a & b;        # 12 = 0000 1100
    print "a & b = ", (bin(c)[2:]);
    
    c = a | b;        # 61 = 0011 1101 
    print "a | b = ", (bin(c)[2:]);
    
    c = a ^ b;        # 49 = 0011 0001
    print "a ^ b = ", (bin(c)[2:]);
    
    c = ~a;           # -61 = 1100 0011
    print "~a = ", (bin(c)[2:]);
    
    c = a << 2;       # 240 = 1111 0000
    print "a <> 2;       # 15 = 0000 1111
    print "a >> 2 = ", (bin(c)[2:]);
    

    Result:
    Screen shot 2013-03-07 at 3.28.10 PM

    An interesting link about bit operation algorithm implementation in Python is here.

     
  • CG 6:11 pm on November 7, 2012 Permalink | Reply
    Tags: , python   

    Hello World – Python 

    I’m learning Python 😀

    This is the version of Python I’m using:

    And then start using vi to type the code:

    The listing of the code:

    And run the code:

    Ok that’s it for now, I don’t know yet what is so good about Python compared to other languages I’m familiar with (C/C++, Java, Perl). Will post more about this as soon as I learn more about Python.

     
  • CG 12:21 pm on January 28, 2011 Permalink | Reply
    Tags: , python   

    Testing non-composite & composite operation with Python 

    for 299 bit.

    Thx for Fajar Yuliawan for the code. I’m going to use this for testing the multiplier design.

    Useful links:

    1. Phyton for mac can be downloaded here.
    2. Phyton tutorial is here.
     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel