UNPKG

1.53 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2018 Google Inc. All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 * =============================================================================
16 */
17import { Shape } from '@tensorflow/tfjs';
18/**
19 * Node.js-specific tensor type: int64-type scalar.
20 *
21 * This class is created for a specific purpose: to support
22 * writing `step`s to TensorBoard via op-kernel bindings.
23 * `step` is required to have an int64 dtype, but TensorFlow.js
24 * (tfjs-core) doesn't have a built-in int64 dtype. This is
25 * related to a lack of `Int64Array` or `Uint64Array` typed
26 * array in basic JavaScript.
27 *
28 * This class is introduced as a workaround.
29 */
30export declare class Int64Scalar {
31 readonly value: number;
32 readonly dtype: string;
33 readonly rank: number;
34 private valueArray_;
35 private static endiannessOkay_;
36 constructor(value: number);
37 readonly shape: Shape;
38 /** Get the Int32Array that represents the int64 value. */
39 readonly valueArray: Int32Array;
40}