mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-06-27 23:39:15 +02:00
training.metrics: allow module init without TFA
This commit is contained in:
parent
eb4cae9dee
commit
0bfbbfdc80
1 changed files with 4 additions and 1 deletions
|
|
@ -5,7 +5,10 @@ import tensorflow as tf
|
||||||
from tensorflow.keras import backend as K
|
from tensorflow.keras import backend as K
|
||||||
from tensorflow.keras.metrics import Metric, MeanMetricWrapper, get
|
from tensorflow.keras.metrics import Metric, MeanMetricWrapper, get
|
||||||
from tensorflow.keras.initializers import Zeros
|
from tensorflow.keras.initializers import Zeros
|
||||||
from tensorflow_addons.image import connected_components
|
try:
|
||||||
|
from tensorflow_addons.image import connected_components
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
pass # n/a beyond TF 2.15 (and only needed for training) ...
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue