0% found this document useful (0 votes)
37 views1 page

Project

The document provides information on importing various Python libraries and modules for tasks like loading images, loading models, plotting graphs, adding delays, working with dataframes, performing math on arrays, interacting with the operating system, encoding categorical features, and saving model architectures to file. Key libraries mentioned include Keras, Matplotlib, Pandas, NumPy, Sklearn, Tensorflow, and core Python modules like time and OS.

Uploaded by

Ashe Jay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

Project

The document provides information on importing various Python libraries and modules for tasks like loading images, loading models, plotting graphs, adding delays, working with dataframes, performing math on arrays, interacting with the operating system, encoding categorical features, and saving model architectures to file. Key libraries mentioned include Keras, Matplotlib, Pandas, NumPy, Sklearn, Tensorflow, and core Python modules like time and OS.

Uploaded by

Ashe Jay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

* from keras.

preprocessing import image


To load an image and show the image using Keras

* from keras.models import load_model


In order to load the model, a user can use the load_model() function
specified in the keras.models library. The user will first have to import this
function from the relevant library in order to use it.

* import matplotlib.pyplot as plt

https://matplotlib.org/2.0.2/users/pyplot_tutorial.html#:~:text=Pyplot
%20tutorial-,matplotlib.,the%20plot%20with%20labels%2C%20etc.

helps with plotting in a graph


matplotlib. pyplot is a collection of command style functions that make
matplotlib work like MATLAB.
pyplot is a plotting library used for 2D graphics in python programming
language. It can be used in python scripts, shell, web application servers and
other graphical user interface toolkits.

* from time import sleep


In order to use sleep(), you need to import it. from time import sleep.
sleep() takes one argument: seconds. This is the amount of time (in seconds) that
you want to delay your code

* import pandas as pd

https://www.educative.io/edpresso/what-is-pandas-in-python

It presents a diverse range of utilities, ranging from parsing multiple file


formats to converting an entire data table into a NumPy matrix array.

* import numpy as np

https://numpy.org/doc/stable/user/whatisnumpy.html

used to perform a wide variety of mathematical operations on arrays

* import os
The OS module in Python provides functions for creating and removing a
directory (folder), fetching its contents, changing and identifying the current
directory, etc. You first need to import the os module to interact with the
underlying operating system.

* from sklearn.preprocessing import LabelEncoder


Sklearn provides a very efficient tool for encoding the levels of categorical
features into numeric values. LabelEncoder encode labels with a value between 0 and
n_classes-1 where n is the number of distinct labels

* json_file
The model architecture will be saved to a JSON file

from keras.preprocessing.image import load_img, img_to_array


from keras.preprocessing.image import ImageDataGenerator
from keras.layers import
Dense,Input,Dropout,GlobalAveragePooling2D,Flatten,Conv2D,BatchNormalization,Activa
tion,MaxPooling2D
from keras.models import Model,Sequential
from tensorflow.keras.optimizers import Adam,SGD,RMSprop

You might also like