Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
b9a11499
Commit
b9a11499
authored
May 19, 2021
by
lucas_miranda
Browse files
Replaced for loop with vectorised mapping on ClusterOverlap regularization layer
parent
a7080a5c
Pipeline
#101725
failed with stages
in 22 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
deepof/model_utils.py
View file @
b9a11499
...
...
@@ -617,12 +617,19 @@ class ClusterOverlap(Layer):
)
self
.
add_metric
(
tf
.
shape
(
tf
.
unique
(
tf
.
squeeze
(
tf
.
gather
(
hard_groups
,
tf
.
where
(
max_groups
>=
self
.
min_confidence
)))
)
tf
.
cast
(
tf
.
shape
(
tf
.
unique
(
tf
.
squeeze
(
tf
.
gather
(
tf
.
cast
(
hard_groups
,
tf
.
dtypes
.
float32
),
tf
.
where
(
max_groups
>=
self
.
min_confidence
),
),
),
)[
0
],
)[
0
],
tf
.
dtypes
.
float32
,
),
aggregation
=
"mean"
,
name
=
"number_of_populated_clusters"
,
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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