laknath1996 / deepphaseunwrap Goto Github PK
View Code? Open in Web Editor NEWThis repository Introduces a joint convolutional and spatial quad-directional LSTM (SQD-LSTM) network for phase unwrapping in 2D images.
License: MIT License
This repository Introduces a joint convolutional and spatial quad-directional LSTM (SQD-LSTM) network for phase unwrapping in 2D images.
License: MIT License
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, :]
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.