1 | /**
|
2 | * @license
|
3 | * Copyright 2018 Google LLC
|
4 | *
|
5 | * Use of this source code is governed by an MIT-style
|
6 | * license that can be found in the LICENSE file or at
|
7 | * https://opensource.org/licenses/MIT.
|
8 | * =============================================================================
|
9 | */
|
10 | /// <amd-module name="@tensorflow/tfjs-layers/dist/logs" />
|
11 | import { Scalar } from '@tensorflow/tfjs-core';
|
12 | /**
|
13 | * Logs in which values can be either numbers or Tensors (Scalars).
|
14 | *
|
15 | * Used internally.
|
16 | */
|
17 | export declare type UnresolvedLogs = {
|
18 | [key: string]: number | Scalar;
|
19 | };
|
20 | /**
|
21 | * Turn any Scalar values in a Logs object into actual number values.
|
22 | *
|
23 | * @param logs The `Logs` object to be resolved in place.
|
24 | */
|
25 | export declare function resolveScalarsInLogs(logs: UnresolvedLogs): Promise<void>;
|
26 | /**
|
27 | * Dispose all Tensors in an UnresolvedLogs object.
|
28 | *
|
29 | * @param logs An `UnresolvedLogs` object potentially containing `tf.Tensor`s in
|
30 | * places where the values can be `tf.Tensor` or `number`.
|
31 | */
|
32 | export declare function disposeTensorsInLogs(logs: UnresolvedLogs): void;
|
33 | /**
|
34 | * Logs in which values can only be numbers.
|
35 | *
|
36 | * Used when calling client-provided custom callbacks.
|
37 | */
|
38 | export declare type Logs = {
|
39 | [key: string]: number;
|
40 | };
|