Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marie Tahon
DnCNN-tensorflow-holography
Commits
16f8f132
Commit
16f8f132
authored
Mar 28, 2021
by
Mano Brabant
Browse files
Remove Tensorflow
parent
1bbc378f
Changes
1
Show whitespace changes
Inline
Side-by-side
utils.py
View file @
16f8f132
#-*- coding: utf-8 -*-
#
# This file is part of DnCnn4Holo.
...
...
@@ -37,7 +36,6 @@ import sys
import
re
import
pathlib
import
numpy
as
np
import
tensorflow
as
tf
from
PIL
import
Image
from
scipy.io
import
loadmat
,
savemat
from
glob
import
glob
...
...
@@ -593,20 +591,6 @@ def cal_std_phase(im1, im2):
return
dev
<<<<<<<
HEAD
def
tf_psnr
(
im1
,
im2
):
'''
this function is deprecated
'''
# assert pixel value range is 0-1
#mse = tf.losses.mean_squared_error(labels=im2 * 255.0, predictions=im1 * 255.0)
mse
=
tf
.
losses
.
mean_squared_error
(
labels
=
im2
,
predictions
=
im1
)
return
10.0
*
(
tf
.
log
(
1
/
mse
)
/
tf
.
log
(
10.0
))
=======
>>>>>>>
cfbb377a755bc7b5e2b9ead857e01e5576ec3f67
class
NNRegressor
(
nt
.
NeuralNetwork
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment