Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.learn.tensorflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.learn.tensorflow
Commits
6e6addea
Commit
6e6addea
authored
Feb 07, 2020
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nitpick
parent
aece6e1b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
6 deletions
+9
-6
bob/learn/tensorflow/loss/BaseLoss.py
bob/learn/tensorflow/loss/BaseLoss.py
+1
-1
bob/learn/tensorflow/loss/ContrastiveLoss.py
bob/learn/tensorflow/loss/ContrastiveLoss.py
+1
-3
bob/learn/tensorflow/loss/StyleLoss.py
bob/learn/tensorflow/loss/StyleLoss.py
+1
-1
bob/learn/tensorflow/loss/TripletLoss.py
bob/learn/tensorflow/loss/TripletLoss.py
+1
-1
bob/learn/tensorflow/loss/mmd.py
bob/learn/tensorflow/loss/mmd.py
+5
-0
No files found.
bob/learn/tensorflow/loss/BaseLoss.py
View file @
6e6addea
...
...
@@ -4,7 +4,7 @@
import
logging
import
tensorflow
as
tf
logger
=
logging
.
getLogger
(
"bob.learn.tensorflow"
)
logger
=
logging
.
getLogger
(
__name__
)
slim
=
tf
.
contrib
.
slim
...
...
bob/learn/tensorflow/loss/ContrastiveLoss.py
View file @
6e6addea
...
...
@@ -4,9 +4,7 @@
import
logging
import
tensorflow
as
tf
from
bob.learn.tensorflow.utils
import
(
compute_euclidean_distance
,
)
from
bob.learn.tensorflow.utils
import
compute_euclidean_distance
logger
=
logging
.
getLogger
(
__name__
)
...
...
bob/learn/tensorflow/loss/StyleLoss.py
View file @
6e6addea
...
...
@@ -5,7 +5,7 @@
import
logging
import
tensorflow
as
tf
import
functools
logger
=
logging
.
getLogger
(
"bob.learn.tensorflow"
)
logger
=
logging
.
getLogger
(
__name__
)
def
content_loss
(
noises
,
content_features
):
...
...
bob/learn/tensorflow/loss/TripletLoss.py
View file @
6e6addea
...
...
@@ -3,7 +3,7 @@
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
import
logging
logger
=
logging
.
getLogger
(
"bob.learn.tensorflow"
)
logger
=
logging
.
getLogger
(
__name__
)
import
tensorflow
as
tf
from
bob.learn.tensorflow.utils
import
compute_euclidean_distance
...
...
bob/learn/tensorflow/loss/mmd.py
View file @
6e6addea
...
...
@@ -2,6 +2,8 @@ import tensorflow as tf
def
compute_kernel
(
x
,
y
):
"""Gaussian kernel.
"""
x_size
=
tf
.
shape
(
x
)[
0
]
y_size
=
tf
.
shape
(
y
)[
0
]
dim
=
tf
.
shape
(
x
)[
1
]
...
...
@@ -17,6 +19,9 @@ def compute_kernel(x, y):
def
mmd
(
x
,
y
):
"""Maximum Mean Discrepancy with Gaussian kernel.
See: https://stats.stackexchange.com/a/276618/49433
"""
x_kernel
=
compute_kernel
(
x
,
x
)
y_kernel
=
compute_kernel
(
y
,
y
)
xy_kernel
=
compute_kernel
(
x
,
y
)
...
...
Write
Preview
Markdown
is supported
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