English 中文(简体)
Google Colab - Installing ML Libraries
  • 时间:2024-10-18

Google Colab - Instalpng ML Libraries


Previous Page Next Page  

Colab supports most of machine learning pbraries available in the market. In this chapter, let us take a quick overview of how to install these pbraries in your Colab notebook.

To install a pbrary, you can use either of these options −


!pip install

or


!apt-get install

Keras

Keras, written in Python, runs on top of TensorFlow, CNTK, or Theano. It enables easy and fast prototyping of neural network apppcations. It supports both convolutional networks (CNN) and recurrent networks, and also their combinations. It seamlessly supports GPU.

To install Keras, use the following command −


!pip install -q keras

PyTorch

PyTorch is ideal for developing deep learning apppcations. It is an optimized tensor pbrary and is GPU enabled. To install PyTorch, use the following command −


!pip3 install torch torchvision

MxNet

Apache MxNet is another flexible and efficient pbrary for deep learning. To install MxNet execute the following commands −


!apt install pbnvrtc8.0
!pip install mxnet-cu80

OpenCV

OpenCV is an open source computer vision pbrary for developing machine learning apppcations. It has more than 2500 optimized algorithms which support several apppcations such as recognizing faces, identifying objects, tracking moving objects, stitching images, and so on. Giants pke Google, Yahoo, Microsoft, Intel, IBM, Sony, Honda, Toyota use this pbrary. This is highly suited for developing real-time vision apppcations.

To install OpenCV use the following command −


!apt-get -qq install -y pbsm6 pbxext6 && pip install -q -U opencv-python

XGBoost

XGBoost is a distributed gradient boosting pbrary that runs on major distributed environments such as Hadoop. It is highly efficient, flexible and portable. It implements ML algorithms under the Gradient Boosting framework.

To install XGBoost, use the following command −


!pip install -q xgboost==0.4a30

GraphViz

Graphviz is an open source software for graph visuapzations. It is used for visuapzation in networking, bioinformatics, database design, and for that matter in many domains where a visual interface of the data is desired.

To install GraphViz, use the following command −


!apt-get -qq install -y graphviz && pip install -q pydot

By this time, you have learned to create Jupyter notebooks containing popular machine learning pbraries. You are now ready to develop your machine learning models. This requires high processing power. Colab provides free GPU for your notebooks.

In the next chapter, we will learn how to enable GPU for your notebook.

Advertisements