8000 LBFGSFunctionOptimizer by DirkToewe · Pull Request #1385 · tensorflow/tfjs-core · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

LBFGSFunctionOptimizer #1385

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed LBFGSFunctionOptimizer doc, fixed linting error
  • Loading branch information
DirkToewe committed Nov 9, 2018
commit 5a5c72c84a29eb6da5f1d1e62c11651c1639befc
6 changes: 3 additions & 3 deletions src/optimizers/lbfgs_function_optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ export class LBFGSFunctionOptimizer {

/** A function that returns the negative "initial" search direction. In
* other words this function returns the result matrix-vector `H₀•g`,
* where `H₀` is the inverse of the initial inverse Hessian and `g` is
* the current (gradient) vector. The length of the returned vector
* stronly influences how far the `LineSearchMethod` looks.
* where `H₀` is the initial inverse Hessian and `g` is the current
* (gradient) vector. The length of the returned vector stronly
* influences how far the `LineSearchMethod` looks.
*
* @param g The gradient vector for which the (initial) search direction
* is to be determined.
Expand Down
4 changes: 2 additions & 2 deletions src/optimizers/lbfgs_function_optimizer_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ describeWithFlags('rastrigin', ALL_ENVS, () => {
expectArraysEqual( fMin.lessEqual(f).all(), scalar(true,'bool') );
}
catch(err) {
const iMax = f.flatten().argMin().dataSync()[0];
console.log('x_min:'); x.reshape([-1,l]).slice( [iMax,0], [1,l] ).print();
const i = f.flatten().argMin().dataSync()[0];
console.log('x_min:'); x.reshape([-1,l]).slice([i,0], [1,l]).print();
console.log('f.min:'); f.min().print();
console.log('fMin'); fMin.print();
throw err;
Expand Down
0