Coder Social home page Coder Social logo

machine_learning_note's Introduction

Machine Learning Notes

This repo is used to summarize ML knowledge I have learned and the relevant blogs.

Install Keras and Tensorflow in Virtual Evn with Jupyter

First install tensorflow, then install Keras.

1. Create a virtual environment using Conda

In Create a virtual environment (recommended) section, choose Conda tag, rather than UBUNTU/MAC OS (choosing this tag won't successfully implement tensorflow in Jupyter notebook). In your shell (it indicates xxxx:~ hsiang$), type

conda create -n <yourenvname> pip python=3.6

or

conda create -n <yourenvname> python=3.6 anaconda

<yourenvname> is any virtual environment name; can be zoo, LSTM_test and Boo, whatever you like. Second way designates using anaconda to set up virtual environment. See Create virtual environments for python with conda

Assume we use venv as virtual name, then activate venv by

source activate venv

or

conda activate venv

For example, if you name your virtual environment as LSTM_test, after activating the environment, you will see

(LSTM_test) xxxx:~ hsiang$

in your terminal. To quit the mode, just type source deactivate or conda deactivate.

To view environments and delete, use

conda env list

and

conda remove --name <yourenvname> --all

See Conda Remove Environment โ€“ How to Delete an Env.

2. Install TensorFlow package

Within the virtual environment, we also need to install the TensorFlow pip package using its complete URL.

(LSTM_test) xxxx:~ hsiang$ pip install --ignore-installed --upgrade complete_URL

For MacOS (CPU-only) and Python 3.6, the above comment will become

(LSTM_test) xxxx:~ hsiang$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl

3. Run Pip Install TensorFlow

Choose VIRTUALENV INSTALL tag:

(LSTM_test) xxxx:~ hsiang$ pip install --upgrade tensorflow

4. Pip Install Keras

Within the environment, run

(LSTM_test) xxxx:~ hsiang$ pip install keras

to install Keras. Now within the environment, type jupyter notebook, you should be able to import tensorflow and keras!

Access to Github via Teriminal

From August 13, 2021, Github does not support to type password authentication.

(base) hsianghsuanhung@x86_64-apple-darwin13 Statistics % git push 
Password for 'https://<old_token>@github.com': 
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/HsiangHung/Machine_Learning_Note.git/'

To push code, or update via git push in the terminal, we need to go through the token. (refer the stackoverflow page Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead [duplicate]):

  1. Generate a token from web, if expires or forget. Follow the process: Creating a fine-grained personal access token and then create a new token on Personal access tokens (classic). A valid token should look ghp_xxxxx....

  2. Once we have a valid token, we use

    git push https://[email protected]/<username>/Machine_Learning_Note.git

    to push update.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.