edflow.applications.tf_perceptual_loss module¶
Reference¶
-
edflow.applications.tf_perceptual_loss.
preprocess_input
(x)[source]¶ Preprocesses a tensor encoding a batch of images. :param x: input tensor, 4D in [-1,1] :type x: tf.Tenser
- Returns
Preprocessed tensor
- Return type
tf.Tensor
-
class
edflow.applications.tf_perceptual_loss.
VGG19Features
(session, feature_layers=None, feature_weights=None, gram_weights=None, default_gram=0.1, original_scale=False)[source]¶ Bases:
object
-
__init__
(session, feature_layers=None, feature_weights=None, gram_weights=None, default_gram=0.1, original_scale=False)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
make_nll_op
(x, y, log_variances, gram_log_variances=None, calibrate=True)[source]¶ x, y should be rgb tensors in [-1,1]. This version treats every layer independently.
-