Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FupingWu90 authored Aug 10, 2020
1 parent afdcebf commit 298386f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ It is the code for the paper : 'CF Distance: A New Domain Discrepancy Metric and
python 2.7

SimpleITK 1.2.0

Torch 1.1.0

numpy 1.15.0

# Usage
The core code for CF distance computation is the class `Feature_Distribution_Distance_func' in python file `utils_for_transfer.py'. The mosy important parameter need to be tuned is `self.Tvalue', here we set it to be 1e2. You can initialize it first, and then input any two corresponding features from two domains inot it to compute their distance of CF. As the back propagation for gradient descent can not be done directly by the pytorch, we provided their gradient computation in the class `Feature_Distribution_Distance_Func' in python file `utils_for_transfer.py'. In the total loss, the loss term of CF distance, i.e., Dis_Lamda* CF_Dist, would be good if its initial value be magnitude of 1e2 via choosing suitable Dis_Lamda.
The core code for CF distance computation is the class `Feature_Distribution_Distance_func' in python file `utils_for_transfer.py'. The mosy important parameter need to be tuned is `self.Tvalue', here we set it to be 1e2.
You can initialize it first, and then input any two corresponding features from two domains inot it to compute their distance of CF.

As the back propagation for gradient descent can not be done directly by the pytorch, we provided their gradient computation in the class `Feature_Distribution_Distance_Func' in python file `utils_for_transfer.py'.

In the total loss, the loss term of CF distance, i.e., Dis_Lamda* CF_Dist, would be good if its initial value be magnitude of 1e2 via choosing suitable Dis_Lamda.

We provided the Unet here as the backbone of the network, you can adjust this for any other network.

0 comments on commit 298386f

Please sign in to comment.