You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tensorci2.jl
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -587,6 +587,8 @@ function convergencecriterion(
587
587
) ||all(lastranks .>= maxbonddim)
588
588
end
589
589
590
+
591
+
590
592
"""
591
593
function optimize!(
592
594
tci::TensorCI2{ValueType},
@@ -628,6 +630,7 @@ Arguments:
628
630
- `nsearchglobalpivot::Int` can be set to `>= 0`. Default: `0`.
629
631
- `tolmarginglobalsearch` can be set to `>= 1.0`. Seach global pivots where the interpolation error is larger than the tolerance by `tolmarginglobalsearch`. Default: `10.0`.
630
632
- `strictlynested::Bool` determines whether to preserve partial nesting in the TCI algorithm. Default: `false`.
633
+
- `checkbatchevaluatable::Bool` Check if the function `f` is batch evaluatable. Default: `false`.
631
634
632
635
Notes:
633
636
- Set `tolerance` to be > 0 or `maxbonddim` to some reasonable value. Otherwise, convergence is not reachable.
@@ -652,12 +655,17 @@ function optimize!(
652
655
maxnglobalpivot::Int=5,
653
656
nsearchglobalpivot::Int=0,
654
657
tolmarginglobalsearch::Float64=10.0,
655
-
strictlynested::Bool=false
658
+
strictlynested::Bool=false,
659
+
checkbatchevaluatable::Bool=false
656
660
) where {ValueType}
657
661
errors = Float64[]
658
662
ranks = Int[]
659
663
nglobalpivots = Int[]
660
664
665
+
if checkbatchevaluatable &&!(f isa BatchEvaluator)
- `nsearchglobalpivot::Int` can be set to `>= 0`. Default: `0`.
869
877
- `tolmarginglobalsearch` can be set to `>= 1.0`. Seach global pivots where the interpolation error is larger than the tolerance by `tolmarginglobalsearch`. Default: `10.0`.
870
878
- `strictlynested::Bool=true` determines whether to preserve partial nesting in the TCI algorithm. Default: `true`.
879
+
- `checkbatchevaluatable::Bool` Check if the function `f` is batch evaluatable. Default: `false`.
871
880
872
881
Notes:
873
882
- Set `tolerance` to be > 0 or `maxbonddim` to some reasonable value. Otherwise, convergence is not reachable.
0 commit comments