Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Atashnezhad committed Sep 6, 2023
1 parent d1901ce commit 8484616
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
15 changes: 2 additions & 13 deletions neural_network_model/bit_vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,11 @@
import tensorflow as tf
from keras import Sequential
from keras.callbacks import ModelCheckpoint
from keras.layers import (
BatchNormalization,
Conv2D,
Dense,
Dropout,
Flatten,
MaxPooling2D,
)
from keras.layers import BatchNormalization, Conv2D, Dense, Dropout, Flatten, MaxPooling2D
from tensorflow import keras
from tensorflow.keras.applications.resnet50 import decode_predictions, preprocess_input
from tensorflow.keras.preprocessing import image
from tensorflow.keras.preprocessing.image import (
ImageDataGenerator,
img_to_array,
load_img,
)
from tensorflow.keras.preprocessing.image import ImageDataGenerator, img_to_array, load_img

from neural_network_model.model import SETTING

Expand Down
6 changes: 1 addition & 5 deletions neural_network_model/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@

from bing_image_downloader import downloader
from tensorflow.keras.preprocessing import image
from tensorflow.keras.preprocessing.image import (
ImageDataGenerator,
img_to_array,
load_img,
)
from tensorflow.keras.preprocessing.image import ImageDataGenerator, img_to_array, load_img
from tqdm import tqdm

from neural_network_model.model import SETTING
Expand Down
6 changes: 3 additions & 3 deletions neural_network_model/transfer_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import math
import os
from pathlib import Path
from typing import Tuple, Dict
from typing import Dict, Tuple

import matplotlib.cm as cm
import numpy as np
Expand All @@ -30,7 +30,7 @@
)

from neural_network_model.bit_vision import BitVision
from neural_network_model.model import TRANSFER_LEARNING_SETTING, SETTING
from neural_network_model.model import SETTING, TRANSFER_LEARNING_SETTING
from neural_network_model.process_data import Preprocessing

# Initialize the logger
Expand Down Expand Up @@ -1024,7 +1024,7 @@ def predict_one_image(self, img_path: str, model_path=None) -> Tuple[np.ndarray,
}
transfer_model.predict_test(
model_path=(
Path(__file__).parent / ".." / "deep_model" / "tf_model_ad_1.h5"
Path(__file__).parent / ".." / "deep_model" / "tf_model_ad_1.h5"
).resolve(),
rotation=90,
y_axis_label_size=12,
Expand Down
5 changes: 1 addition & 4 deletions neural_network_model/visual_insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
from sklearn.cluster import KMeans
from tqdm import tqdm

from neural_network_model.model import (
SUPERVISE_LEARNING_SETTING,
TRANSFER_LEARNING_SETTING,
)
from neural_network_model.model import SUPERVISE_LEARNING_SETTING, TRANSFER_LEARNING_SETTING

# ignore warnings
warnings.filterwarnings("ignore")
Expand Down

0 comments on commit 8484616

Please sign in to comment.