The code didnt open "Vis" folder. i worked wrote working code.
`import os
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torchvision.transforms as transforms
from models import resnet
from models import EfficientFace
import glob
from PIL import Image
import numpy as np
np.set_printoptions(precision=3, suppress=True)
import cv2
import matplotlib.pyplot as plt
def print_directory_contents(dir_path):
for root, dirs, files in os.walk(dir_path):
level = root.replace(dir_path, '').count(os.sep)
indent = ' ' 4 (level)
print('{}{}/'.format(indent, os.path.basename(root)))
subindent = ' ' 4 (level + 1)
for f in files:
print('{}{}'.format(subindent, f))
The code didnt open "Vis" folder. i worked wrote working code.
`import os import torch import torch.nn as nn import torch.nn.parallel import torch.optim import torch.utils.data import torch.utils.data.distributed import torchvision.transforms as transforms from models import resnet from models import EfficientFace import glob from PIL import Image import numpy as np
np.set_printoptions(precision=3, suppress=True) import cv2 import matplotlib.pyplot as plt
def print_directory_contents(dir_path): for root, dirs, files in os.walk(dir_path): level = root.replace(dir_path, '').count(os.sep) indent = ' ' 4 (level) print('{}{}/'.format(indent, os.path.basename(root))) subindent = ' ' 4 (level + 1) for f in files: print('{}{}'.format(subindent, f))
def main(): os.environ["CUDA_VISIBLE_DEVICES"] = '0' vis_dir = os.path.join('.', 'Vis')
class RecorderMeter(object): """Computes and stores the minimum loss value and its epoch index""" pass
if name == 'main': main() `