Git Product home page Git Product logo

deepphaseunwrap's Issues

why did the loss function define ?

def tv_loss_plus_var_loss(y_true, y_pred):
"""
Define the composite loss function that includes total variation of errors
loss and variance of errors loss
"""
# total variation loss
y_x = y_true[:, 1:256, :, :] - y_true[:, 0:255, :, :]
y_y = y_true[:, :, 1:256, :] - y_true[:, :, 0:255, :]
y_bar_x = y_pred[:, 1:256, :, :] - y_pred[:, 0:255, :, :]
y_bar_y = y_pred[:, :, 1:256, :] - y_pred[:, :, 0:255, :]
L_tv = K.mean(K.abs(y_x - y_bar_x)) + K.mean(K.abs(y_y - y_bar_y))

# variance of the error loss
E = y_pred - y_true
L_var = K.mean(K.mean(K.square(E), axis=(1, 2, 3)) - K.square(K.mean(E, axis=(1, 2, 3))))

loss = L_var + 0.1 * L_tv
return loss

in the function :
y_x = y_true[:, 1:256, :, :] - y_true[:, 0:255, :, :]
y_y = y_true[:, :, 1:256, :] - y_true[:, :, 0:255, :]
y_bar_x = y_pred[:, 1:256, :, :] - y_pred[:, 0:255, :, :]
y_bar_y = y_pred[:, :, 1:256, :] - y_pred[:, :, 0:255, :]
why is not by thoes ?
y_x = y_true[:, 0:256, :, :] - y_true[:, 0:256, :, :]
y_y = y_true[:, :, 0:256, :] - y_true[:, :, 0:256, :]
y_bar_x = y_pred[:, 0:256, :, :] - y_pred[:, 0:256, :, :]
y_bar_y = y_pred[:, :, 0:256, :] - y_pred[:, :, 0:256, :]

Why is the loss of training system always infinite when using the code

Epoch 1/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00001: loss did not improve from inf
250/250 [==============================] - 16s 65ms/step - loss: nan
Epoch 2/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00002: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 3/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00003: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 4/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00004: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 5/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00005: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 6/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00006: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 7/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00007: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 8/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00008: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 9/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00009: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 10/100
250/250 [==============================] - ETA: 0s - loss: nan
Epoch 00010: loss did not improve from inf
250/250 [==============================] - 16s 63ms/step - loss: nan
Epoch 00010: early stopping

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.