You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
好几处需要 .replace("\", "/") 转换分割符
def episode_reader(path, episode_num, support_class_num, support_shot_num, query_num, augment=False):
# class_list = os.listdir(path)
class_list = glob.glob(path + '/n*')
#class_list=class_list.replace("\\", "/")
#class_list = [os.path.join(path, c.replace("\", "/")) for c in class_list]
#print(class_list)
if augment:
policy = ImageNetPolicy()
def reader():
for i in range(episode_num):
class_folders = random.sample(class_list, support_class_num)
labels = np.array(range(len(class_folders)))
labels = dict(zip([f.replace("\", "/").split('/')[-1] for f in class_folders], labels))
#print(labels)
samples = dict()
sample_roots = []
query_roots = []
for c in class_folders:
temp = [os.path.join(c, x) for x in os.listdir(c)]
temp = [x.replace("\\", "/") for x in temp]
The text was updated successfully, but these errors were encountered:
class_list = glob.glob(path + '/n*')
#class_list=class_list.replace("\", "/")
#class_list = [os.path.join(path, c.replace("", "/")) for c in class_list]
#print(class_list)
if augment:
policy = ImageNetPolicy()
def reader():
for i in range(episode_num):
class_folders = random.sample(class_list, support_class_num)
labels = np.array(range(len(class_folders)))
labels = dict(zip([f.replace("", "/").split('/')[-1] for f in class_folders], labels))
#print(labels)
samples = dict()
sample_roots = []
query_roots = []
for c in class_folders:
temp = [os.path.join(c, x) for x in os.listdir(c)]
temp = [x.replace("\\", "/") for x in temp]
好几处需要 .replace("\", "/") 转换分割符
def episode_reader(path, episode_num, support_class_num, support_shot_num, query_num, augment=False):
# class_list = os.listdir(path)
class_list = glob.glob(path + '/n*')
#class_list=class_list.replace("\\", "/")
#class_list = [os.path.join(path, c.replace("\", "/")) for c in class_list]
#print(class_list)
if augment:
policy = ImageNetPolicy()
def reader():
for i in range(episode_num):
class_folders = random.sample(class_list, support_class_num)
labels = np.array(range(len(class_folders)))
labels = dict(zip([f.replace("\", "/").split('/')[-1] for f in class_folders], labels))
#print(labels)
samples = dict()
The text was updated successfully, but these errors were encountered: