Skip to content
Snippets Groups Projects
Commit b3020130 authored by Levecque Etienne's avatar Levecque Etienne
Browse files

fix: correct pipeline issue

parent 6c2e38bf
No related merge requests found
......@@ -90,7 +90,7 @@ class Block:
error = np.sum(abs_error, axis=(1, 2, 3))
error_idx = np.argsort(error)
if error[error_idx[0]] == 0: # check only the first element which is the smallest error
if error_idx.any() and error[error_idx[0]] == 0: # check only the first element which is the smallest error
send_logs(verbose, shared_dict, task_id, max_iter, max_iter)
self.antecedents[pipeline] = (children[not_seen][error_idx[0]], iter_counter)
......
......@@ -176,7 +176,7 @@ class ComposedPipeline:
return blocks
def backward(self, blocks):
for pipe in self.pipelines:
for pipe in self.pipelines[::-1]:
blocks = pipe.backward(blocks)
return blocks
......@@ -199,7 +199,7 @@ def create_pipeline(name, quality, grayscale, target_is_dct):
compression = not target_is_dct
for subclass in JPEGPipeline.__subclasses__():
if subclass.is_named(name[i].lower()):
pipelines.append(subclass(quality[i], grayscale, compression))
pipelines.append(subclass(quality[i], compression, grayscale))
found = True
break
if found:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment