DeepRegNet/DeepReg

View on GitHub
deepreg/loss/image.py

Summary

Maintainability
A
3 hrs
Test Coverage

File image.py has 254 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Provide different loss or metrics classes for images."""
import tensorflow as tf

from deepreg.constant import EPS
from deepreg.loss.kernel import gaussian_kernel1d_size as gaussian_kernel1d
Severity: Minor
Found in deepreg/loss/image.py - About 2 hrs to fix

    Function call has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def call(self, y_true: tf.Tensor, y_pred: tf.Tensor) -> tf.Tensor:
            """
            Return loss for a batch.
    
            :param y_true: shape = (batch, dim1, dim2, dim3)
    Severity: Minor
    Found in deepreg/loss/image.py - About 1 hr to fix

      Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(
      Severity: Minor
      Found in deepreg/loss/image.py - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status