Skip to content

Commit

Permalink
Merge pull request #148 from ANTsX/RemoveLearnRateOnce
Browse files Browse the repository at this point in the history
ENH:  Remove unused learning rate option.
  • Loading branch information
ntustison committed Aug 11, 2022
2 parents 5a5ef53 + 4e350f8 commit 1f7a317
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions R/antsRegistration.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
#' @param randomSeed integer random seed. combine with setting
#' ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS environment variable to limit the
#' impact of numerical differences.
#' @param estimateLearningRateOnce a change to internal optimizer parameters that
#' may permit a cleaner convergence at very fine scale.
#' @param samplingPercentage value between zero and one that allows the percentage
#' of points sampled to be controlled in low-dimensional metric estimation.
#' @param verbose request verbose output (useful for debugging)
Expand Down Expand Up @@ -199,7 +197,6 @@ antsRegistration <- function(
restrictTransformation,
writeCompositeTransform = FALSE,
randomSeed,
estimateLearningRateOnce=FALSE,
samplingPercentage=0.2,
verbose=FALSE,
printArgs = FALSE, ... ) {
Expand Down Expand Up @@ -252,8 +249,6 @@ antsRegistration <- function(
}

args <- list(fixed, moving, typeofTransform, outprefix, ...)
myl=0
if ( estimateLearningRateOnce ) myl = 1
myfAff = "6x4x2x1"
mysAff = "3x2x1x0"
metsam = 0.2
Expand Down Expand Up @@ -281,7 +276,6 @@ antsRegistration <- function(
myfAff="2x1"
mysAff="1x0"
myiterations <- "100x20"
myl=1
}
if ( typeofTransform == "QuickRigid" ) {
typeofTransform <- "Rigid"
Expand All @@ -296,7 +290,6 @@ antsRegistration <- function(
myfAff="2x1"
mysAff="1x0"
myiterations <- "100x20"
myl=1
}
mysyn = paste("SyN[",gradStep,",",flowSigma,",",totalSigma,"]", sep = "")
itlen = length( regIterations )-1
Expand Down Expand Up @@ -948,10 +941,6 @@ antsRegistration <- function(
}
return(0)
}
if ( estimateLearningRateOnce ) {
args[[ length(args)+1]]="-l"
args[[ length(args)+1]]="1"
}
args[[ length(args)+1]]="--float"
args[[ length(args)+1]]="1"
if ( verbose ) {
Expand Down
2 changes: 1 addition & 1 deletion data/antsVersions.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Dependency;GitTag
ANTs;d30526f9cb5159bc0a3e9011f7ae5f409b3634c8
ANTsRCore;e02f50536036eca437cd92081311ad33473942e6
ANTsRCore;5a5ef53bd4800be1bb79d0fe405491c7403162c0
ANTsURL;https://github.com/ANTsX/ANTs.git
ITK;v5.3rc03

0 comments on commit 1f7a317

Please sign in to comment.