File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -138,8 +138,8 @@ def ssim(
138
138
if len (X .shape ) not in (4 , 5 ):
139
139
raise ValueError (f"Input images should be 4-d or 5-d tensors, but got { X .shape } " )
140
140
141
- if not X .type () == Y .type ():
142
- raise ValueError (f"Input images should have the same dtype, but got { X .type ()} and { Y .type ()} ." )
141
+ # if not X.type() == Y.type():
142
+ # raise ValueError(f"Input images should have the same dtype, but got {X.type()} and {Y.type()}.")
143
143
144
144
if win is not None : # set win_size
145
145
win_size = win .shape [- 1 ]
@@ -193,8 +193,8 @@ def ms_ssim(
193
193
X = X .squeeze (dim = d )
194
194
Y = Y .squeeze (dim = d )
195
195
196
- if not X .type () == Y .type ():
197
- raise ValueError (f"Input images should have the same dtype, but got { X .type ()} and { Y .type ()} ." )
196
+ # if not X.type() == Y.type():
197
+ # raise ValueError(f"Input images should have the same dtype, but got {X.type()} and {Y.type()}.")
198
198
199
199
if len (X .shape ) == 4 :
200
200
avg_pool = F .avg_pool2d
You can’t perform that action at this time.
0 commit comments