未验证 提交 3f83a8b3 编写于 作者: jm_12138's avatar jm_12138 提交者: GitHub

del batchsize (#1532)

修复animeGan不应支持batch_size问题。
上级 4f818578
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V1_Hayao_60(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Hayao_64(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Hayao_99(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_54(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_74(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_97(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_98(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_33(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
......@@ -23,7 +23,6 @@ def style_transfer(
self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
......@@ -43,7 +42,6 @@ def style_transfer(
* images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None;
* paths (list\[str\]): 图片的路径,默认为 None;
* batch\_size (int): batch 的大小,默认设为 1;
* visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
* output\_dir (str): 图片的保存路径,默认设为 output;
* min\_size (int): 输入图片的短边最小尺寸,默认设为 32;
......
......@@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_53(Module):
def style_transfer(self,
images=None,
paths=None,
batch_size=1,
output_dir='output',
visualization=False,
min_size=32,
max_size=1024):
# 加载数据处理器
processor = Processor(images, paths, batch_size, output_dir, min_size, max_size)
processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size)
# 模型预测
outputs = self.model.predict(processor.input_datas)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册