import os
import zipfile
import random
from PIL import Image, ImageDraw
import json
import pickle
from tqdm import tqdm
import numpy as np
import matplotlib.pyplot as plt
"font", family="NanumGothic", size=13)
plt.rc(
import warnings
'ignore')
warnings.filterwarnings(
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision.transforms as transforms
import torchvision.datasets as datasets
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
from torch.utils.data.sampler import WeightedRandomSampler
import time
from tqdm import tqdm
import torchvision.transforms as transforms
from torchvision.datasets import ImageFolder
import os
from PIL import ImageFile
= True
ImageFile.LOAD_TRUNCATED_IMAGES from imblearn.over_sampling import SMOTE
import torchvision.datasets as datasets
from torchvision.transforms import transforms
import numpy as np
2023-05-10 13:15:09.260609: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-05-10 13:15:09.314742: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-05-10 13:15:10.776130: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT