show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# importing the required libarary | |
import pandas as pd | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
df = pd.read_excel("online_retail_II.xlsx") | |
df.head() | |
#Bar chart visualisation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install_certifi.py | |
# | |
# sample script to install or update a set of default Root Certificates | |
# for the ssl module. Uses the certificates provided by the certifi package: | |
# https://pypi.python.org/pypi/certifi | |
import os | |
import os.path | |
import ssl | |
import stat | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import comet_ml | |
experiment = comet_ml.Experiment( | |
api_key="<Your API Key>", | |
project_name="<Your Project Name>" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import comet_ml | |
api = comet_ml.api.API() | |
api.get() | |
experiment = api.get("zenunicorn/exp-notebooks/example 004") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import warnings | |
import matplotlib.pyplot as plt | |
import tensorflow as tf | |
from tensorflow import keras | |
from tensorflow.keras import layers | |
from tensorflow.keras.preprocessing.image import ImageDataGenerator | |
import keras_tuner as kt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from tensorflow import keras | |
from tensorflow.keras import layers | |
from tensorflow.keras.preprocessing.image import ImageDataGenerator | |
import keras_tuner as kt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image_generator = ImageDataGenerator(rescale=1/255, validation_split=0.2) | |
#Train & Validation Split | |
train_dataset = image_generator.flow_from_directory(batch_size=32, | |
directory='data_cleaned/Train', | |
shuffle=True, | |
target_size=(224, 224), | |
subset="training", | |
class_mode='categorical') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
batch_1_img = train_dataset[0] | |
for i in range(0,32): | |
img = batch_1_img[0][i] | |
lab = batch_1_img[1][i] | |
plt.imshow(img) | |
plt.title(lab) | |
plt.axis('off') | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = keras.models.Sequential([ | |
keras.layers.Conv2D(32, (3, 3), activation='relu', input_shape = [224, 224,3]), | |
keras.layers.MaxPooling2D(), | |
keras.layers.Conv2D(64, (2, 2), activation='relu'), | |
keras.layers.MaxPooling2D(), | |
keras.layers.Conv2D(64, (2, 2), activation='relu'), | |
keras.layers.Flatten(), | |
keras.layers.Dense(100, activation='relu'), | |
keras.layers.Dense(2, activation ='softmax') | |
]) |
OlderNewer