UNPKG

@tensorflow/tfjs-converter

Version:

Tensorflow model converter for javascript

1 lines 1.97 MB
{"version":3,"file":"tf-converter.min.js","sources":["../../../../tfjs-converter/src/flags.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../tfjs-converter/src/data/compiled_api.ts","../../../../tfjs-converter/src/operations/custom_op/register.ts","../../../../tfjs-converter/src/operations/executors/utils.ts","../../../../tfjs-converter/src/operations/op_list/arithmetic.ts","../../../../tfjs-converter/src/operations/op_list/basic_math.ts","../../../../tfjs-converter/src/operations/op_list/control.ts","../../../../tfjs-converter/src/operations/op_list/convolution.ts","../../../../tfjs-converter/src/operations/op_list/creation.ts","../../../../tfjs-converter/src/operations/op_list/dynamic.ts","../../../../tfjs-converter/src/operations/op_list/evaluation.ts","../../../../tfjs-converter/src/operations/op_list/graph.ts","../../../../tfjs-converter/src/operations/op_list/hash_table.ts","../../../../tfjs-converter/src/operations/op_list/image.ts","../../../../tfjs-converter/src/operations/op_list/logical.ts","../../../../tfjs-converter/src/operations/op_list/matrices.ts","../../../../tfjs-converter/src/operations/op_list/normalization.ts","../../../../tfjs-converter/src/operations/op_list/reduction.ts","../../../../tfjs-converter/src/operations/op_list/slice_join.ts","../../../../tfjs-converter/src/operations/op_list/sparse.ts","../../../../tfjs-converter/src/operations/op_list/spectral.ts","../../../../tfjs-converter/src/operations/op_list/string.ts","../../../../tfjs-converter/src/operations/op_list/transformation.ts","../../../../tfjs-converter/src/operations/operation_mapper.ts","../../../../tfjs-converter/src/operations/custom_op/node_value_impl.ts","../../../../../tfjs-core/src/backends/backend.ts","../../../../../tfjs-core/src/util_base.ts","../../../../../tfjs-core/src/environment.ts","../../../../../tfjs-core/src/global_util.ts","../../../../../tfjs-core/src/kernel_names.ts","../../../../../tfjs-core/src/log.ts","../../../../../tfjs-core/src/kernel_registry.ts","../../../../node_modules/long/src/long.js","../../../../../tfjs-core/src/hash_util.ts","../../../../../tfjs-core/src/util.ts","../../../../../tfjs-core/src/platforms/is_typed_array_browser.ts","../../../../../tfjs-core/src/profiler.ts","../../../../../tfjs-core/src/tensor_format.ts","../../../../../tfjs-core/src/tensor.ts","../../../../../tfjs-core/src/types.ts","../../../../../tfjs-core/src/tensor_util.ts","../../../../../tfjs-core/src/engine.ts","../../../../../tfjs-core/src/tape.ts","../../../../../tfjs-core/src/tensor_util_env.ts","../../../../../tfjs-core/src/ops/operation.ts","../../../../../tfjs-core/src/ops/abs.ts","../../../../../tfjs-core/src/ops/acos.ts","../../../../../tfjs-core/src/ops/acosh.ts","../../../../../tfjs-core/src/ops/add.ts","../../../../../tfjs-core/src/ops/add_n.ts","../../../../../tfjs-core/src/ops/all.ts","../../../../../tfjs-core/src/ops/any.ts","../../../../../tfjs-core/src/ops/arg_max.ts","../../../../../tfjs-core/src/ops/arg_min.ts","../../../../../tfjs-core/src/ops/asin.ts","../../../../../tfjs-core/src/ops/asinh.ts","../../../../../tfjs-core/src/ops/atan.ts","../../../../../tfjs-core/src/ops/atan2.ts","../../../../../tfjs-core/src/ops/atanh.ts","../../../../../tfjs-core/src/ops/cast.ts","../../../../../tfjs-core/src/ops/conv_util.ts","../../../../../tfjs-core/src/ops/reshape.ts","../../../../../tfjs-core/src/ops/avg_pool.ts","../../../../../tfjs-core/src/ops/avg_pool_3d.ts","../../../../../tfjs-core/src/ops/clone.ts","../../../../../tfjs-core/src/ops/concat.ts","../../../../../tfjs-core/src/ops/mat_mul.ts","../../../../../tfjs-core/src/ops/mul.ts","../../../../../tfjs-core/src/ops/sigmoid.ts","../../../../../tfjs-core/src/ops/slice.ts","../../../../../tfjs-core/src/ops/tanh.ts","../../../../../tfjs-core/src/ops/basic_lstm_cell.ts","../../../../../tfjs-core/src/ops/batch_to_space_nd.ts","../../../../../tfjs-core/src/ops/batchnorm.ts","../../../../../tfjs-core/src/ops/batchnorm_util.ts","../../../../../tfjs-core/src/ops/batchnorm2d.ts","../../../../../tfjs-core/src/ops/batchnorm3d.ts","../../../../../tfjs-core/src/ops/batchnorm4d.ts","../../../../../tfjs-core/src/ops/bincount.ts","../../../../../tfjs-core/src/ops/bitwise_and.ts","../../../../../tfjs-core/src/ops/broadcast_args.ts","../../../../../tfjs-core/src/ops/broadcast_to.ts","../../../../../tfjs-core/src/ops/buffer.ts","../../../../../tfjs-core/src/ops/ceil.ts","../../../../../tfjs-core/src/ops/fill.ts","../../../../../tfjs-core/src/ops/clip_by_value.ts","../../../../../tfjs-core/src/ops/complex.ts","../../../../../tfjs-core/src/ops/concat_1d.ts","../../../../../tfjs-core/src/ops/concat_2d.ts","../../../../../tfjs-core/src/ops/concat_3d.ts","../../../../../tfjs-core/src/ops/concat_4d.ts","../../../../../tfjs-core/src/ops/conv2d.ts","../../../../../tfjs-core/src/ops/conv1d.ts","../../../../../tfjs-core/src/ops/conv2d_backprop_input.ts","../../../../../tfjs-core/src/ops/conv2d_transpose.ts","../../../../../tfjs-core/src/ops/conv3d.ts","../../../../../tfjs-core/src/ops/conv3d_backprop_input.ts","../../../../../tfjs-core/src/ops/conv3d_transpose.ts","../../../../../tfjs-core/src/ops/cos.ts","../../../../../tfjs-core/src/ops/cosh.ts","../../../../../tfjs-core/src/ops/cumprod.ts","../../../../../tfjs-core/src/ops/cumsum.ts","../../../../../tfjs-core/src/ops/dense_bincount.ts","../../../../../tfjs-core/src/ops/depth_to_space.ts","../../../../../tfjs-core/src/ops/depthwise_conv2d.ts","../../../../../tfjs-core/src/ops/diag.ts","../../../../../tfjs-core/src/ops/dilation2d.ts","../../../../../tfjs-core/src/ops/floorDiv.ts","../../../../../tfjs-core/src/ops/div.ts","../../../../../tfjs-core/src/ops/broadcast_util.ts","../../../../../tfjs-core/src/ops/equal.ts","../../../../../tfjs-core/src/ops/where.ts","../../../../../tfjs-core/src/ops/zeros_like.ts","../../../../../tfjs-core/src/ops/div_no_nan.ts","../../../../../tfjs-core/src/ops/dot.ts","../../../../../tfjs-core/src/ops/einsum.ts","../../../../../tfjs-core/src/ops/elu.ts","../../../../../tfjs-core/src/ops/ensure_shape.ts","../../../../../tfjs-core/src/ops/erf.ts","../../../../../tfjs-core/src/ops/axis_util.ts","../../../../../tfjs-core/src/ops/max.ts","../../../../../tfjs-core/src/ops/min.ts","../../../../../tfjs-core/src/ops/pow.ts","../../../../../tfjs-core/src/ops/tensor_ops_util.ts","../../../../../tfjs-core/src/ops/scalar.ts","../../../../../tfjs-core/src/ops/sqrt.ts","../../../../../tfjs-core/src/ops/square.ts","../../../../../tfjs-core/src/ops/sum.ts","../../../../../tfjs-core/src/ops/norm.ts","../../../../../tfjs-core/src/ops/euclidean_norm.ts","../../../../../tfjs-core/src/ops/exp.ts","../../../../../tfjs-core/src/ops/expand_dims.ts","../../../../../tfjs-core/src/ops/expm1.ts","../../../../../tfjs-core/src/ops/tile.ts","../../../../../tfjs-core/src/ops/eye.ts","../../../../../tfjs-core/src/ops/floor.ts","../../../../../tfjs-core/src/ops/gather.ts","../../../../../tfjs-core/src/ops/greater.ts","../../../../../tfjs-core/src/ops/greater_equal.ts","../../../../../tfjs-core/src/ops/imag.ts","../../../../../tfjs-core/src/ops/is_finite.ts","../../../../../tfjs-core/src/ops/is_inf.ts","../../../../../tfjs-core/src/ops/is_nan.ts","../../../../../tfjs-core/src/ops/leaky_relu.ts","../../../../../tfjs-core/src/ops/less.ts","../../../../../tfjs-core/src/ops/less_equal.ts","../../../../../tfjs-core/src/ops/local_response_normalization.ts","../../../../../tfjs-core/src/ops/log.ts","../../../../../tfjs-core/src/ops/log1p.ts","../../../../../tfjs-core/src/gradients.ts","../../../../../tfjs-core/src/ops/neg.ts","../../../../../tfjs-core/src/ops/softplus.ts","../../../../../tfjs-core/src/ops/log_sigmoid.ts","../../../../../tfjs-core/src/ops/sub.ts","../../../../../tfjs-core/src/ops/log_softmax.ts","../../../../../tfjs-core/src/ops/log_sum_exp.ts","../../../../../tfjs-core/src/ops/logical_and.ts","../../../../../tfjs-core/src/ops/logical_not.ts","../../../../../tfjs-core/src/ops/logical_or.ts","../../../../../tfjs-core/src/ops/logical_xor.ts","../../../../../tfjs-core/src/ops/search_sorted.ts","../../../../../tfjs-core/src/ops/max_pool.ts","../../../../../tfjs-core/src/ops/max_pool_3d.ts","../../../../../tfjs-core/src/ops/max_pool_with_argmax.ts","../../../../../tfjs-core/src/ops/maximum.ts","../../../../../tfjs-core/src/ops/mean.ts","../../../../../tfjs-core/src/ops/zeros.ts","../../../../../tfjs-core/src/ops/ones.ts","../../../../../tfjs-core/src/ops/minimum.ts","../../../../../tfjs-core/src/ops/mirror_pad.ts","../../../../../tfjs-core/src/ops/mod.ts","../../../../../tfjs-core/src/ops/moments.ts","../../../../../tfjs-core/src/ops/multi_rnn_cell.ts","../../../../../tfjs-core/src/ops/multinomial.ts","../../../../../tfjs-core/src/ops/not_equal.ts","../../../../../tfjs-core/src/ops/one_hot.ts","../../../../../tfjs-core/src/ops/ones_like.ts","../../../../../tfjs-core/src/ops/outer_product.ts","../../../../../tfjs-core/src/ops/pad.ts","../../../../../tfjs-core/src/ops/pad1d.ts","../../../../../tfjs-core/src/ops/pad2d.ts","../../../../../tfjs-core/src/ops/pad3d.ts","../../../../../tfjs-core/src/ops/pad4d.ts","../../../../../tfjs-core/src/ops/space_to_batch_nd.ts","../../../../../tfjs-core/src/ops/pool.ts","../../../../../tfjs-core/src/ops/prelu.ts","../../../../../tfjs-core/src/ops/prod.ts","../../../../../tfjs-core/src/ops/ragged_gather.ts","../../../../../tfjs-core/src/ops/ragged_range.ts","../../../../../tfjs-core/src/ops/ragged_tensor_to_tensor.ts","../../../../../tfjs-core/src/ops/rand.ts","../../../../node_modules/seedrandom/lib/alea.js","../../../../node_modules/seedrandom/lib/xor128.js","../../../../node_modules/seedrandom/lib/xorwow.js","../../../../node_modules/seedrandom/lib/xorshift7.js","../../../../node_modules/seedrandom/lib/xor4096.js","../../../../node_modules/seedrandom/lib/tychei.js","../../../../node_modules/seedrandom/seedrandom.js","../../../../node_modules/seedrandom/index.js","../../../../../tfjs-core/src/ops/rand_util.ts","../../../../../tfjs-core/src/ops/random_gamma.ts","../../../../../tfjs-core/src/ops/random_normal.ts","../../../../../tfjs-core/src/ops/random_standard_normal.ts","../../../../../tfjs-core/src/ops/random_uniform.ts","../../../../../tfjs-core/src/ops/random_uniform_int.ts","../../../../../tfjs-core/src/ops/range.ts","../../../../../tfjs-core/src/ops/real.ts","../../../../../tfjs-core/src/ops/reciprocal.ts","../../../../../tfjs-core/src/ops/relu.ts","../../../../../tfjs-core/src/ops/relu6.ts","../../../../../tfjs-core/src/ops/reverse.ts","../../../../../tfjs-core/src/ops/reverse_1d.ts","../../../../../tfjs-core/src/ops/reverse_2d.ts","../../../../../tfjs-core/src/ops/reverse_3d.ts","../../../../../tfjs-core/src/ops/reverse_4d.ts","../../../../../tfjs-core/src/ops/round.ts","../../../../../tfjs-core/src/ops/rsqrt.ts","../../../../../tfjs-core/src/ops/selu.ts","../../../../../tfjs-core/src/ops/separable_conv2d.ts","../../../../../tfjs-core/src/ops/setdiff1d_async.ts","../../../../../tfjs-core/src/ops/sign.ts","../../../../../tfjs-core/src/ops/sin.ts","../../../../../tfjs-core/src/ops/sinh.ts","../../../../../tfjs-core/src/ops/slice1d.ts","../../../../../tfjs-core/src/ops/slice2d.ts","../../../../../tfjs-core/src/ops/slice3d.ts","../../../../../tfjs-core/src/ops/slice4d.ts","../../../../../tfjs-core/src/ops/softmax.ts","../../../../../tfjs-core/src/ops/spectral/fft.ts","../../../../../tfjs-core/src/ops/spectral/ifft.ts","../../../../../tfjs-core/src/ops/spectral/irfft.ts","../../../../../tfjs-core/src/ops/split.ts","../../../../../tfjs-core/src/ops/spectral/rfft.ts","../../../../../tfjs-core/src/ops/squared_difference.ts","../../../../../tfjs-core/src/ops/squeeze.ts","../../../../../tfjs-core/src/ops/stack.ts","../../../../../tfjs-core/src/ops/step.ts","../../../../../tfjs-core/src/ops/strided_slice.ts","../../../../../tfjs-core/src/ops/tan.ts","../../../../../tfjs-core/src/ops/tensor.ts","../../../../../tfjs-core/src/ops/tensor1d.ts","../../../../../tfjs-core/src/ops/tensor2d.ts","../../../../../tfjs-core/src/ops/scatter_nd_util.ts","../../../../../tfjs-core/src/ops/tensor_scatter_update.ts","../../../../../tfjs-core/src/ops/topk.ts","../../../../../tfjs-core/src/ops/truncated_normal.ts","../../../../../tfjs-core/src/ops/unique.ts","../../../../../tfjs-core/src/ops/unsorted_segment_sum.ts","../../../../../tfjs-core/src/ops/unstack.ts","../../../../../tfjs-core/src/ops/where_async.ts","../../../../../tfjs-core/src/backends/where_impl.ts","../../../../../tfjs-core/src/ops/boolean_mask.ts","../../../../../tfjs-core/src/ops/transpose.ts","../../../../../tfjs-core/src/globals.ts","../../../../../tfjs-core/src/ops/moving_average.ts","../../../../../tfjs-core/src/ops/scatter_nd.ts","../../../../../tfjs-core/src/ops/sparse_to_dense.ts","../../../../../tfjs-core/src/ops/sparse_to_dense_util.ts","../../../../../tfjs-core/src/ops/gather_nd.ts","../../../../../tfjs-core/src/ops/dropout.ts","../../../../../tfjs-core/src/ops/dropout_util.ts","../../../../../tfjs-core/src/ops/signal_ops_util.ts","../../../../../tfjs-core/src/ops/in_top_k.ts","../../../../../tfjs-core/src/ops/conv2d_backprop_filter.ts","../../../../../tfjs-core/src/ops/fused_util.ts","../../../../../tfjs-core/src/ops/fused/conv2d.ts","../../../../../tfjs-core/src/ops/depthwise_conv2d_native_backprop_filter.ts","../../../../../tfjs-core/src/ops/depthwise_conv2d_native_backprop_input.ts","../../../../../tfjs-core/src/ops/fused/depthwise_conv2d.ts","../../../../../tfjs-core/src/ops/fused/mat_mul.ts","../../../../../tfjs-core/src/ops/signal/hamming_window.ts","../../../../../tfjs-core/src/ops/signal/hann_window.ts","../../../../../tfjs-core/src/ops/signal/frame.ts","../../../../../tfjs-core/src/ops/signal/stft.ts","../../../../../tfjs-core/src/ops/image/crop_and_resize.ts","../../../../../tfjs-core/src/ops/image/flip_left_right.ts","../../../../../tfjs-core/src/ops/image/grayscale_to_rgb.ts","../../../../../tfjs-core/src/ops/image/rgb_to_grayscale.ts","../../../../../tfjs-core/src/ops/image/rotate_with_offset.ts","../../../../../tfjs-core/src/ops/nonmax_util.ts","../../../../../tfjs-core/src/ops/image/non_max_suppression.ts","../../../../../tfjs-core/src/backends/non_max_suppression_util.ts","../../../../../tfjs-core/src/backends/non_max_suppression_impl.ts","../../../../../tfjs-core/src/ops/image/non_max_suppression_async.ts","../../../../../tfjs-core/src/ops/image/non_max_suppression_with_score.ts","../../../../../tfjs-core/src/ops/image/non_max_suppression_with_score_async.ts","../../../../../tfjs-core/src/ops/image/non_max_suppression_padded.ts","../../../../../tfjs-core/src/ops/image/non_max_suppression_padded_async.ts","../../../../../tfjs-core/src/ops/image/resize_bilinear.ts","../../../../../tfjs-core/src/ops/image/resize_nearest_neighbor.ts","../../../../../tfjs-core/src/ops/image/threshold.ts","../../../../../tfjs-core/src/ops/image/transform.ts","../../../../../tfjs-core/src/ops/linalg/band_part.ts","../../../../../tfjs-core/src/ops/linalg/gram_schmidt.ts","../../../../../tfjs-core/src/ops/linalg/qr.ts","../../../../../tfjs-core/src/ops/loss_ops_utils.ts","../../../../../tfjs-core/src/ops/losses/compute_weighted_loss.ts","../../../../../tfjs-core/src/ops/losses/absolute_difference.ts","../../../../../tfjs-core/src/ops/losses/cosine_distance.ts","../../../../../tfjs-core/src/ops/losses/hinge_loss.ts","../../../../../tfjs-core/src/ops/losses/huber_loss.ts","../../../../../tfjs-core/src/ops/losses/log_loss.ts","../../../../../tfjs-core/src/ops/losses/mean_squared_error.ts","../../../../../tfjs-core/src/ops/losses/sigmoid_cross_entropy.ts","../../../../../tfjs-core/src/ops/losses/softmax_cross_entropy.ts","../../../../../tfjs-core/src/ops/sparse/sparse_fill_empty_rows.ts","../../../../../tfjs-core/src/ops/sparse/sparse_reshape.ts","../../../../../tfjs-core/src/ops/sparse/sparse_segment_mean.ts","../../../../../tfjs-core/src/ops/sparse/sparse_segment_sum.ts","../../../../../tfjs-core/src/ops/string/string_n_grams.ts","../../../../../tfjs-core/src/ops/string/static_regex_replace.ts","../../../../../tfjs-core/src/ops/ops.ts","../../../../../tfjs-core/src/ops/linspace.ts","../../../../../tfjs-core/src/ops/lower_bound.ts","../../../../../tfjs-core/src/ops/meshgrid.ts","../../../../../tfjs-core/src/ops/print.ts","../../../../../tfjs-core/src/ops/string/string_split.ts","../../../../../tfjs-core/src/ops/string/string_to_hash_bucket_fast.ts","../../../../../tfjs-core/src/ops/tensor3d.ts","../../../../../tfjs-core/src/ops/tensor4d.ts","../../../../../tfjs-core/src/ops/tensor5d.ts","../../../../../tfjs-core/src/ops/tensor6d.ts","../../../../../tfjs-core/src/ops/upper_bound.ts","../../../../../tfjs-core/src/ops/variable.ts","../../../../tfjs-converter/src/executor/tensor_utils.ts","../../../../tfjs-converter/src/executor/tensor_array.ts","../../../../tfjs-converter/src/executor/tensor_list.ts","../../../../tfjs-converter/src/operations/executors/control_executor.ts","../../../../tfjs-converter/src/operations/executors/convolution_executor.ts","../../../../tfjs-converter/src/operations/executors/dynamic_executor.ts","../../../../tfjs-converter/src/executor/hash_table.ts","../../../../tfjs-converter/src/operations/operation_executor.ts","../../../../tfjs-converter/src/operations/executors/arithmetic_executor.ts","../../../../tfjs-converter/src/operations/executors/basic_math_executor.ts","../../../../tfjs-converter/src/operations/executors/creation_executor.ts","../../../../tfjs-converter/src/operations/executors/evaluation_executor.ts","../../../../tfjs-converter/src/operations/executors/image_executor.ts","../../../../tfjs-converter/src/operations/executors/graph_executor.ts","../../../../tfjs-converter/src/operations/executors/logical_executor.ts","../../../../tfjs-converter/src/operations/executors/matrices_executor.ts","../../../../tfjs-converter/src/operations/executors/normalization_executor.ts","../../../../tfjs-converter/src/operations/executors/ragged_executor.ts","../../../../tfjs-converter/src/operations/executors/reduction_executor.ts","../../../../tfjs-converter/src/operations/executors/slice_join_executor.ts","../../../../tfjs-converter/src/operations/executors/sparse_executor.ts","../../../../tfjs-converter/src/operations/executors/spectral_executor.ts","../../../../tfjs-converter/src/operations/executors/string_executor.ts","../../../../tfjs-converter/src/operations/executors/transformation_executor.ts","../../../../tfjs-converter/src/operations/executors/hash_table_executor.ts","../../../../tfjs-converter/src/executor/execution_context.ts","../../../../tfjs-converter/src/executor/model_analysis.ts","../../../../tfjs-converter/src/executor/graph_executor.ts","../../../../tfjs-converter/src/executor/resource_manager.ts","../../../../../tfjs-core/src/io/types.ts","../../../../../tfjs-core/src/io/io_utils.ts","../../../../tfjs-converter/src/executor/graph_model.ts","../../../../tfjs-converter/src/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * =============================================================================\n */\n\nimport {env} from '@tensorflow/tfjs-core';\n\nconst ENV = env();\n\n/** Whether to keep intermediate tensors. */\nENV.registerFlag('KEEP_INTERMEDIATE_TENSORS', () => false, debugValue => {\n if (debugValue) {\n console.warn(\n 'Keep intermediate tensors is ON. This will print the values of all ' +\n 'intermediate tensors during model inference. Not all models ' +\n 'support this mode. For details, check e2e/benchmarks/ ' +\n 'model_config.js. This significantly impacts performance.');\n }\n});\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/**\n * @license\n * Copyright 2019 Google LLC. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * =============================================================================\n */\n\n/* tslint:disable */\n\n/** Properties of an Any. */\nexport declare interface IAny {\n /** Any typeUrl */\n typeUrl?: (string|null);\n\n /** Any value */\n value?: (Uint8Array|null);\n}\n\n/** DataType enum. */\nexport enum DataType {\n // These properties must be quoted since they are used by parseDtypeParam\n // in tfjs-converter/src/operations/operation_mapper.ts to look up dtypes\n // by string name. If they are not quoted, Closure will mangle their names.\n\n // Not a legal value for DataType. Used to indicate a DataType field\n // has not been set.\n 'DT_INVALID' = 0,\n\n // Data types that all computation devices are expected to be\n // capable to support.\n 'DT_FLOAT' = 1,\n 'DT_DOUBLE' = 2,\n 'DT_INT32' = 3,\n 'DT_UINT8' = 4,\n 'DT_INT16' = 5,\n 'DT_INT8' = 6,\n 'DT_STRING' = 7,\n 'DT_COMPLEX64' = 8, // Single-precision complex\n 'DT_INT64' = 9,\n 'DT_BOOL' = 10,\n 'DT_QINT8' = 11, // Quantized int8\n 'DT_QUINT8' = 12, // Quantized uint8\n 'DT_QINT32' = 13, // Quantized int32\n 'DT_BFLOAT16' = 14, // Float32 truncated to 16 bits. Only for cast ops.\n 'DT_QINT16' = 15, // Quantized int16\n 'DT_QUINT16' = 16, // Quantized uint16\n 'DT_UINT16' = 17,\n 'DT_COMPLEX128' = 18, // Double-precision complex\n 'DT_HALF' = 19,\n 'DT_RESOURCE' = 20,\n 'DT_VARIANT' = 21, // Arbitrary C++ data types\n 'DT_UINT32' = 22,\n 'DT_UINT64' = 23,\n\n // Do not use! These are only for parameters. Every enum above\n // should have a corresponding value below (verified by types_test).\n 'DT_FLOAT_REF' = 101,\n 'DT_DOUBLE_REF' = 102,\n 'DT_INT32_REF' = 103,\n 'DT_UINT8_REF' = 104,\n 'DT_INT16_REF' = 105,\n 'DT_INT8_REF' = 106,\n 'DT_STRING_REF' = 107,\n 'DT_COMPLEX64_REF' = 108,\n 'DT_INT64_REF' = 109,\n 'DT_BOOL_REF' = 110,\n 'DT_QINT8_REF' = 111,\n 'DT_QUINT8_REF' = 112,\n 'DT_QINT32_REF' = 113,\n 'DT_BFLOAT16_REF' = 114,\n 'DT_QINT16_REF' = 115,\n 'DT_QUINT16_REF' = 116,\n 'DT_UINT16_REF' = 117,\n 'DT_COMPLEX128_REF' = 118,\n 'DT_HALF_REF' = 119,\n 'DT_RESOURCE_REF' = 120,\n 'DT_VARIANT_REF' = 121,\n 'DT_UINT32_REF' = 122,\n 'DT_UINT64_REF' = 123,\n}\n\n/** Properties of a TensorShape. */\nexport declare interface ITensorShape {\n /** TensorShape dim */\n dim?: (TensorShape.IDim[]|null);\n\n /** TensorShape unknownRank */\n unknownRank?: (boolean|null);\n}\n\nexport namespace TensorShape {\n /** Properties of a Dim. */\n export declare interface IDim {\n /** Dim size */\n size?: (number|string|null);\n\n /** Dim name */\n name?: (string|null);\n }\n}\n\n/** Properties of a Tensor. */\nexport declare interface ITensor {\n /** Tensor dtype */\n dtype?: (DataType|null);\n\n /** Tensor tensorShape */\n tensorShape?: (ITensorShape|null);\n\n /** Tensor versionNumber */\n versionNumber?: (number|null);\n\n /** Tensor tensorContent */\n tensorContent?: (Uint8Array|null);\n\n /** Tensor floatVal */\n floatVal?: (number[]|null);\n\n /** Tensor doubleVal */\n doubleVal?: (number[]|null);\n\n /** Tensor intVal */\n intVal?: (number[]|null);\n\n /** Tensor stringVal */\n stringVal?: (Uint8Array[]|null);\n\n /** Tensor scomplexVal */\n scomplexVal?: (number[]|null);\n\n /** Tensor int64Val */\n int64Val?: ((number | string)[]|null);\n\n /** Tensor boolVal */\n boolVal?: (boolean[]|null);\n\n /** Tensor uint32Val */\n uint32Val?: (number[]|null);\n\n /** Tensor uint64Val */\n uint64Val?: ((number | string)[]|null);\n}\n\n/** Properties of an AttrValue. */\nexport declare interface IAttrValue {\n /** AttrValue list */\n list?: (AttrValue.IListValue|null);\n\n /** AttrValue s */\n s?: (string|null);\n\n /** AttrValue i */\n i?: (number|string|null);\n\n /** AttrValue f */\n f?: (number|null);\n\n /** AttrValue b */\n b?: (boolean|null);\n\n /** AttrValue type */\n type?: (DataType|null);\n\n /** AttrValue shape */\n shape?: (ITensorShape|null);\n\n /** AttrValue tensor */\n tensor?: (ITensor|null);\n\n /** AttrValue placeholder */\n placeholder?: (string|null);\n\n /** AttrValue func */\n func?: (INameAttrList|null);\n}\n\nexport namespace AttrValue {\n /** Properties of a ListValue. */\n export declare interface IListValue {\n /** ListValue s */\n s?: (string[]|null);\n\n /** ListValue i */\n i?: ((number | string)[]|null);\n\n /** ListValue f */\n f?: (number[]|null);\n\n /** ListValue b */\n b?: (boolean[]|null);\n\n /** ListValue type */\n type?: (DataType[]|null);\n\n /** ListValue shape */\n shape?: (ITensorShape[]|null);\n\n /** ListValue tensor */\n tensor?: (ITensor[]|null);\n\n /** ListValue func */\n func?: (INameAttrList[]|null);\n }\n}\n\n/** Properties of a NameAttrList. */\nexport declare interface INameAttrList {\n /** NameAttrList name */\n name?: (string|null);\n\n /** NameAttrList attr */\n attr?: ({[k: string]: IAttrValue}|null);\n}\n\n/** Properties of a NodeDef. */\nexport declare interface INodeDef {\n /** NodeDef name */\n name?: (string|null);\n\n /** NodeDef op */\n op?: (string|null);\n\n /** NodeDef input */\n input?: (string[]|null);\n\n /** NodeDef device */\n device?: (string|null);\n\n /** NodeDef attr */\n attr?: ({[k: string]: IAttrValue}|null);\n}\n\n/** Properties of a VersionDef. */\nexport declare interface IVersionDef {\n /** VersionDef producer */\n producer?: (number|null);\n\n /** VersionDef minConsumer */\n minConsumer?: (number|null);\n\n /** VersionDef badConsumers */\n badConsumers?: (number[]|null);\n}\n\n/** Properties of a GraphDef. */\nexport declare interface IGraphDef {\n /** GraphDef node */\n node?: (INodeDef[]|null);\n\n /** GraphDef versions */\n versions?: (IVersionDef|null);\n\n /** GraphDef library */\n library?: (IFunctionDefLibrary|null);\n}\n\n/** Properties of a CollectionDef. */\nexport declare interface ICollectionDef {\n /** CollectionDef nodeList */\n nodeList?: (CollectionDef.INodeList|null);\n\n /** CollectionDef bytesList */\n bytesList?: (CollectionDef.IBytesList|null);\n\n /** CollectionDef int64List */\n int64List?: (CollectionDef.IInt64List|null);\n\n /** CollectionDef floatList */\n floatList?: (CollectionDef.IFloatList|null);\n\n /** CollectionDef anyList */\n anyList?: (CollectionDef.IAnyList|null);\n}\n\nexport namespace CollectionDef {\n /** Properties of a NodeList. */\n export declare interface INodeList {\n /** NodeList value */\n value?: (string[]|null);\n }\n\n /** Properties of a BytesList. */\n export declare interface IBytesList {\n /** BytesList value */\n value?: (Uint8Array[]|null);\n }\n\n /** Properties of an Int64List. */\n export declare interface IInt64List {\n /** Int64List value */\n value?: ((number | string)[]|null);\n }\n\n /** Properties of a FloatList. */\n export declare interface IFloatList {\n /** FloatList value */\n value?: (number[]|null);\n }\n\n /** Properties of an AnyList. */\n export declare interface IAnyList {\n /** AnyList value */\n value?: (IAny[]|null);\n }\n}\n\n/** Properties of a SaverDef. */\nexport declare interface ISaverDef {\n /** SaverDef filenameTensorName */\n filenameTensorName?: (string|null);\n\n /** SaverDef saveTensorName */\n saveTensorName?: (string|null);\n\n /** SaverDef restoreOpName */\n restoreOpName?: (string|null);\n\n /** SaverDef maxToKeep */\n maxToKeep?: (number|null);\n\n /** SaverDef sharded */\n sharded?: (boolean|null);\n\n /** SaverDef keepCheckpointEveryNHours */\n keepCheckpointEveryNHours?: (number|null);\n\n /** SaverDef version */\n version?: (SaverDef.CheckpointFormatVersion|null);\n}\n\nexport namespace SaverDef {\n /** CheckpointFormatVersion enum. */\n export enum CheckpointFormatVersion {'LEGACY' = 0, 'V1' = 1, 'V2' = 2}\n}\n\n/** Properties of a TensorInfo. */\nexport declare interface ITensorInfo {\n /** TensorInfo name */\n name?: (string|null);\n\n /** TensorInfo cooSparse */\n cooSparse?: (TensorInfo.ICooSparse|null);\n\n /** TensorInfo dtype */\n dtype?: (DataType|string|null);\n\n /** TensorInfo tensorShape */\n tensorShape?: (ITensorShape|null);\n\n /** Resource id tensor was originally assigned to. */\n resourceId?: (number|null);\n}\n\nexport namespace TensorInfo {\n /** Properties of a CooSparse. */\n export declare interface ICooSparse {\n /** CooSparse valuesTensorName */\n valuesTensorName?: (string|null);\n\n /** CooSparse indicesTensorName */\n indicesTensorName?: (string|null);\n\n /** CooSparse denseShapeTensorName */\n denseShapeTensorName?: (string|null);\n }\n}\n\n/** Properties of a SignatureDef. */\nexport declare interface ISignatureDef {\n /** SignatureDef inputs */\n inputs?: ({[k: string]: ITensorInfo}|null);\n\n /** SignatureDef outputs */\n outputs?: ({[k: string]: ITensorInfo}|null);\n\n /** SignatureDef methodName */\n methodName?: (string|null);\n}\n\n/** Properties of an AssetFileDef. */\nexport declare interface IAssetFileDef {\n /** AssetFileDef tensorInfo */\n tensorInfo?: (ITensorInfo|null);\n\n /** AssetFileDef filename */\n filename?: (string|null);\n}\n\n/** Properties of an OpDef. */\nexport declare interface IOpDef {\n /** OpDef name */\n name?: (string|null);\n\n /** OpDef inputArg */\n inputArg?: (OpDef.IArgDef[]|null);\n\n /** OpDef outputArg */\n outputArg?: (OpDef.IArgDef[]|null);\n\n /** OpDef attr */\n attr?: (OpDef.IAttrDef[]|null);\n\n /** OpDef deprecation */\n deprecation?: (OpDef.IOpDeprecation|null);\n\n /** OpDef summary */\n summary?: (string|null);\n\n /** OpDef description */\n description?: (string|null);\n\n /** OpDef isCommutative */\n isCommutative?: (boolean|null);\n\n /** OpDef isAggregate */\n isAggregate?: (boolean|null);\n\n /** OpDef isStateful */\n isStateful?: (boolean|null);\n\n /** OpDef allowsUninitializedInput */\n allowsUninitializedInput?: (boolean|null);\n}\n\nexport namespace OpDef {\n /** Properties of an ArgDef. */\n export declare interface IArgDef {\n /** ArgDef name */\n name?: (string|null);\n\n /** ArgDef description */\n description?: (string|null);\n\n /** ArgDef type */\n type?: (DataType|null);\n\n /** ArgDef typeAttr */\n typeAttr?: (string|null);\n\n /** ArgDef numberAttr */\n numberAttr?: (string|null);\n\n /** ArgDef typeListAttr */\n typeListAttr?: (string|null);\n\n /** ArgDef isRef */\n isRef?: (boolean|null);\n }\n\n /** Properties of an AttrDef. */\n export declare interface IAttrDef {\n /** AttrDef name */\n name?: (string|null);\n\n /** AttrDef type */\n type?: (string|null);\n\n /** AttrDef defaultValue */\n defaultValue?: (IAttrValue|null);\n\n /** AttrDef description */\n description?: (string|null);\n\n /** AttrDef hasMinimum */\n hasMinimum?: (boolean|null);\n\n /** AttrDef minimum */\n minimum?: (number|string|null);\n\n /** AttrDef allowedValues */\n allowedValues?: (IAttrValue|null);\n }\n\n /** Properties of an OpDeprecation. */\n export declare interface IOpDeprecation {\n /** OpDeprecation version */\n version?: (number|null);\n\n /** OpDeprecation explanation */\n explanation?: (string|null);\n }\n}\n\n/** Properties of an OpList. */\nexport declare interface IOpList {\n /** OpList op */\n op?: (IOpDef[]|null);\n}\n\n/** Properties of a MetaGraphDef. */\nexport declare interface IMetaGraphDef {\n /** MetaGraphDef metaInfoDef */\n metaInfoDef?: (MetaGraphDef.IMetaInfoDef|null);\n\n /** MetaGraphDef graphDef */\n graphDef?: (IGraphDef|null);\n\n /** MetaGraphDef saverDef */\n saverDef?: (ISaverDef|null);\n\n /** MetaGraphDef collectionDef */\n collectionDef?: ({[k: string]: ICollectionDef}|null);\n\n /** MetaGraphDef signatureDef */\n signatureDef?: ({[k: string]: ISignatureDef}|null);\n\n /** MetaGraphDef assetFileDef */\n assetFileDef?: (IAssetFileDef[]|null);\n}\n\nexport namespace MetaGraphDef {\n /** Properties of a MetaInfoDef. */\n export declare interface IMetaInfoDef {\n /** MetaInfoDef metaGraphVersion */\n metaGraphVersion?: (string|null);\n\n /** MetaInfoDef strippedOpList */\n strippedOpList?: (IOpList|null);\n\n /** MetaInfoDef anyInfo */\n anyInfo?: (IAny|null);\n\n /** MetaInfoDef tags */\n tags?: (string[]|null);\n\n /** MetaInfoDef tensorflowVersion */\n tensorflowVersion?: (string|null);\n\n /** MetaInfoDef tensorflowGitVersion */\n tensorflowGitVersion?: (string|null);\n }\n}\n\n/** Properties of a SavedModel. */\nexport declare interface ISavedModel {\n /** SavedModel savedModelSchemaVersion */\n savedModelSchemaVersion?: (number|string|null);\n\n /** SavedModel metaGraphs */\n metaGraphs?: (IMetaGraphDef[]|null);\n}\n\n/** Properties of a FunctionDefLibrary. */\nexport declare interface IFunctionDefLibrary {\n /** FunctionDefLibrary function */\n 'function'?: (IFunctionDef[]|null);\n\n /** FunctionDefLibrary gradient */\n gradient?: (IGradientDef[]|null);\n}\n\n/** Properties of a FunctionDef. */\nexport declare interface IFunctionDef {\n /** FunctionDef signature */\n signature?: (IOpDef|null);\n\n /** FunctionDef attr */\n attr?: ({[k: string]: IAttrValue}|null);\n\n /** FunctionDef nodeDef */\n nodeDef?: (INodeDef[]|null);\n\n /** FunctionDef ret */\n ret?: ({[k: string]: string}|null);\n}\n\n/** Properties of a GradientDef. */\nexport declare interface IGradientDef {\n /** GradientDef functionName */\n functionName?: (string|null);\n\n /** GradientDef gradientFunc */\n gradientFunc?: (string|null);\n}\n","\n/**\n * @license\n * Copyright 2019 Google LLC. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * =============================================================================\n */\n\nimport {OpExecutor, OpMapper} from '../types';\n\nconst CUSTOM_OPS: {[key: string]: OpMapper} = {};\n\n/**\n * Register an Op for graph model executor. This allows you to register\n * TensorFlow custom op or override existing op.\n *\n * Here is an example of registering a new MatMul Op.\n * ```js\n * const customMatmul = (node) =>\n * tf.matMul(\n * node.inputs[0], node.inputs[1],\n * node.attrs['transpose_a'], node.attrs['transpose_b']);\n *\n * tf.registerOp('MatMul', customMatmul);\n * ```\n * The inputs and attrs of the node object are based on the TensorFlow op\n * registry.\n *\n * @param name The Tensorflow Op name.\n * @param opFunc An op function which is called with the current graph node\n * during execution and needs to return a tensor or a list of tensors. The node\n * has the following attributes:\n * - attr: A map from attribute name to its value\n * - inputs: A list of input tensors\n *\n * @doc {heading: 'Models', subheading: 'Op Registry'}\n */\nexport function registerOp(name: string, opFunc: OpExecutor) {\n const opMapper: OpMapper = {\n tfOpName: name,\n category: 'custom',\n inputs: [],\n attrs: [],\n customExecutor: opFunc\n };\n\n CUSTOM_OPS[name] = opMapper;\n}\n\n/**\n * Retrieve the OpMapper object for the registered op.\n *\n * @param name The Tensorflow Op name.\n *\n * @doc {heading: 'Models', subheading: 'Op Registry'}\n */\nexport function getRegisteredOp(name: string): OpMapper {\n return CUSTOM_OPS[name];\n}\n\n/**\n * Deregister the Op for graph model executor.\n *\n * @param name The Tensorflow Op name.\n *\n * @doc {heading: 'Models', subheading: 'Op Registry'}\n */\nexport function deregisterOp(name: string) {\n delete CUSTOM_OPS[name];\n}\n","/**\n * @license\n * Copyright 2018 Google LLC. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with