Skip to content
Snippets Groups Projects
Commit 406f14a3 authored by gong1's avatar gong1
Browse files

address the issue for import skimage metrics

parent 77e28763
No related branches found
No related tags found
No related merge requests found
Pipeline #68445 passed
import tensorflow as tf import tensorflow as tf
#import lpips_tf #import lpips_tf
import math import math
from skimage.metrics import structural_similarity as ssim_ski from skimage.measure import compare_ssim as ssim_ski
def mse(a, b): def mse(a, b):
return tf.reduce_mean(tf.squared_difference(a, b), [-3, -2, -1]) return tf.reduce_mean(tf.squared_difference(a, b), [-3, -2, -1])
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import numpy as np import numpy as np
import xarray as xr import xarray as xr
from typing import Union, List from typing import Union, List
from skimage.metrics import structural_similarity as ssim from skimage.measure import compare_ssim as ssim
try: try:
from tqdm import tqdm from tqdm import tqdm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment