diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/detect-libc b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/detect-libc deleted file mode 120000 index b4c4b7674..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/detect-libc +++ /dev/null @@ -1 +0,0 @@ -../detect-libc/bin/detect-libc.js \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/mkdirp b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/mkdirp deleted file mode 120000 index 017896ceb..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/needle b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/needle deleted file mode 120000 index 828096942..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/needle +++ /dev/null @@ -1 +0,0 @@ -../needle/bin/needle \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/node-pre-gyp b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/node-pre-gyp deleted file mode 120000 index 47a90a512..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/node-pre-gyp +++ /dev/null @@ -1 +0,0 @@ -../node-pre-gyp/bin/node-pre-gyp \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/nopt b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/nopt deleted file mode 120000 index 6b6566ea7..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/nopt +++ /dev/null @@ -1 +0,0 @@ -../nopt/bin/nopt.js \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/rc b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/rc deleted file mode 120000 index 48b3cda74..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/rc +++ /dev/null @@ -1 +0,0 @@ -../rc/cli.js \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/rimraf b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/semver b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/semver deleted file mode 120000 index 317eb293d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/.bazelversion b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/.bazelversion deleted file mode 100644 index 2094a100c..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -0.24.0 diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/.nycrc b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/.nycrc deleted file mode 100644 index e99df8422..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/.nycrc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extension": [ - ".ts" - ], - "reporter": [ - "html", - "text-summary" - ], - "include": [ - "src/**/*" - ], - "exclude": [ - "src/run_tests.ts", - "src/**/*_test.ts", - "src/proto/*" - ], - "cache": false, - "sourceMap": true, - "instrument": true -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/DEVELOPMENT.md b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/DEVELOPMENT.md deleted file mode 100644 index 5d445630a..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/DEVELOPMENT.md +++ /dev/null @@ -1,117 +0,0 @@ -# TensorFlow.js Node.js bindings development. - -The @tensorflow/tfjs-node repo supports npm package @tensorflow/tfjs-node and @tensorflow/tfjs-node-gpu on Windows/Mac/Linux. This guide lists commands to use when developing this package. - -## Install - -#### Dependencies and addon module - -```sh -$ yarn -``` - -This command installs all dependencies and devDependencies listed in package.json. It also downloads the TensorFlow C library and native node addon. - -#### Compile native addon from source files - -```sh -$ yarn build-addon-from-source -``` - -This command will compile a new native node addon from source files. - -#### - -```sh -$ yarn install-from-source -``` - -This command does the following: - -1. Clears local binary and addon resources -2. Downloads the TensorFlow C library -3. Compiles the native addon from source files (instead of downloading pre-compile addon) - -#### Switching local workflow to CUDA/GPU - -```sh -$ yarn enable-gpu -``` - -This command is the same as `yarn install-from-source` except it uses the TensorFlow GPU library. - -## Build and test - -#### Compile javascript files from typescript - -```sh -$ yarn build -``` - -#### Publish locally through yalc to test this package in another repo - -```sh -$ yarn publish-local -``` - -This command packs the `tfjs-node` package and publishes locally through [yalc](https://github.com/whitecolor/yalc). -NOTE: Dependent packages must install this locally published package through yalc and compile the node native addon locally. In the dependent package run the following command to link local published `tfjs-node` package: - -```sh -$ yalc link @tensorflow/tfjs-node -$ cd .yalc/@tensorflow/tfjs-node -$ yarn && yarn build-addon-from-source -$ cd ../../.. -``` - -#### Run tests - -```sh -$ yarn test -``` - -## Prepare and publish - -#### Prerequisite: install GCP command line tool - -Publishing this package requires uploading objects to GCP bucket. Developers need to install GCP command line tool [gsutil](https://cloud.google.com/storage/docs/gsutil_install) before publishing. Please ask TFJS developers for GCP project ID. - -#### Build and upload node addon to Google Cloud Platform - -```sh -$ yarn build-addon cpu for-publish -``` - -This command will compile, compress, and upload a new node addon to GCP bucket. Please read [build-and-upload-addon.sh](./scripts/build-and-upload-addon.sh) for details. - -#### Build NPM package - -```sh -$ yarn build-npm -``` - -This command will build a new version of tfjs-node/tfjs-node-gpu NPM tarball. NOTE: this command does not update the pre-compiled node addon to GCP (see `yarn build-addon upload`). - -#### Build NPM package and upload node addon - -```sh -$ yarn build-npm upload -``` - -This command combines the above two commands. - -#### Publish NPM package - -```sh -$ yarn publish-npm -``` - -This command compiles a new node addon, upload it to GCP, then builds and publishes a new npm package. Please read instruction in [publish-npm.sh](./scripts/publish.sh) before publishing. - -#### Build and upload node addon on Windows - -```sh -$ yarn upload-windows-addon -``` - -Most times the NPM package is published on Linux machine, and only the Linux node addon is compiled and uploaded to GCP bucket. To build and upload the native node addon for Windows, developers should run the above commands on Windows machine. Please read [build-and-upload-windows-addon.bat](./scripts/build-and-upload-windows-addon.bat) for details. diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/README.md b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/README.md deleted file mode 100644 index 18a6a69fc..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/README.md +++ /dev/null @@ -1,176 +0,0 @@ -# TensorFlow backend for TensorFlow.js via Node.js -This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, -accelerated by the TensorFlow C binary under the hood. It provides the same API as [TensorFlow.js](https://js.tensorflow.org/api/latest/). - -This package will work on Linux, Windows, and Mac platforms where TensorFlow is supported. - -## Installing - -TensorFlow.js for Node currently supports the following platforms: -- Mac OS X CPU (10.12.6 Siera or higher) -- Linux CPU (Ubuntu 14.04 or higher) -- Linux GPU (Ubuntu 14.04 or higher and Cuda 10.0 w/ CUDNN v7) ([see installation instructions](https://www.tensorflow.org/install/gpu#software_requirements)) -- Windows CPU (Win 7 or higher) -- Windows GPU (Win 7 or higher and Cuda 10.0 w/ CUDNN v7) ([see installation instructions](https://www.tensorflow.org/install/gpu#windows_setup)) - -For GPU support, tfjs-node-gpu@1.2.4 or later requires the following NVIDIA® software installed on your system: - -| Name | Version | -| ------------- | ------------- | -| [NVIDIA® GPU drivers](https://www.nvidia.com/Download/index.aspx?lang=en-us) | >410.x | -| [CUDA® Toolkit](https://developer.nvidia.com/cuda-10.0-download-archive) | 10.0 | -| [cuDNN SDK](https://developer.nvidia.com/rdp/cudnn-download) | >=7.4.1 | - -*Other Linux variants might also work but this project matches [core TensorFlow installation requirements](https://www.tensorflow.org/install/install_linux).* - -#### Installing CPU TensorFlow.js for Node: - -```sh -npm install @tensorflow/tfjs-node -(or) -yarn add @tensorflow/tfjs-node -``` - -#### Installing Linux/Windows GPU TensorFlow.js for Node: - -```sh -npm install @tensorflow/tfjs-node-gpu -(or) -yarn add @tensorflow/tfjs-node-gpu -``` - -#### Windows / Mac OS X Requires Python 2.7 - -Windows & OSX build support for `node-gyp` requires Python 2.7. Be sure to have this version before installing `@tensorflow/tfjs-node` or `@tensorflow/tfjs-node-gpu`. Machines with Python 3.x will not install the bindings properly. - -*For more troubleshooting on Windows, check out [WINDOWS_TROUBLESHOOTING.md](./WINDOWS_TROUBLESHOOTING.md).* - -#### Mac OS X Requires Xcode - -If you do not have Xcode setup on your machine, please run the following commands: - -```sh -$ xcode-select --install -``` -For Mac OS Catalina please follow [this guide](https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md#installing-node-gyp-using-the-xcode-command-line-tools-via-manual-download) to install node-gyp. - -After that operation completes, re-run `yarn add` or `npm install` for the `@tensorflow/tfjs-node` package. - -You only need to include `@tensorflow/tfjs-node` or `@tensorflow/tfjs-node-gpu` in the package.json file, since those packages ship with `@tensorflow/tfjs` already. - -#### Rebuild the package on Raspberry Pi - -To use this package on Raspberry Pi, you need to rebuild the node native addon with the following command after you installed the package: - -```sh -$ npm rebuild @tensorflow/tfjs-node --build-from-source -``` - -#### Custom binaries URI - -If you happen to be using a mirror for the libtensorflow binaries (default is [https://storage.googleapis.com/]), you have 3 options (in order of priority): - -1. Set the environment variable `TFJS_NODE_CDN_STORAGE`. This has the same behavior as `CDN_STORAGE`, but introduced to prevent collisions with other npm packages that might use `CDN_STORAGE`. - -```sh -TFJS_NODE_CDN_STORAGE="https://yourmirrorofchoice.com/" npm install -(or) -TFJS_NODE_CDN_STORAGE="https://yourmirrorofchoice.com/" yarn install -``` - -2. Add the variable `TFJS_NODE_CDN_STORAGE` to your `.npmrc` file. - -``` -TFJS_NODE_CDN_STORAGE=https://yourmirrorofchoice.com/ -``` - -3. Set the environment variable `CDN_STORAGE`. This option is deprecated in favor of the `TFJS_NODE_` prefix version above and will be removed in a future release. - -```sh -CDN_STORAGE="https://yourmirrorofchoice.com/" npm install -(or) -CDN_STORAGE="https://yourmirrorofchoice.com/" yarn install -``` - -If your "mirror" uses a custom URI path that doesn't match the default, you have 2 options (in order of priority): - -1. Set the environment variable `TFJS_NODE_BASE_URI` - -```sh -TFJS_NODE_BASE_URI="https://yourhost.com/your/path/libtensorflow-" npm install -(or) -TFJS_NODE_BASE_URI="https://yourhost.com/your/path/libtensorflow-" yarn install -``` - -2. Add the variable `TFJS_NODE_BASE_URI` to your `.npmrc` file - -``` -TFJS_NODE_BASE_URI=https://yourhost.com/your/path/libtensorflow- -``` - -## Using the binding - -Before executing any TensorFlow.js code, import the node package: - -```js -// Load the binding -const tf = require('@tensorflow/tfjs-node'); - -// Or if running with GPU: -const tf = require('@tensorflow/tfjs-node-gpu'); -``` - -Note: you do not need to add the `@tensorflow/tfjs` package to your dependencies or import it directly. - -## Development - -```sh -# Download and install JS dependencies, including libtensorflow 1.8. -yarn - -# Run TFJS tests against Node.js backend: -yarn test -``` - -```sh -# Switch to GPU for local development: -yarn enable-gpu -``` - - -## MNIST demo for Node.js - -See the [tfjs-examples repository](https://github.com/tensorflow/tfjs-examples/tree/master/mnist-node) for training the MNIST dataset using the Node.js bindings. - -### Optional: Build optimal TensorFlow from source - -To get the most optimal TensorFlow build that can take advantage of your specific hardware (AVX512, MKL-DNN), you can build the `libtensorflow` library from source: -- [Install bazel](https://docs.bazel.build/versions/master/install.html) -- Checkout the [main tensorflow repo](https://github.com/tensorflow/tensorflow) and follow the instructions in [here](https://www.tensorflow.org/install/source) with **one difference**: instead of building the pip package, build `libtensorflow`: - -```sh -./configure -bazel build --config=opt --config=monolithic //tensorflow/tools/lib_package:libtensorflow -``` - -The build might take a while and will produce a `bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz` file, which should be unpacked and replace the files in `deps` folder of `tfjs-node` repo: -```sh -cp bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz ~/myproject/node_modules/@tensorflow/tfjs-node/deps -cd path-to-my-project/node_modules/@tensorflow/tfjs-node/deps -tar -xf libtensorflow.tar.gz -``` - -If you want to publish an addon library with your own libtensorflow binary, you can host the custom libtensorflow binary and optional pre-compiled node addon module on the cloud service you choose, and add a `custom-binary.json` file in `scripts` folder with the following information: - -```js -{ - "tf-lib": "url-to-download-customized-binary", - "addon": { - "host": "host-of-pre-compiled-addon", - "remote_path": "remote-path-of-pre-compiled-addon", - "package_name": "file-name-of-pre-compile-addon" - } -} -``` - -The installation scripts will automatically catch this file and use the custom libtensorflow binary and addon. If `addon` is not provided, the installation script will compile addon from source. diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/WINDOWS_TROUBLESHOOTING.md b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/WINDOWS_TROUBLESHOOTING.md deleted file mode 100644 index 6d3b37aba..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/WINDOWS_TROUBLESHOOTING.md +++ /dev/null @@ -1,54 +0,0 @@ -# TensorFlow.js Node.js bindings Windows troubleshooting. - -The tfjs-node package uses the [node-gyp](https://github.com/nodejs/node-gyp) package to handle cross-compiling the C++ code required to bind TensorFlow to Node.js. This cross platform solution can be somewhat tricky on Windows platforms. This guide helps reference solutions that have been triaged through Issues on the main [tfjs repo](https://github.com/tensorflow/tfjs). - -## Ensure Python 2.x is installed - -Currently, node-gyp requires Python 2.x to work properly. If Python 3.x is installed, you will see build failures. Also double check your python version `python --version` and update the Windows `$PATH` as needed. - -## 'The system cannot find the patch specified' Exceptions - -This can happen for a variety of reasons. First, to inspect what is missing either `cd node_modules/@tensorflow/tfjs-node` or clone the [tensorflow/tfjs repo](https://github.com/tensorflow/tfjs). - -After `cd`'ing or cloning, run the following command (you might need node-gyp installed globablly `npm install -g node-gyp`): - -```sh -node-gyp configure --verbose -``` - -### Missing `python2` - -From the verbose output, if you see something like: - -```sh -gyp verb check python checking for Python executable "python2" in the PATH -gyp verb `which` failed Error: not found: python2 -``` - -This means that node-gyp expects a 'python2' exe somewhere in `%PATH%`. Try running this command from an Admin (elevated privilaged prompt): - -You can try running this from an Adminstrative prompt: - -```sh -$ npm --add-python-to-path='true' --debug install --global windows-build-tools -``` - -### Something else? - -If another missing component shows up - please file an issue on [tensorflow/tfjs](https://github.com/tensorflow/tfjs/issues/new) with the output from the `node-gyp configure --verbose` command. - -## msbuild.exe Exceptions - -Check the full stack trace from `npm install` (or `yarn`) command. If you see something like: - -``` -gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1 -``` - -You might need to install the system tools manually. This can be done via: - -``` -npm install -g --production windows-build-tools -``` - -If that still does not work - try re-running the command above in a privileged shell. diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding.gyp b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding.gyp deleted file mode 100644 index f335ffcde..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding.gyp +++ /dev/null @@ -1,108 +0,0 @@ -## -# @license -# Copyright 2018 Google LLC. All Rights Reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================= - -# Node.js TensorFlow Binding config: -{ - 'variables' : { - 'tensorflow_include_dir' : '<(module_root_dir)/deps/include', - 'tensorflow_headers' : [ - '<@(tensorflow_include_dir)/tensorflow/c/c_api.h', - '<@(tensorflow_include_dir)/tensorflow/c/eager/c_api.h', - ], - 'tensorflow-library-action': 'move' - }, - 'targets' : [{ - 'target_name' : 'tfjs_binding', - 'sources' : [ - 'binding/tfjs_backend.cc', - 'binding/tfjs_binding.cc' - ], - 'include_dirs' : [ '..', '<(tensorflow_include_dir)' ], - 'conditions' : [ - [ - 'OS=="linux"', { - 'libraries' : [ - '-Wl,-rpath,\$$ORIGIN/../../deps/lib', - '-ltensorflow', - '-ltensorflow_framework', - ], - 'library_dirs' : ['<(module_root_dir)/deps/lib'], - } - ], - [ - 'OS=="mac"', { - 'libraries' : [ - '<(module_root_dir)/deps/lib/libtensorflow.2.dylib', - '<(module_root_dir)/deps/lib/libtensorflow_framework.2.dylib', - ], - 'postbuilds': [ - { - 'postbuild_name': 'Adjust libtensorflow load path', - 'action': [ - 'install_name_tool', - "-change", - "@rpath/libtensorflow.2.dylib", - "@loader_path/../../deps/lib/libtensorflow.dylib", - "<(PRODUCT_DIR)/tfjs_binding.node" - ] - }, - { - 'postbuild_name': 'Adjust libtensorflow_framework load path', - 'action': [ - 'install_name_tool', - "-change", - "@rpath/libtensorflow_framework.2.dylib", - "@loader_path/../../deps/lib/libtensorflow_framework.2.dylib", - "<(PRODUCT_DIR)/tfjs_binding.node" - ] - } - ], - } - ], - [ - 'OS=="win"', { - 'defines': ['COMPILER_MSVC'], - 'libraries': ['tensorflow'], - 'library_dirs' : ['<(module_root_dir)/deps/lib'], - 'variables': { - 'tensorflow-library-target': 'windows' - }, - 'msvs_disabled_warnings': [ - # Warning C4190: 'TF_NewWhile' has C-linkage specified, but returns - # UDT 'TF_WhileParams' which is incompatible with C. - # (in include/tensorflow/c/c_api.h) - 4190 - ] - }, - ] - ], - } - , { - "target_name": "action_after_build", - "type": "none", - "dependencies": [ "<(module_name)" ], - "copies": [ - { - "files": [ "<(PRODUCT_DIR)/<(module_name).node" ], - "destination": "<(module_path)" - } - ] - } - ], - "defines": [ - "NAPI_VERSION=<(napi_build_version)" - ] -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/napi_auto_ref.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/napi_auto_ref.h deleted file mode 100644 index 07f69d230..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/napi_auto_ref.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#ifndef TF_NODEJS_NAPI_AUTO_REF_H_ -#define TF_NODEJS_NAPI_AUTO_REF_H_ - -#include -#include "utils.h" - -namespace tfnodejs { - -// Helper class to automatically cleanup napi_ref instances. -class NapiAutoRef { - public: - NapiAutoRef() : env_(nullptr), ref_(nullptr) {} - - napi_status Init(napi_env env, napi_value value) { - env_ = env; - return napi_create_reference(env_, value, 1, &ref_); - } - - napi_status Cleanup() { - if (!env_ || !ref_) { -#if DEBUG - NAPI_THROW_ERROR(env_, "Uninitialized reference attempted to cleanup"); -#endif - return napi_invalid_arg; - } - - napi_status nstatus = napi_delete_reference(env_, ref_); - env_ = nullptr; - ref_ = nullptr; - return nstatus; - } - - virtual ~NapiAutoRef() { - if (env_) { -#if DEBUG - NAPI_THROW_ERROR(env_, "Non-cleaned up napi_env instance"); -#endif - } - if (ref_) { -#if DEBUG - NAPI_THROW_ERROR(env_, "Non-cleaned up napi_ref instance"); -#endif - } - } - - private: - napi_env env_; - napi_ref ref_; -}; - -} // namespace tfnodejs - -#endif // TF_NODEJS_NAPI_AUTO_REF_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tf_auto_status.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tf_auto_status.h deleted file mode 100644 index 81b512fca..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tf_auto_status.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#ifndef TF_NODEJS_TF_AUTO_STATUS_H_ -#define TF_NODEJS_TF_AUTO_STATUS_H_ - -#include "tensorflow/c/c_api.h" - -namespace tfnodejs { - -// Automatically cleans up a TF_Status instance. -class TF_AutoStatus { - public: - TF_AutoStatus() : status(TF_NewStatus()) {} - virtual ~TF_AutoStatus() { TF_DeleteStatus(status); } - - TF_Status* status; -}; - -} // namespace tfnodejs - -#endif // TF_NODEJS_TF_AUTO_STATUS_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tf_auto_tensor.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tf_auto_tensor.h deleted file mode 100644 index ee8229335..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tf_auto_tensor.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#ifndef TF_NODEJS_TF_AUTO_TENSOR_H_ -#define TF_NODEJS_TF_AUTO_TENSOR_H_ - -#include "tensorflow/c/c_api.h" - -namespace tfnodejs { - -// Automatically cleans up a TF_Tensor instance. -class TF_AutoTensor { - public: - TF_AutoTensor(TF_Tensor* tensor) : tensor(tensor) {} - virtual ~TF_AutoTensor() { TF_DeleteTensor(tensor); } - - TF_Tensor* tensor; -}; - -} // namespace tfnodejs - -#endif // TF_NODEJS_TF_AUTO_TENSOR_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfe_auto_op.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfe_auto_op.h deleted file mode 100644 index 1b43fa490..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfe_auto_op.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#ifndef TF_NODEJS_TFE_AUTO_OP_H_ -#define TF_NODEJS_TFE_AUTO_OP_H_ - -#include "tensorflow/c/eager/c_api.h" - -namespace tfnodejs { - -// Automatically cleans up a TF_Op instance. -class TFE_AutoOp { - public: - TFE_AutoOp(TFE_Op* op) : op(op) {} - virtual ~TFE_AutoOp() { TFE_DeleteOp(op); } - - TFE_Op* op; -}; - -} // namespace tfnodejs - -#endif // TF_NODEJS_TFE_AUTO_OP_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_backend.cc b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_backend.cc deleted file mode 100644 index fc2f7f6d4..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_backend.cc +++ /dev/null @@ -1,1192 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#include "tfjs_backend.h" - -#include -#include -#include -#include -#include -#include "napi_auto_ref.h" -#include "tf_auto_tensor.h" -#include "tfe_auto_op.h" -#include "utils.h" - -namespace tfnodejs { - -// Used to hold strings beyond the lifetime of a JS call. -static std::set ATTR_NAME_SET; - -// Callback to cleanup extra reference count for shared V8/TF tensor memory: -static void DeallocTensor(void *data, size_t len, void *arg) { - NapiAutoRef *auto_ref = static_cast(arg); - if (!auto_ref) { -#if DEBUG - fprintf(stderr, "Invalid NapiAutoRef reference passed to V8 cleanup\n"); -#endif - return; - } - if (auto_ref->Cleanup() != napi_ok) { -#if DEBUG - fprintf(stderr, "Exception cleaning up napi_ref instance\n"); -#endif - } - delete auto_ref; -} - -// Creates a TFE_TensorHandle from a JS typed array. -TFE_TensorHandle *CreateTFE_TensorHandleFromTypedArray(napi_env env, - int64_t *shape, - uint32_t shape_length, - TF_DataType dtype, - napi_value array_value) { - napi_status nstatus; - napi_typedarray_type array_type; - size_t array_length; - void *array_data; - nstatus = - napi_get_typedarray_info(env, array_value, &array_type, &array_length, - &array_data, nullptr, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Double check the underlying TF_Tensor type matches the supplied - // typed-array. - size_t width = 0; - switch (array_type) { - case napi_float32_array: - if (dtype != TF_FLOAT) { - NAPI_THROW_ERROR(env, "Tensor type does not match Float32Array"); - return nullptr; - } - width = sizeof(float); - break; - case napi_int32_array: - if (dtype != TF_INT32 && dtype != TF_INT64) { - // Currently, both int32- and int64-type Tensors are represented - // as Int32Arrays in JavaScript. See int64_tensors.ts for details - // about the latter. - NAPI_THROW_ERROR(env, "Tensor type does not match Int32Array"); - return nullptr; - } - width = sizeof(int32_t); - break; - case napi_uint8_array: - if (dtype != TF_BOOL && dtype != TF_UINT8) { - NAPI_THROW_ERROR(env, "Tensor type does not match Uint8Array"); - return nullptr; - } - width = sizeof(uint8_t); - break; - default: - REPORT_UNKNOWN_TYPED_ARRAY_TYPE(env, array_type); - return nullptr; - } - - // Double check that width matches TF data type size: - if (dtype == TF_INT64) { - // Currently, int64-type Tensors are represented as Int32Arrays. So the - // logic for comparing the byte size of the typed-array representation and - // the byte size of the tensor dtype needs to be special-cased for int64. - if (width * 2 != TF_DataTypeSize(dtype)) { - NAPI_THROW_ERROR( - env, - "Byte size of elements differs between JavaScript VM " - "(%zu * 2 = %zu) and TensorFlow (%zu) for int64-type tensor", - width, width * 2, TF_DataTypeSize(dtype)); - return nullptr; - } - } else { - if (width != TF_DataTypeSize(dtype)) { - NAPI_THROW_ERROR(env, - "Byte size of elements differs between JavaScript VM " - "(%zu) and TensorFlow (%zu)", - width, TF_DataTypeSize(dtype)); - return nullptr; - } - } - - // Determine the size of the buffer based on the dimensions. - size_t num_elements = 1; - for (size_t i = 0; i < shape_length; i++) { - num_elements *= shape[i]; - } - - // Ensure the shape matches the length of the passed in typed-array. - if (dtype == TF_INT64) { - // Currently, int64-type Tensors are represented as Int32Arrays. - // To represent a int64-type Tensor of `n` elements, an Int32Array of - // length `2 * n` is requried. This is why the length-match checking - // logic is special-cased for int64. - if (array_length != num_elements * 2) { - NAPI_THROW_ERROR( - env, - "Shape does not match two times typed-array in bindData() " - "(num_elements * 2 = %zu, array_length=%zu) for int64 data type", - num_elements * 2, array_length); - return nullptr; - } - } else { - if (num_elements != array_length) { - NAPI_THROW_ERROR(env, - "Shape does not match typed-array in bindData() " - "(num_elements=%zu, array_length=%zu)", - num_elements, array_length); - return nullptr; - } - } - - // Sharing V8 memory with the underlying TensorFlow tensor requires adding an - // additional refcount. When the Tensor is deleted, the refcount will be - // reduced in the callback helper. - NapiAutoRef *auto_ref = new NapiAutoRef(); - nstatus = auto_ref->Init(env, array_value); - if (nstatus != napi_ok) { - delete auto_ref; - } - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Currently, int64-type Tensors are represented as Int32Arrays. - // So the logic for comparing the byte size of the typed-array representation - // and the byte size of the tensor dtype needs to be special-cased for int64. - const size_t byte_size = - dtype == TF_INT64 ? num_elements * width * 2 : num_elements * width; - - TF_AutoTensor tensor(TF_NewTensor(dtype, shape, shape_length, array_data, - byte_size, DeallocTensor, auto_ref)); - - TF_AutoStatus tf_status; - TFE_TensorHandle *tfe_tensor_handle = - TFE_NewTensorHandle(tensor.tensor, tf_status.status); - if (TF_GetCode(tf_status.status) != TF_OK) { - delete auto_ref; - TFE_DeleteTensorHandle(tfe_tensor_handle); - } - ENSURE_TF_OK_RETVAL(env, tf_status, nullptr); - - return tfe_tensor_handle; -} - -// Creates a TFE_TensorHandle from a JS array of Uint8Array values. -TFE_TensorHandle *CreateTFE_TensorHandleFromStringArray( - napi_env env, int64_t *shape, uint32_t shape_length, TF_DataType dtype, - napi_value array_value) { - napi_status nstatus; - - uint32_t array_length; - nstatus = napi_get_array_length(env, array_value, &array_length); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - TF_AutoTensor tensor(TF_AllocateTensor(TF_DataType::TF_STRING, shape, - shape_length, - array_length * sizeof(TF_TString))); - - TF_TString *t = reinterpret_cast(TF_TensorData(tensor.tensor)); - - for (uint32_t i = 0; i < array_length; ++i) { - napi_value cur_value; - nstatus = napi_get_element(env, array_value, i, &cur_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - ENSURE_VALUE_IS_TYPED_ARRAY_RETVAL(env, cur_value, nullptr); - - napi_typedarray_type array_type; - size_t cur_array_length; - void *buffer = nullptr; - - nstatus = - napi_get_typedarray_info(env, cur_value, &array_type, &cur_array_length, - &buffer, nullptr, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - // Only Uint8 typed arrays are supported. - if (array_type != napi_uint8_array) { - NAPI_THROW_ERROR(env, "Unsupported array type - expecting Uint8Array"); - return nullptr; - } - - TF_TString_Init(t); - TF_TString_Copy(t, reinterpret_cast(buffer), cur_array_length); - t += 1; - } - - TF_AutoStatus tf_status; - - TFE_TensorHandle *tfe_tensor_handle = - TFE_NewTensorHandle(tensor.tensor, tf_status.status); - ENSURE_TF_OK_RETVAL(env, tf_status, nullptr); - return tfe_tensor_handle; -} - -TFE_TensorHandle *CreateTFE_TensorHandleFromJSValues(napi_env env, - int64_t *shape, - uint32_t shape_length, - TF_DataType dtype, - napi_value array_value) { - bool is_typed_array; - napi_status nstatus = napi_is_typedarray(env, array_value, &is_typed_array); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - if (is_typed_array) { - return CreateTFE_TensorHandleFromTypedArray(env, shape, shape_length, dtype, - array_value); - } else { - return CreateTFE_TensorHandleFromStringArray(env, shape, shape_length, - dtype, array_value); - } -} - -TFE_TensorHandle *CopyTFE_TensorHandleToDevice(napi_env env, - const char *device_name, - TFE_TensorHandle *handle, - TFE_Context *tfe_context) { - TF_AutoStatus tf_status; - - TFE_TensorHandle *new_handle = TFE_TensorHandleCopyToDevice( - handle, tfe_context, device_name, tf_status.status); - ENSURE_TF_OK_RETVAL(env, tf_status, nullptr); - - return new_handle; -} - -void CopyTFE_TensorHandleDataToTypedArray(napi_env env, - TFE_Context *tfe_context, - TFE_TensorHandle *tfe_tensor_handle, - TF_DataType tensor_data_type, - napi_typedarray_type array_type, - napi_value *result) { - TF_AutoStatus tf_status; - - TF_AutoTensor tensor( - TFE_TensorHandleResolve(tfe_tensor_handle, tf_status.status)); - ENSURE_TF_OK(env, tf_status); - - // Determine the length of the array based on the shape of the tensor. - size_t num_elements = GetTensorNumElements(tensor.tensor); - - if (tensor_data_type == TF_COMPLEX64) { - // Dimension length will be double for Complex 64. - num_elements *= 2; - } - - size_t byte_length = TF_TensorByteSize(tensor.tensor); - - napi_value array_buffer_value; - void *array_buffer_data; - napi_status nstatus; - nstatus = napi_create_arraybuffer(env, byte_length, &array_buffer_data, - &array_buffer_value); - ENSURE_NAPI_OK(env, nstatus); - - // TFE_TensorHandleResolve can use a shared data pointer, memcpy() the - // current value to the newly allocated NAPI buffer. - memcpy(array_buffer_data, TF_TensorData(tensor.tensor), byte_length); - - nstatus = napi_create_typedarray(env, array_type, num_elements, - array_buffer_value, 0, result); - ENSURE_NAPI_OK(env, nstatus); -} - -void CopyTFE_TensorHandleDataToStringArray(napi_env env, - TFE_Context *tfe_context, - TFE_TensorHandle *tfe_tensor_handle, - napi_value *result) { - TF_AutoStatus tf_status; - - TF_AutoTensor tensor( - TFE_TensorHandleResolve(tfe_tensor_handle, tf_status.status)); - ENSURE_TF_OK(env, tf_status); - - if (TF_TensorType(tensor.tensor) != TF_STRING) { - NAPI_THROW_ERROR(env, "Tensor is not of type TF_STRING"); - return; - } - - size_t num_elements = TF_TensorElementCount(tensor.tensor); - - TF_TString *ts = static_cast(TF_TensorData(tensor.tensor)); - TF_AutoStatus status; - - // Create a JS string to stash strings into - napi_status nstatus; - nstatus = napi_create_array_with_length(env, num_elements, result); - - for (uint64_t i = 0; i < num_elements; i++) { - napi_value array_buffer_value; - - const char *raw_string = TF_TString_GetDataPointer(ts); - size_t raw_string_size = TF_TString_GetSize(ts); - void *array_buffer_data; - nstatus = napi_create_arraybuffer(env, raw_string_size, &array_buffer_data, - &array_buffer_value); - ENSURE_NAPI_OK(env, nstatus); - - memcpy(array_buffer_data, raw_string, raw_string_size); - - napi_value typed_array_value; - nstatus = napi_create_typedarray(env, napi_uint8_array, raw_string_size, - array_buffer_value, 0, &typed_array_value); - ENSURE_NAPI_OK(env, nstatus); - - nstatus = napi_set_element(env, *result, i, typed_array_value); - ENSURE_NAPI_OK(env, nstatus); - - ts += 1; - } -} - -void CopyTFE_TensorHandleDataToResourceArray( - napi_env env, TFE_Context *tfe_context, TFE_TensorHandle *tfe_tensor_handle, - napi_value *result) { - TF_AutoStatus tf_status; - - TF_AutoTensor tensor( - TFE_TensorHandleResolve(tfe_tensor_handle, tf_status.status)); - ENSURE_TF_OK(env, tf_status); - - if (TF_TensorType(tensor.tensor) != TF_RESOURCE) { - NAPI_THROW_ERROR(env, "Tensor is not of type TF_RESOURCE"); - return; - } - - void *tensor_data = TF_TensorData(tensor.tensor); - ENSURE_VALUE_IS_NOT_NULL(env, tensor_data); - - size_t num_elements = GetTensorNumElements(tensor.tensor); - if (num_elements != 1) { - NAPI_THROW_ERROR(env, - "For DT_RESOURCE tensors, Node.js binding currently " - "supports only exactly 1 element, but encountered " - "DT_RESOURCE tensor with %zu elements.", - num_elements); - } - - TF_AutoStatus status; - - // Create a JS string to stash the resouce handle into. - napi_status nstatus; - size_t byte_length = TF_TensorByteSize(tensor.tensor); - nstatus = napi_create_array_with_length(env, byte_length, result); - ENSURE_NAPI_OK(env, nstatus); - - napi_value array_buffer_value; - void *array_buffer_data = nullptr; - nstatus = napi_create_arraybuffer(env, byte_length, &array_buffer_data, - &array_buffer_value); - ENSURE_NAPI_OK(env, nstatus); - - // TFE_TensorHandleResolve can use a shared data pointer, memcpy() the - // current value to the newly allocated NAPI buffer. - memcpy(array_buffer_data, tensor_data, byte_length); - - // This method will only return uint8 arrays. - nstatus = napi_create_typedarray(env, napi_uint8_array, byte_length, - array_buffer_value, 0, result); - ENSURE_NAPI_OK(env, nstatus); -} - -// Handles converting the stored TF_Tensor data into the correct JS value. -void CopyTFE_TensorHandleDataToJSData(napi_env env, TFE_Context *tfe_context, - TFE_TensorHandle *tfe_tensor_handle, - napi_value *result) { - if (tfe_context == nullptr) { - NAPI_THROW_ERROR(env, "Invalid TFE_Context"); - return; - } - if (tfe_tensor_handle == nullptr) { - NAPI_THROW_ERROR(env, "Invalid TFE_TensorHandle"); - return; - } - - // Determine the type of the array - napi_typedarray_type typed_array_type; - bool is_string = false; - bool is_resource = false; - TF_DataType tensor_data_type = TFE_TensorHandleDataType(tfe_tensor_handle); - switch (tensor_data_type) { - case TF_COMPLEX64: - case TF_FLOAT: - typed_array_type = napi_float32_array; - break; - case TF_INT32: - typed_array_type = napi_int32_array; - break; - case TF_INT64: - typed_array_type = napi_bigint64_array; - break; - case TF_BOOL: - typed_array_type = napi_uint8_array; - break; - case TF_STRING: - is_string = true; - break; - case TF_RESOURCE: - // We currently represent a resource handle as an `Uint8Array`. - typed_array_type = napi_uint8_array; - is_resource = true; - break; - default: - REPORT_UNKNOWN_TF_DATA_TYPE(env, - TFE_TensorHandleDataType(tfe_tensor_handle)); - return; - } - - if (is_string) { - CopyTFE_TensorHandleDataToStringArray(env, tfe_context, tfe_tensor_handle, - result); - } else if (is_resource) { - CopyTFE_TensorHandleDataToResourceArray(env, tfe_context, tfe_tensor_handle, - result); - } else { - CopyTFE_TensorHandleDataToTypedArray(env, tfe_context, tfe_tensor_handle, - tensor_data_type, typed_array_type, - result); - } -} - -void GetTFE_TensorHandleShape(napi_env env, TFE_TensorHandle *handle, - napi_value *result) { - napi_status nstatus; - - TF_AutoStatus tf_status; - uint32_t num_dims = TFE_TensorHandleNumDims(handle, tf_status.status); - ENSURE_TF_OK(env, tf_status); - - if (num_dims == 0) { - nstatus = napi_create_array_with_length(env, 0, result); - ENSURE_NAPI_OK(env, nstatus); - } else { - nstatus = napi_create_array_with_length(env, num_dims, result); - ENSURE_NAPI_OK(env, nstatus); - - for (uint32_t i = 0; i < num_dims; i++) { - napi_value cur_dim; - nstatus = napi_create_int64( - env, TFE_TensorHandleDim(handle, i, tf_status.status), &cur_dim); - ENSURE_TF_OK(env, tf_status); - ENSURE_NAPI_OK(env, nstatus); - - nstatus = napi_set_element(env, *result, i, cur_dim); - ENSURE_NAPI_OK(env, nstatus); - } - } -} - -inline bool IsArray(napi_env env, napi_status &nstatus, napi_value *val) { - bool is_array; - nstatus = napi_is_array(env, *val, &is_array); - ENSURE_NAPI_OK_RETVAL(env, nstatus, false); - return is_array; -} - -void GetTFE_TensorHandleType(napi_env env, TFE_TensorHandle *handle, - napi_value *result) { - napi_status nstatus; - - TF_DataType dtype = TFE_TensorHandleDataType(handle); - nstatus = napi_create_int32(env, dtype, result); - ENSURE_NAPI_OK(env, nstatus); -} - -void AssignOpAttr(napi_env env, TFE_Op *tfe_op, napi_value attr_value) { - napi_status nstatus; - - napi_value attr_name_value; - nstatus = napi_get_named_property(env, attr_value, "name", &attr_name_value); - ENSURE_NAPI_OK(env, nstatus); - - std::string attr_name_string; - nstatus = GetStringParam(env, attr_name_value, attr_name_string); - ENSURE_NAPI_OK(env, nstatus); - - // OpAttr will be used beyond the scope of this function call. Stash ops in - // a set for re-use instead of dynamically reallocating strings for - // operations. - const char *attr_name = - ATTR_NAME_SET.insert(attr_name_string.c_str()).first->c_str(); - - napi_value attr_type_value; - nstatus = napi_get_named_property(env, attr_value, "type", &attr_type_value); - ENSURE_NAPI_OK(env, nstatus); - - TF_AttrType tf_attr_type; - nstatus = napi_get_value_int32(env, attr_type_value, - reinterpret_cast(&tf_attr_type)); - ENSURE_NAPI_OK(env, nstatus); - - napi_value js_value; - nstatus = napi_get_named_property(env, attr_value, "value", &js_value); - ENSURE_NAPI_OK(env, nstatus); - - switch (tf_attr_type) { - case TF_ATTR_STRING: { - // NOTE: String attribute values do not have to be utf8 encoded strings - // (could be arbitrary byte sequences). - std::string str_value; - nstatus = GetStringParam(env, js_value, str_value); - ENSURE_NAPI_OK(env, nstatus); - - TFE_OpSetAttrString(tfe_op, attr_name, str_value.c_str(), - str_value.size()); - break; - } - - case TF_ATTR_INT: { - if (IsArray(env, nstatus, &js_value)) { - uint32_t length; - nstatus = napi_get_array_length(env, js_value, &length); - ENSURE_NAPI_OK(env, nstatus); - std::unique_ptr data(new int64_t[length]); - for (uint32_t i = 0; i < length; ++i) { - napi_value element; - nstatus = napi_get_element(env, js_value, i, &element); - ENSURE_NAPI_OK(env, nstatus); - int32_t value; - nstatus = napi_get_value_int32(env, element, &value); - ENSURE_NAPI_OK(env, nstatus); - data[i] = value; - } - TFE_OpSetAttrIntList(tfe_op, attr_name, data.get(), - static_cast(length)); - } else { - int64_t value; - nstatus = napi_get_value_int64(env, js_value, &value); - ENSURE_NAPI_OK(env, nstatus); - - TFE_OpSetAttrInt(tfe_op, attr_name, value); - } - break; - } - - case TF_ATTR_FLOAT: { - if (IsArray(env, nstatus, &js_value)) { - uint32_t length; - nstatus = napi_get_array_length(env, js_value, &length); - ENSURE_NAPI_OK(env, nstatus); - std::unique_ptr data(new float[length]); - for (uint32_t i = 0; i < length; ++i) { - napi_value element; - nstatus = napi_get_element(env, js_value, i, &element); - ENSURE_NAPI_OK(env, nstatus); - double value; - nstatus = napi_get_value_double(env, element, &value); - ENSURE_NAPI_OK(env, nstatus); - data[i] = static_cast(value); - } - TFE_OpSetAttrFloatList(tfe_op, attr_name, data.get(), - static_cast(length)); - } else { - double value; - nstatus = napi_get_value_double(env, js_value, &value); - ENSURE_NAPI_OK(env, nstatus); - TFE_OpSetAttrFloat(tfe_op, attr_name, static_cast(value)); - } - break; - } - - case TF_ATTR_BOOL: { - if (IsArray(env, nstatus, &js_value)) { - uint32_t length; - nstatus = napi_get_array_length(env, js_value, &length); - ENSURE_NAPI_OK(env, nstatus); - std::unique_ptr data(new unsigned char[length]); - for (uint32_t i = 0; i < length; ++i) { - napi_value element; - nstatus = napi_get_element(env, js_value, i, &element); - ENSURE_NAPI_OK(env, nstatus); - bool value; - nstatus = napi_get_value_bool(env, element, &value); - ENSURE_NAPI_OK(env, nstatus); - data[i] = value ? 1 : 0; - } - TFE_OpSetAttrBoolList(tfe_op, attr_name, data.get(), - static_cast(length)); - } else { - bool value; - nstatus = napi_get_value_bool(env, js_value, &value); - ENSURE_NAPI_OK(env, nstatus); - TFE_OpSetAttrBool(tfe_op, attr_name, value ? 1 : 0); - } - break; - } - - case TF_ATTR_TYPE: { - TF_DataType tf_data_type; - nstatus = napi_get_value_int32( - env, js_value, reinterpret_cast(&tf_data_type)); - ENSURE_NAPI_OK(env, nstatus); - - TFE_OpSetAttrType(tfe_op, attr_name, tf_data_type); - break; - } - - case TF_ATTR_SHAPE: { - std::vector shape_vector; - ExtractArrayShape(env, js_value, &shape_vector); - - TF_AutoStatus tf_status; - TFE_OpSetAttrShape(tfe_op, attr_name, shape_vector.data(), - shape_vector.size(), tf_status.status); - ENSURE_TF_OK(env, tf_status); - break; - } - - default: - REPORT_UNKNOWN_TF_ATTR_TYPE(env, tf_attr_type); - break; - } -} - -TFJSBackend::TFJSBackend(napi_env env) - : next_tensor_id_(0), next_savedmodel_id_(0) { - TF_AutoStatus tf_status; - TFE_ContextOptions *tfe_options = TFE_NewContextOptions(); - tfe_context_ = TFE_NewContext(tfe_options, tf_status.status); - if (TF_GetCode(tf_status.status) != TF_OK) { - NAPI_THROW_ERROR(env, "Exception creating TFE_Context"); - } - - TFE_DeleteContextOptions(tfe_options); - - TF_DeviceList *device_list = - TFE_ContextListDevices(tfe_context_, tf_status.status); - if (TF_GetCode(tf_status.status) != TF_OK) { - NAPI_THROW_ERROR(env, "Exception creating TFE_Context"); - } - - // TODO(kreeger): Add better support for this in the future through the JS - // API. https://github.com/tensorflow/tfjs/issues/320 - std::string cpu_device_name; - const int num_devices = TF_DeviceListCount(device_list); - for (int i = 0; i < num_devices; i++) { - const char *device_type = - TF_DeviceListType(device_list, i, tf_status.status); - ENSURE_TF_OK(env, tf_status); - - // Keep a reference to the host CPU device: - if (strcmp(device_type, "CPU") == 0) { - cpu_device_name = - std::string(TF_DeviceListName(device_list, i, tf_status.status)); - ENSURE_TF_OK(env, tf_status); - } else if (strcmp(device_type, "GPU") == 0) { - device_name = - std::string(TF_DeviceListName(device_list, i, tf_status.status)); - ENSURE_TF_OK(env, tf_status); - } - } - - // If no GPU devices found, fallback to host CPU: - if (device_name.empty()) { - device_name = cpu_device_name; - is_gpu_device = false; - } else { - is_gpu_device = true; - } - TF_DeleteDeviceList(device_list); -} - -TFJSBackend::~TFJSBackend() { - for (auto &kv : tfe_handle_map_) { - TFE_DeleteTensorHandle(kv.second); - } - for (auto &kv : tf_savedmodel_map_) { - TF_AutoStatus tf_status; - TF_DeleteSession(kv.second.first, tf_status.status); - TF_DeleteGraph(kv.second.second); - } - if (tfe_context_ != nullptr) { - TFE_DeleteContext(tfe_context_); - } -} - -TFJSBackend *TFJSBackend::Create(napi_env env) { return new TFJSBackend(env); } - -int32_t TFJSBackend::InsertHandle(TFE_TensorHandle *tfe_handle) { - return tfe_handle_map_.insert(std::make_pair(next_tensor_id_++, tfe_handle)) - .first->first; -} - -int32_t TFJSBackend::InsertSavedModel(TF_Session *tf_session, - TF_Graph *tf_graph) { - // Both TF_Session and TF_Graph are required when executing SavedModel. - // TF_Graph is used to find input/output operation from string name. - return tf_savedmodel_map_ - .insert(std::make_pair(next_savedmodel_id_++, - std::make_pair(tf_session, tf_graph))) - .first->first; -} - -napi_value TFJSBackend::CreateTensor(napi_env env, napi_value shape_value, - napi_value dtype_value, - napi_value array_value) { - napi_status nstatus; - - std::vector shape_vector; - ExtractArrayShape(env, shape_value, &shape_vector); - // Check to see if an exception exists, if so return a failure. - if (IsExceptionPending(env)) { - return nullptr; - } - - int32_t dtype_int32; - nstatus = napi_get_value_int32(env, dtype_value, &dtype_int32); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - TFE_TensorHandle *tfe_handle = CreateTFE_TensorHandleFromJSValues( - env, shape_vector.data(), shape_vector.size(), - static_cast(dtype_int32), array_value); - - // Check to see if an exception exists, if so return a failure. - if (IsExceptionPending(env)) { - return nullptr; - } - - // Copy non-int32 and non-string tensors to a device. Most GPU kernels expect - // to have int32 tensors in host memory. - if (dtype_int32 != TF_INT32 && dtype_int32 != TF_STRING) { - // Note that this is a shallow copy and will share the underlying buffer - // if copying to the same device. - TFE_TensorHandle *new_handle = CopyTFE_TensorHandleToDevice( - env, device_name.c_str(), tfe_handle, tfe_context_); - - TFE_DeleteTensorHandle(tfe_handle); - tfe_handle = new_handle; - } - - napi_value output_tensor_id; - nstatus = napi_create_int32(env, InsertHandle(tfe_handle), &output_tensor_id); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - return output_tensor_id; -} - -void TFJSBackend::DeleteTensor(napi_env env, napi_value tensor_id_value) { - int32_t tensor_id; - ENSURE_NAPI_OK(env, napi_get_value_int32(env, tensor_id_value, &tensor_id)); - - auto tensor_entry = tfe_handle_map_.find(tensor_id); - if (tensor_entry == tfe_handle_map_.end()) { - NAPI_THROW_ERROR(env, - "Delete called on a Tensor not referenced (tensor_id: %d)", - tensor_id); - return; - } - - TFE_DeleteTensorHandle(tensor_entry->second); - tfe_handle_map_.erase(tensor_entry); -} - -napi_value TFJSBackend::GetTensorData(napi_env env, - napi_value tensor_id_value) { - int32_t tensor_id; - ENSURE_NAPI_OK_RETVAL( - env, napi_get_value_int32(env, tensor_id_value, &tensor_id), nullptr); - - auto tensor_entry = tfe_handle_map_.find(tensor_id); - if (tensor_entry == tfe_handle_map_.end()) { - NAPI_THROW_ERROR( - env, "Get data called on a Tensor not referenced (tensor_id: %d)", - tensor_id); - return nullptr; - } - - napi_value js_value; - CopyTFE_TensorHandleDataToJSData(env, tfe_context_, tensor_entry->second, - &js_value); - return js_value; -} - -napi_value TFJSBackend::ExecuteOp(napi_env env, napi_value op_name_value, - napi_value op_attr_inputs, - napi_value input_tensor_ids, - napi_value num_output_values) { - napi_status nstatus; - - std::string op_name; - nstatus = GetStringParam(env, op_name_value, op_name); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - TF_AutoStatus tf_status; - TFE_AutoOp tfe_op(TFE_NewOp(tfe_context_, op_name.c_str(), tf_status.status)); - ENSURE_TF_OK_RETVAL(env, tf_status, nullptr); - - uint32_t num_input_ids; - nstatus = napi_get_array_length(env, input_tensor_ids, &num_input_ids); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - for (uint32_t i = 0; i < num_input_ids; i++) { - napi_value cur_input_id; - nstatus = napi_get_element(env, input_tensor_ids, i, &cur_input_id); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - int32_t cur_input_tensor_id; - nstatus = napi_get_value_int32(env, cur_input_id, &cur_input_tensor_id); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - auto input_tensor_entry = tfe_handle_map_.find(cur_input_tensor_id); - if (input_tensor_entry == tfe_handle_map_.end()) { - NAPI_THROW_ERROR(env, "Input Tensor ID not referenced (tensor_id: %d)", - cur_input_tensor_id); - return nullptr; - } - - TFE_OpAddInput(tfe_op.op, input_tensor_entry->second, tf_status.status); - ENSURE_TF_OK_RETVAL(env, tf_status, nullptr); - } - - uint32_t op_attrs_length; - nstatus = napi_get_array_length(env, op_attr_inputs, &op_attrs_length); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - for (uint32_t i = 0; i < op_attrs_length; i++) { - napi_value cur_op_attr; - nstatus = napi_get_element(env, op_attr_inputs, i, &cur_op_attr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - AssignOpAttr(env, tfe_op.op, cur_op_attr); - - // Check to see if an exception exists, if so return a failure. - if (IsExceptionPending(env)) { - return nullptr; - } - } - - int32_t num_outputs; - nstatus = napi_get_value_int32(env, num_output_values, &num_outputs); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Push `nullptr` to get a valid pointer in the call to `TFE_Execute()` - // below. - std::vector result_handles(num_outputs, nullptr); - - int size = result_handles.size(); - TFE_Execute(tfe_op.op, result_handles.data(), &size, tf_status.status); - ENSURE_TF_OK_RETVAL(env, tf_status, nullptr); - - napi_value output_tensor_infos; - nstatus = napi_create_array_with_length(env, size, &output_tensor_infos); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - for (int32_t i = 0; i < num_outputs; i++) { - TFE_TensorHandle *handle = result_handles[i]; - napi_value tensor_info_value = GenerateOutputTensorInfo(env, handle); - // Push into output array - nstatus = napi_set_element(env, output_tensor_infos, i, tensor_info_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - } - - return output_tensor_infos; -} - -/* Helper function to generate TensorInfo(used for JavaScript) from - * TFE_TensorHandle. This helper function is used by ExecuteOp() and - * RunSavedModel(). - */ -napi_value TFJSBackend::GenerateOutputTensorInfo(napi_env env, - TFE_TensorHandle *handle) { - napi_status nstatus; - - // Output tensor info object: - napi_value tensor_info_value; - nstatus = napi_create_object(env, &tensor_info_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Output tensor ID: - napi_value output_tensor_id_value; - nstatus = - napi_create_int32(env, InsertHandle(handle), &output_tensor_id_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - nstatus = napi_set_named_property(env, tensor_info_value, "id", - output_tensor_id_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Output tensor shape: - napi_value shape_value; - GetTFE_TensorHandleShape(env, handle, &shape_value); - - nstatus = - napi_set_named_property(env, tensor_info_value, "shape", shape_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Output tensor dtype: - napi_value type_value; - GetTFE_TensorHandleType(env, handle, &type_value); - - nstatus = - napi_set_named_property(env, tensor_info_value, "dtype", type_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - return tensor_info_value; -} - -napi_value TFJSBackend::LoadSavedModel(napi_env env, - napi_value export_dir_value, - napi_value tags_value) { - TF_SessionOptions *session_options = TF_NewSessionOptions(); - - TF_Buffer *run_options = TF_NewBufferFromString("", 0); - - std::string export_dir_string; - napi_status nstatus; - nstatus = GetStringParam(env, export_dir_value, export_dir_string); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - const char *export_dir = export_dir_string.c_str(); - - std::string tags; - nstatus = GetStringParam(env, tags_value, tags); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - std::vector tags_ptrs = splitStringByComma(tags); - - TF_Graph *graph = TF_NewGraph(); - - TF_Buffer *metagraph = TF_NewBuffer(); - - TF_AutoStatus tf_status; - - TF_Session *session = TF_LoadSessionFromSavedModel( - session_options, run_options, export_dir, tags_ptrs.data(), - tags_ptrs.size(), graph, metagraph, tf_status.status); - // Delete objects that are necessary when loading the SavedModel but not gonna - // be used later. - TF_DeleteSessionOptions(session_options); - TF_DeleteBuffer(run_options); - TF_DeleteBuffer(metagraph); - - if (TF_GetCode(tf_status.status) != TF_OK) { - NAPI_THROW_ERROR(env, "Failed to load SavedModel: %s", - TF_Message(tf_status.status)); - return nullptr; - } - - napi_value output_session_id; - nstatus = napi_create_int32(env, InsertSavedModel(session, graph), - &output_session_id); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // clean up the tags strings. - for (uint32_t i = 0; i < tags_ptrs.size(); i++) { - delete tags_ptrs[i]; - } - return output_session_id; -} - -void TFJSBackend::DeleteSavedModel(napi_env env, - napi_value savedmodel_id_value) { - int32_t savedmodel_id; - ENSURE_NAPI_OK( - env, napi_get_value_int32(env, savedmodel_id_value, &savedmodel_id)); - - auto savedmodel_entry = tf_savedmodel_map_.find(savedmodel_id); - if (savedmodel_entry == tf_savedmodel_map_.end()) { - NAPI_THROW_ERROR( - env, "Delete called on a SavedModel not found (savedmodel_id: %d)", - savedmodel_id); - return; - } - - TF_AutoStatus tf_status; - TF_DeleteSession(savedmodel_entry->second.first, tf_status.status); - if (TF_GetCode(tf_status.status) != TF_OK) { - NAPI_THROW_ERROR(env, "Failed to delete SavedModel: %s", - TF_Message(tf_status.status)); - return; - } - // TODO(kangyizhang): Add tests to validate TF_Session and TF_Graph are - // deleted. - TF_DeleteGraph(savedmodel_entry->second.second); - tf_savedmodel_map_.erase(savedmodel_entry); -} - -napi_value TFJSBackend::RunSavedModel(napi_env env, - napi_value savedmodel_id_value, - napi_value input_tensor_ids, - napi_value input_op_names_value, - napi_value output_op_names_value) { - napi_status nstatus; - TF_AutoStatus tf_status; - - int32_t savedmodel_id; - nstatus = napi_get_value_int32(env, savedmodel_id_value, &savedmodel_id); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Get corresponding SavedModel session and graph. - auto savedmodel_entry = tf_savedmodel_map_.find(savedmodel_id); - if (savedmodel_entry == tf_savedmodel_map_.end()) { - NAPI_THROW_ERROR(env, "SavedModel ID not found (savedmodel_id: %d)", - savedmodel_id); - return nullptr; - } - - std::string input_op_names; - nstatus = GetStringParam(env, input_op_names_value, input_op_names); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - std::string output_op_names; - nstatus = GetStringParam(env, output_op_names_value, output_op_names); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Get input/output op names as vector - std::vector input_op_name_array = - splitStringByComma(input_op_names); - std::vector output_op_name_array = - splitStringByComma(output_op_names); - - std::vector inputs; - std::vector outputs; - - uint32_t num_input_ids; - nstatus = napi_get_array_length(env, input_tensor_ids, &num_input_ids); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - if (input_op_name_array.size() != num_input_ids) { - NAPI_THROW_ERROR(env, - "Length of input op names (%d) does not match the length " - "of input tensors (%d).", - input_op_name_array.size(), num_input_ids); - return nullptr; - } - - std::vector input_values; - - for (uint32_t i = 0; i < num_input_ids; i++) { - napi_value cur_input_id; - nstatus = napi_get_element(env, input_tensor_ids, i, &cur_input_id); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - int32_t cur_input_tensor_id; - nstatus = napi_get_value_int32(env, cur_input_id, &cur_input_tensor_id); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Find input tensor based on tensor id. - auto tensor_entry = tfe_handle_map_.find(cur_input_tensor_id); - if (tensor_entry == tfe_handle_map_.end()) { - NAPI_THROW_ERROR(env, "Input Tensor ID not found (tensor_id: %d)", - cur_input_tensor_id); - return nullptr; - } - TF_Tensor *inputTensor = - TFE_TensorHandleResolve(tensor_entry->second, tf_status.status); - - if (TF_GetCode(tf_status.status) != TF_OK) { - NAPI_THROW_ERROR( - env, "Failed to get input tensor (tensor_id: %d) for session.", - cur_input_tensor_id); - return nullptr; - } - - // Add input tensor into input values list. - input_values.push_back(inputTensor); - - // The item in input_op_name_array is something like "serving_default_x:0". - // Parse it into input op name and index for provided tensor. - std::string name(input_op_name_array[i]); - int index = name.find(":"); - std::string input_op_name = name.substr(0, index); - std::string input_op_index = name.substr(index + 1); - int input_tensor_index; - if (input_op_index.length() == 0) { - input_tensor_index = 0; - } else { - input_tensor_index = atoi(input_op_index.c_str()); - } - - // Add input op into input ops list. - // TODO(kangyizhang): Store these TF_Operations somewhere so they don't need - // to be generated every time. - TF_Operation *input_op = TF_GraphOperationByName( - savedmodel_entry->second.second, input_op_name.c_str()); - if (input_op == nullptr) { - NAPI_THROW_ERROR(env, "Input op name can not be found in the graph."); - return nullptr; - } - TF_Output in = {input_op, input_tensor_index}; - inputs.push_back(in); - } - - // Add output op into output ops list. - for (uint32_t i = 0; i < output_op_name_array.size(); i++) { - // The item in output_op_name_array is something like - // "StatefulPartitionedCall:0". Parse it into output op name and index. - std::string name(output_op_name_array[i]); - int index = name.find(":"); - std::string output_op_name = name.substr(0, index); - std::string output_op_index = name.substr(index + 1); - int output_tensor_index; - if (output_op_index.length() == 0) { - output_tensor_index = 0; - } else { - output_tensor_index = atoi(output_op_index.c_str()); - } - - TF_Operation *output_op = TF_GraphOperationByName( - savedmodel_entry->second.second, output_op_name.c_str()); - if (output_op == nullptr) { - NAPI_THROW_ERROR(env, "Output op name can not be found in the graph."); - return nullptr; - } - TF_Output out = {output_op, output_tensor_index}; - outputs.push_back(out); - } - - std::vector output_values(outputs.size(), nullptr); - - TF_SessionRun(savedmodel_entry->second.first, nullptr, inputs.data(), - input_values.data(), num_input_ids, outputs.data(), - output_values.data(), output_op_name_array.size(), nullptr, 0, - nullptr, tf_status.status); - - if (TF_GetCode(tf_status.status) != TF_OK) { - NAPI_THROW_ERROR(env, "Session fail to run with error: %s", - TF_Message(tf_status.status)); - return nullptr; - } - - napi_value output_tensor_infos; - nstatus = napi_create_array_with_length(env, 1, &output_tensor_infos); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - // Generate output tensors for JS. - for (uint32_t i = 0; i < output_op_name_array.size(); i++) { - TFE_TensorHandle *tfe_handle = - TFE_NewTensorHandle(output_values[i], tf_status.status); - // Deallocate output TF_Tensor in C++. - TF_DeleteTensor(output_values[i]); - - napi_value tensor_info_value = GenerateOutputTensorInfo(env, tfe_handle); - // Push into output array - nstatus = napi_set_element(env, output_tensor_infos, i, tensor_info_value); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - // delete output op name string - delete output_op_name_array[i]; - } - - for (uint32_t i = 0; i < num_input_ids; i++) { - // Deallocate input TF_Tensor in C++. - TF_DeleteTensor(input_values[i]); - // delete input op name string - delete input_op_name_array[i]; - } - - return output_tensor_infos; -} - -napi_value TFJSBackend::GetNumOfSavedModels(napi_env env) { - napi_status nstatus; - napi_value num_saved_models; - nstatus = - napi_create_int32(env, tf_savedmodel_map_.size(), &num_saved_models); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - return num_saved_models; -} - -} // namespace tfnodejs diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_backend.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_backend.h deleted file mode 100644 index 78ccb4ccd..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_backend.h +++ /dev/null @@ -1,108 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#ifndef TF_NODEJS_TFJS_BACKEND_H_ -#define TF_NODEJS_TFJS_BACKEND_H_ - -#include -#include -#include -#include -#include "tensorflow/c/c_api.h" -#include "tensorflow/c/eager/c_api.h" - -namespace tfnodejs { - -class TFJSBackend { - public: - // Creates, initializes, and returns a TFJSBackend instance. If initialization - // fails, a nullptr is returned. - static TFJSBackend *Create(napi_env env); - - // Creates a new Tensor with given shape and data and returns an ID that - // refernces the new Tensor. - // - shape_value (number[]) - // - dtype_value (number) - // - array_value (TypedArray|Array) - napi_value CreateTensor(napi_env env, napi_value shape_value, - napi_value dtype_value, napi_value array_value); - - // Deletes a created Tensor. - // - tensor_id_value (number) - void DeleteTensor(napi_env env, napi_value tensor_id_value); - - // Returns a typed-array as a `napi_value` with the data associated with the - // TF/TFE pointers. - // - tensor_id_value (number) - napi_value GetTensorData(napi_env env, napi_value tensor_id_value); - - // Executes a TFE Op and returns an array of objects containing tensor - // attributes (id, dtype, shape). - // - op_name_value (string) - // - op_attr_inputs (array of TFE Op attributes) - // - input_tensor_ids (array of input tensor IDs) - // - num_output_values (number) - napi_value ExecuteOp(napi_env env, napi_value op_name_value, - napi_value op_attr_inputs, napi_value input_tensor_ids, - napi_value num_output_values); - - // Load a SavedModel from a path: - // - export_dir (string) - // - tags_value (string) - napi_value LoadSavedModel(napi_env env, napi_value export_dir, - napi_value tags_value); - - // Delete the SavedModel corresponding TF_Session and TF_Graph - // - saved_model_id (number) - void DeleteSavedModel(napi_env env, napi_value saved_model_id); - - // Execute a session from SavedModel with the provided inputs: - // - saved_model_id (number) - // - input_tensor_ids (array of input tensor IDs) - // - input_op_names (array of input op names) - // - output_op_names (array of output op names) - napi_value RunSavedModel(napi_env env, napi_value saved_model_id, - napi_value input_tensor_ids, - napi_value input_op_names, - napi_value output_op_names); - - // Get number of loaded SavedModel in the backend: - napi_value GetNumOfSavedModels(napi_env env); - - private: - TFJSBackend(napi_env env); - ~TFJSBackend(); - - int32_t InsertHandle(TFE_TensorHandle *tfe_handle); - int32_t InsertSavedModel(TF_Session *tf_session, TF_Graph *tf_graph); - napi_value GenerateOutputTensorInfo(napi_env env, TFE_TensorHandle *handle); - - TFE_Context *tfe_context_; - std::unordered_map tfe_handle_map_; - std::unordered_map> - tf_savedmodel_map_; - int32_t next_tensor_id_; - int32_t next_savedmodel_id_; - std::string device_name; - - public: - bool is_gpu_device; -}; - -} // namespace tfnodejs - -#endif // TF_NODEJS_TFJS_BACKEND_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_binding.cc b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_binding.cc deleted file mode 100644 index 6ec7c5d09..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/tfjs_binding.cc +++ /dev/null @@ -1,296 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#include -#include "tfjs_backend.h" -#include "utils.h" - -namespace tfnodejs { - -TFJSBackend *gBackend = nullptr; - -static void AssignIntProperty(napi_env env, napi_value exports, - const char *name, int32_t value) { - napi_value js_value; - napi_status nstatus = napi_create_int32(env, value, &js_value); - ENSURE_NAPI_OK(env, nstatus); - - napi_property_descriptor property = {name, nullptr, nullptr, - nullptr, nullptr, js_value, - napi_default, nullptr}; - nstatus = napi_define_properties(env, exports, 1, &property); - ENSURE_NAPI_OK(env, nstatus); -} - -static napi_value CreateTensor(napi_env env, napi_callback_info info) { - napi_status nstatus; - - // Create tensor takes 3 params: shape, dtype, typed-array/array: - size_t argc = 3; - napi_value args[3]; - napi_value js_this; - nstatus = napi_get_cb_info(env, info, &argc, args, &js_this, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - if (argc < 3) { - NAPI_THROW_ERROR(env, - "Invalid number of args passed to createTensor(). " - "Expecting 3 args but got %d.", - argc); - return nullptr; - } - - ENSURE_VALUE_IS_ARRAY_RETVAL(env, args[0], nullptr); - ENSURE_VALUE_IS_NUMBER_RETVAL(env, args[1], nullptr); - - // The third array can either be a typed array or an array: - bool is_typed_array; - nstatus = napi_is_typedarray(env, args[2], &is_typed_array); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - if (!is_typed_array) { - ENSURE_VALUE_IS_ARRAY_RETVAL(env, args[2], nullptr); - } - - return gBackend->CreateTensor(env, args[0], args[1], args[2]); -} - -static napi_value DeleteTensor(napi_env env, napi_callback_info info) { - napi_status nstatus; - - // Delete tensor takes 1 param: tensor ID; - size_t argc = 1; - napi_value args[1]; - napi_value js_this; - nstatus = napi_get_cb_info(env, info, &argc, args, &js_this, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, js_this); - - if (argc < 1) { - NAPI_THROW_ERROR(env, - "Invalid number of args passed to deleteTensor(). " - "Expecting 1 arg but got %d.", - argc); - return js_this; - } - - ENSURE_VALUE_IS_NUMBER_RETVAL(env, args[0], js_this); - - gBackend->DeleteTensor(env, args[0]); - return js_this; -} - -static napi_value TensorDataSync(napi_env env, napi_callback_info info) { - napi_status nstatus; - - // Tensor data-sync takes 1 param: tensor ID; - size_t argc = 1; - napi_value args[1]; - napi_value js_this; - nstatus = napi_get_cb_info(env, info, &argc, args, &js_this, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, js_this); - - if (argc < 1) { - NAPI_THROW_ERROR(env, - "Invalid number of args passed to tensorDataSync(). " - "Expecting 1 arg but got %d.", - argc); - return nullptr; - } - - ENSURE_VALUE_IS_NUMBER_RETVAL(env, args[0], js_this); - - return gBackend->GetTensorData(env, args[0]); -} - -static napi_value ExecuteOp(napi_env env, napi_callback_info info) { - napi_status nstatus; - - // Create tensor takes 4 params: op-name, op-attrs, input-tensor-ids, - // num-outputs: - size_t argc = 4; - napi_value args[4]; - napi_value js_this; - nstatus = napi_get_cb_info(env, info, &argc, args, &js_this, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - if (argc < 4) { - NAPI_THROW_ERROR(env, - "Invalid number of args passed to executeOp(). Expecting " - "4 args but got %d.", - argc); - return nullptr; - } - - ENSURE_VALUE_IS_STRING_RETVAL(env, args[0], nullptr); - ENSURE_VALUE_IS_ARRAY_RETVAL(env, args[1], nullptr); - ENSURE_VALUE_IS_ARRAY_RETVAL(env, args[2], nullptr); - ENSURE_VALUE_IS_NUMBER_RETVAL(env, args[3], nullptr); - - return gBackend->ExecuteOp(env, args[0], args[1], args[2], args[3]); -} - -static napi_value IsUsingGPUDevice(napi_env env, napi_callback_info info) { - napi_value result; - - napi_status nstatus; - nstatus = napi_get_boolean(env, gBackend->is_gpu_device, &result); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - return result; -} - -static napi_value LoadSavedModel(napi_env env, napi_callback_info info) { - napi_status nstatus; - - // Load saved model takes 2 params: export_dir, tags: - size_t argc = 2; - napi_value args[2]; - napi_value js_this; - nstatus = napi_get_cb_info(env, info, &argc, args, &js_this, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - if (argc < 2) { - NAPI_THROW_ERROR(env, - "Invalid number of args passed to LoadSavedModel(). " - "Expecting 2 args but got %d.", - argc); - return nullptr; - } - - ENSURE_VALUE_IS_STRING_RETVAL(env, args[0], nullptr); - ENSURE_VALUE_IS_STRING_RETVAL(env, args[1], nullptr); - - return gBackend->LoadSavedModel(env, args[0], args[1]); -} - -static napi_value DeleteSavedModel(napi_env env, napi_callback_info info) { - napi_status nstatus; - - // Delete SavedModel takes 1 param: savedModel ID; - size_t argc = 1; - napi_value args[1]; - napi_value js_this; - nstatus = napi_get_cb_info(env, info, &argc, args, &js_this, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, js_this); - - if (argc < 1) { - NAPI_THROW_ERROR(env, - "Invalid number of args passed to deleteSavedModel(). " - "Expecting 1 arg but got %d.", - argc); - return js_this; - } - - ENSURE_VALUE_IS_NUMBER_RETVAL(env, args[0], js_this); - - gBackend->DeleteSavedModel(env, args[0]); - return js_this; -} - -static napi_value RunSavedModel(napi_env env, napi_callback_info info) { - napi_status nstatus; - - // Run SavedModel takes 4 params: session_id, input_tensor_ids, - // input_op_names, output_op_names. - size_t argc = 4; - napi_value args[4]; - napi_value js_this; - nstatus = napi_get_cb_info(env, info, &argc, args, &js_this, nullptr); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nullptr); - - if (argc < 4) { - NAPI_THROW_ERROR(env, "Invalid number of args passed to RunSavedModel()"); - return nullptr; - } - - ENSURE_VALUE_IS_NUMBER_RETVAL(env, args[0], nullptr); - ENSURE_VALUE_IS_ARRAY_RETVAL(env, args[1], nullptr); - ENSURE_VALUE_IS_STRING_RETVAL(env, args[2], nullptr); - ENSURE_VALUE_IS_STRING_RETVAL(env, args[3], nullptr); - - return gBackend->RunSavedModel(env, args[0], args[1], args[2], args[3]); -} - -static napi_value GetNumOfSavedModels(napi_env env, napi_callback_info info) { - // Delete SavedModel takes 0 param; - return gBackend->GetNumOfSavedModels(env); -} - -static napi_value InitTFNodeJSBinding(napi_env env, napi_value exports) { - napi_status nstatus; - - gBackend = TFJSBackend::Create(env); - ENSURE_VALUE_IS_NOT_NULL_RETVAL(env, gBackend, nullptr); - - // TF version - napi_value tf_version; - nstatus = napi_create_string_latin1(env, TF_Version(), -1, &tf_version); - ENSURE_NAPI_OK_RETVAL(env, nstatus, exports); - - // Set all export values list here. - napi_property_descriptor exports_properties[] = { - {"createTensor", nullptr, CreateTensor, nullptr, nullptr, nullptr, - napi_default, nullptr}, - {"deleteTensor", nullptr, DeleteTensor, nullptr, nullptr, nullptr, - napi_default, nullptr}, - {"tensorDataSync", nullptr, TensorDataSync, nullptr, nullptr, nullptr, - napi_default, nullptr}, - {"executeOp", nullptr, ExecuteOp, nullptr, nullptr, nullptr, napi_default, - nullptr}, - {"loadSavedModel", nullptr, LoadSavedModel, nullptr, nullptr, nullptr, - napi_default, nullptr}, - {"deleteSavedModel", nullptr, DeleteSavedModel, nullptr, nullptr, nullptr, - napi_default, nullptr}, - {"runSavedModel", nullptr, RunSavedModel, nullptr, nullptr, nullptr, - napi_default, nullptr}, - {"TF_Version", nullptr, nullptr, nullptr, nullptr, tf_version, - napi_default, nullptr}, - {"isUsingGpuDevice", nullptr, IsUsingGPUDevice, nullptr, nullptr, nullptr, - napi_default, nullptr}, - {"getNumOfSavedModels", nullptr, GetNumOfSavedModels, nullptr, nullptr, - nullptr, napi_default, nullptr}, - }; - nstatus = napi_define_properties(env, exports, ARRAY_SIZE(exports_properties), - exports_properties); - ENSURE_NAPI_OK_RETVAL(env, nstatus, exports); - - // Export TF property types to JS -#define EXPORT_INT_PROPERTY(v) AssignIntProperty(env, exports, #v, v) - // Types - EXPORT_INT_PROPERTY(TF_FLOAT); - EXPORT_INT_PROPERTY(TF_INT32); - EXPORT_INT_PROPERTY(TF_INT64); - EXPORT_INT_PROPERTY(TF_BOOL); - EXPORT_INT_PROPERTY(TF_COMPLEX64); - EXPORT_INT_PROPERTY(TF_STRING); - EXPORT_INT_PROPERTY(TF_RESOURCE); - EXPORT_INT_PROPERTY(TF_UINT8); - - // Op AttrType - EXPORT_INT_PROPERTY(TF_ATTR_STRING); - EXPORT_INT_PROPERTY(TF_ATTR_INT); - EXPORT_INT_PROPERTY(TF_ATTR_FLOAT); - EXPORT_INT_PROPERTY(TF_ATTR_BOOL); - EXPORT_INT_PROPERTY(TF_ATTR_TYPE); - EXPORT_INT_PROPERTY(TF_ATTR_SHAPE); -#undef EXPORT_INT_PROPERTY - - return exports; -} - -NAPI_MODULE(tfe_binding, InitTFNodeJSBinding) - -} // namespace tfnodejs diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/utils.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/utils.h deleted file mode 100644 index b620845a9..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/binding/utils.h +++ /dev/null @@ -1,329 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ - -#ifndef TF_NODEJS_UTILS_H_ -#define TF_NODEJS_UTILS_H_ - -#include -#include -#include -#include -#include -#include -#include "tensorflow/c/c_api.h" -#include "tf_auto_status.h" - -#define MAX_TENSOR_SHAPE 4 - -#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) - -#ifndef DEBUG -#define DEBUG 0 -#endif - -#define DEBUG_LOG(message, file, line_number) \ - do { \ - if (DEBUG) \ - fprintf(stderr, "** -%s:%zu\n-- %s\n", file, line_number, message); \ - } while (0) - -namespace tfnodejs { - -#define NAPI_THROW_ERROR(env, message, ...) \ - NapiThrowError(env, __FILE__, __LINE__, message, ##__VA_ARGS__); - -inline void NapiThrowError(napi_env env, const char *file, - const size_t line_number, const char *message, ...) { - char buffer[500]; - va_list args; - va_start(args, message); - std::vsnprintf(buffer, 500, message, args); - va_end(args); - DEBUG_LOG(buffer, file, line_number); - napi_throw_error(env, nullptr, buffer); -} - -#define ENSURE_NAPI_OK(env, status) \ - if (!EnsureNapiOK(env, status, __FILE__, __LINE__)) return; -#define ENSURE_NAPI_OK_RETVAL(env, status, retval) \ - if (!EnsureNapiOK(env, status, __FILE__, __LINE__)) return retval; - -inline bool EnsureNapiOK(napi_env env, napi_status status, const char *file, - const size_t line_number) { - if (status != napi_ok) { - const napi_extended_error_info *error_info = 0; - napi_get_last_error_info(env, &error_info); - NapiThrowError( - env, file, line_number, "Invalid napi_status: %s\n", - error_info->error_message ? error_info->error_message : "unknown"); - } - return status == napi_ok; -} - -#define ENSURE_TF_OK(env, status) \ - if (!EnsureTFOK(env, status, __FILE__, __LINE__)) return; -#define ENSURE_TF_OK_RETVAL(env, status, retval) \ - if (!EnsureTFOK(env, status, __FILE__, __LINE__)) return retval; - -inline bool EnsureTFOK(napi_env env, TF_AutoStatus &status, const char *file, - const size_t line_number) { - TF_Code tf_code = TF_GetCode(status.status); - if (tf_code != TF_OK) { - NapiThrowError(env, file, line_number, "Invalid TF_Status: %u\nMessage: %s", - TF_GetCode(status.status), TF_Message(status.status)); - } - return tf_code == TF_OK; -} - -#define ENSURE_CONSTRUCTOR_CALL(env, info) \ - if (!EnsureConstructorCall(env, info, __FILE__, __LINE__)) return; -#define ENSURE_CONSTRUCTOR_CALL_RETVAL(env, info, retval) \ - if (!EnsureConstructorCall(env, info, __FILE__, __LINE__)) return retval; - -inline bool EnsureConstructorCall(napi_env env, napi_callback_info info, - const char *file, const size_t line_number) { - napi_value js_target; - napi_status nstatus = napi_get_new_target(env, info, &js_target); - ENSURE_NAPI_OK_RETVAL(env, nstatus, false); - bool is_target = js_target != nullptr; - if (!is_target) { - NapiThrowError(env, file, line_number, - "Function not used as a constructor!"); - } - return is_target; -} - -#define ENSURE_VALUE_IS_OBJECT(env, value) \ - if (!EnsureValueIsObject(env, value, __FILE__, __LINE__)) return; -#define ENSURE_VALUE_IS_OBJECT_RETVAL(env, value, retval) \ - if (!EnsureValueIsObject(env, value, __FILE__, __LINE__)) return retval; - -inline bool EnsureValueIsObject(napi_env env, napi_value value, - const char *file, const size_t line_number) { - napi_valuetype type; - ENSURE_NAPI_OK_RETVAL(env, napi_typeof(env, value, &type), false); - bool is_object = type == napi_object; - if (!is_object) { - NapiThrowError(env, file, line_number, "Argument is not an object!"); - } - return is_object; -} - -#define ENSURE_VALUE_IS_STRING(env, value) \ - if (!EnsureValueIsString(env, value, __FILE__, __LINE__)) return; -#define ENSURE_VALUE_IS_STRING_RETVAL(env, value, retval) \ - if (!EnsureValueIsString(env, value, __FILE__, __LINE__)) return retval; - -inline bool EnsureValueIsString(napi_env env, napi_value value, - const char *file, const size_t line_number) { - napi_valuetype type; - ENSURE_NAPI_OK_RETVAL(env, napi_typeof(env, value, &type), false); - bool is_string = type == napi_string; - if (!is_string) { - NapiThrowError(env, file, line_number, "Argument is not a string!"); - } - return is_string; -} - -#define ENSURE_VALUE_IS_NUMBER(env, value) \ - if (!EnsureValueIsNumber(env, value, __FILE__, __LINE__)) return; -#define ENSURE_VALUE_IS_NUMBER_RETVAL(env, value, retval) \ - if (!EnsureValueIsNumber(env, value, __FILE__, __LINE__)) return retval; - -inline bool EnsureValueIsNumber(napi_env env, napi_value value, - const char *file, const size_t line_number) { - napi_valuetype type; - ENSURE_NAPI_OK_RETVAL(env, napi_typeof(env, value, &type), false); - bool is_number = type == napi_number; - if (!is_number) { - NapiThrowError(env, file, line_number, "Argument is not a number!"); - } - return is_number; -} - -#define ENSURE_VALUE_IS_ARRAY(env, value) \ - if (!EnsureValueIsArray(env, value, __FILE__, __LINE__)) return; -#define ENSURE_VALUE_IS_ARRAY_RETVAL(env, value, retval) \ - if (!EnsureValueIsArray(env, value, __FILE__, __LINE__)) return retval; - -inline bool EnsureValueIsArray(napi_env env, napi_value value, const char *file, - const size_t line_number) { - bool is_array; - ENSURE_NAPI_OK_RETVAL(env, napi_is_array(env, value, &is_array), false); - if (!is_array) { - NapiThrowError(env, file, line_number, "Argument is not an array!"); - } - return is_array; -} - -#define ENSURE_VALUE_IS_TYPED_ARRAY(env, value) \ - if (!EnsureValueIsTypedArray(env, value, __FILE__, __LINE__)) return; -#define ENSURE_VALUE_IS_TYPED_ARRAY_RETVAL(env, value, retval) \ - if (!EnsureValueIsTypedArray(env, value, __FILE__, __LINE__)) return retval; - -inline bool EnsureValueIsTypedArray(napi_env env, napi_value value, - const char *file, - const size_t line_number) { - bool is_array; - ENSURE_NAPI_OK_RETVAL(env, napi_is_typedarray(env, value, &is_array), false); - if (!is_array) { - NapiThrowError(env, file, line_number, "Argument is not a typed-array!"); - } - return is_array; -} - -#define ENSURE_VALUE_IS_LESS_THAN(env, value, max) \ - if (!EnsureValueIsLessThan(env, value, max, __FILE__, __LINE__)) return; -#define ENSURE_VALUE_IS_LESS_THAN_RETVAL(env, value, max, retval) \ - if (!EnsureValueIsLessThan(env, value, max, __FILE__, __LINE__)) \ - return retval; - -inline bool EnsureValueIsLessThan(napi_env env, uint32_t value, uint32_t max, - const char *file, const size_t line_number) { - if (value > max) { - NapiThrowError(env, file, line_number, - "Argument is greater than max: %u > %u", value, max); - return false; - } else { - return true; - } -} - -#define REPORT_UNKNOWN_TF_DATA_TYPE(env, type) \ - ReportUnknownTFDataType(env, type, __FILE__, __LINE__) - -inline void ReportUnknownTFDataType(napi_env env, TF_DataType type, - const char *file, - const size_t line_number) { - NapiThrowError(env, file, line_number, "Unhandled TF_DataType: %u\n", type); -} - -#define REPORT_UNKNOWN_TF_ATTR_TYPE(env, type) \ - ReportUnknownTFAttrType(env, type, __FILE__, __LINE__) - -inline void ReportUnknownTFAttrType(napi_env env, TF_AttrType type, - const char *file, - const size_t line_number) { - NapiThrowError(env, file, line_number, "Unhandled TF_AttrType: %u\n", type); -} - -#define REPORT_UNKNOWN_TYPED_ARRAY_TYPE(env, type) \ - ReportUnknownTypedArrayType(env, type, __FILE__, __LINE__) - -inline void ReportUnknownTypedArrayType(napi_env env, napi_typedarray_type type, - const char *file, - const size_t line_number) { - NapiThrowError(env, file, line_number, "Unhandled napi typed_array_type: %u", - type); -} - -// Returns a vector with the shape values of an array. -inline void ExtractArrayShape(napi_env env, napi_value array_value, - std::vector *result) { - napi_status nstatus; - - uint32_t array_length; - nstatus = napi_get_array_length(env, array_value, &array_length); - ENSURE_NAPI_OK(env, nstatus); - - for (uint32_t i = 0; i < array_length; i++) { - napi_value dimension_value; - nstatus = napi_get_element(env, array_value, i, &dimension_value); - ENSURE_NAPI_OK(env, nstatus); - - int64_t dimension; - nstatus = napi_get_value_int64(env, dimension_value, &dimension); - ENSURE_NAPI_OK(env, nstatus); - - result->push_back(dimension); - } -} - -inline bool IsExceptionPending(napi_env env) { - bool has_exception = false; - ENSURE_NAPI_OK_RETVAL(env, napi_is_exception_pending(env, &has_exception), - has_exception); - return has_exception; -} - -#define ENSURE_VALUE_IS_NOT_NULL(env, value) \ - if (!EnsureValueIsNotNull(env, value, __FILE__, __LINE__)) return; -#define ENSURE_VALUE_IS_NOT_NULL_RETVAL(env, value, retval) \ - if (!EnsureValueIsNotNull(env, value, __FILE__, __LINE__)) return retval; - -inline bool EnsureValueIsNotNull(napi_env env, void *value, const char *file, - const size_t line_number) { - bool is_null = value == nullptr; - if (is_null) { - NapiThrowError(env, file, line_number, "Argument is null!"); - } - return !is_null; -} - -inline napi_status GetStringParam(napi_env env, napi_value string_value, - std::string &string) { - ENSURE_VALUE_IS_STRING_RETVAL(env, string_value, napi_invalid_arg); - - napi_status nstatus; - - size_t str_length; - nstatus = - napi_get_value_string_utf8(env, string_value, nullptr, 0, &str_length); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nstatus); - - char *buffer = (char *)(malloc(sizeof(char) * (str_length + 1))); - ENSURE_VALUE_IS_NOT_NULL_RETVAL(env, buffer, napi_generic_failure); - - nstatus = napi_get_value_string_utf8(env, string_value, buffer, - str_length + 1, &str_length); - ENSURE_NAPI_OK_RETVAL(env, nstatus, nstatus); - - string.assign(buffer, str_length); - free(buffer); - return napi_ok; -} - -// Returns the number of elements in a Tensor. -inline size_t GetTensorNumElements(TF_Tensor *tensor) { - size_t ret = 1; - for (int i = 0; i < TF_NumDims(tensor); ++i) { - ret *= TF_Dim(tensor, i); - } - return ret; -} - -// Split a string into an array of characters array with `,` as delimiter. -inline std::vector splitStringByComma(const std::string &str) { - std::vector tokens; - size_t prev = 0, pos = 0; - do { - pos = str.find(',', prev); - if (pos == std::string::npos) pos = str.length(); - std::string token = str.substr(prev, pos - prev); - if (!token.empty()) { - char *cstr = new char[str.length() + 1]; - std::strcpy(cstr, token.c_str()); - tokens.push_back(cstr); - } - prev = pos + 1; - } while (pos < str.length() && prev < str.length()); - return tokens; -} - -} // namespace tfnodejs - -#endif // TF_NODEJS_UTILS_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Makefile b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Makefile deleted file mode 100644 index 7606ebf0c..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Makefile +++ /dev/null @@ -1,329 +0,0 @@ -# We borrow heavily from the kernel build setup, though we are simpler since -# we don't have Kconfig tweaking settings on us. - -# The implicit make rules have it looking for RCS files, among other things. -# We instead explicitly write all the rules we care about. -# It's even quicker (saves ~200ms) to pass -r on the command line. -MAKEFLAGS=-r - -# The source directory tree. -srcdir := .. -abs_srcdir := $(abspath $(srcdir)) - -# The name of the builddir. -builddir_name ?= . - -# The V=1 flag on command line makes us verbosely print command lines. -ifdef V - quiet= -else - quiet=quiet_ -endif - -# Specify BUILDTYPE=Release on the command line for a release build. -BUILDTYPE ?= Release - -# Directory all our build output goes into. -# Note that this must be two directories beneath src/ for unit tests to pass, -# as they reach into the src/ directory for data with relative paths. -builddir ?= $(builddir_name)/$(BUILDTYPE) -abs_builddir := $(abspath $(builddir)) -depsdir := $(builddir)/.deps - -# Object output directory. -obj := $(builddir)/obj -abs_obj := $(abspath $(obj)) - -# We build up a list of every single one of the targets so we can slurp in the -# generated dependency rule Makefiles in one pass. -all_deps := - - - -CC.target ?= $(CC) -CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS) -CXX.target ?= $(CXX) -CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS) -LINK.target ?= $(LINK) -LDFLAGS.target ?= $(LDFLAGS) -AR.target ?= $(AR) - -# C++ apps need to be linked with g++. -LINK ?= $(CXX.target) - -# TODO(evan): move all cross-compilation logic to gyp-time so we don't need -# to replicate this environment fallback in make as well. -CC.host ?= gcc -CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host) -CXX.host ?= g++ -CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host) -LINK.host ?= $(CXX.host) -LDFLAGS.host ?= $(LDFLAGS_host) -AR.host ?= ar - -# Define a dir function that can handle spaces. -# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions -# "leading spaces cannot appear in the text of the first argument as written. -# These characters can be put into the argument value by variable substitution." -empty := -space := $(empty) $(empty) - -# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces -replace_spaces = $(subst $(space),?,$1) -unreplace_spaces = $(subst ?,$(space),$1) -dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) - -# Flags to make gcc output dependency info. Note that you need to be -# careful here to use the flags that ccache and distcc can understand. -# We write to a dep file on the side first and then rename at the end -# so we can't end up with a broken dep file. -depfile = $(depsdir)/$(call replace_spaces,$@).d -DEPFLAGS = -MMD -MF $(depfile).raw - -# We have to fixup the deps output in a few ways. -# (1) the file output should mention the proper .o file. -# ccache or distcc lose the path to the target, so we convert a rule of -# the form: -# foobar.o: DEP1 DEP2 -# into -# path/to/foobar.o: DEP1 DEP2 -# (2) we want missing files not to cause us to fail to build. -# We want to rewrite -# foobar.o: DEP1 DEP2 \ -# DEP3 -# to -# DEP1: -# DEP2: -# DEP3: -# so if the files are missing, they're just considered phony rules. -# We have to do some pretty insane escaping to get those backslashes -# and dollar signs past make, the shell, and sed at the same time. -# Doesn't work with spaces, but that's fine: .d files have spaces in -# their names replaced with other characters. -define fixup_dep -# The depfile may not exist if the input file didn't have any #includes. -touch $(depfile).raw -# Fixup path as in (1). -sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) -# Add extra rules as in (2). -# We remove slashes and replace spaces with new lines; -# remove blank lines; -# delete the first line and append a colon to the remaining lines. -sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ - grep -v '^$$' |\ - sed -e 1d -e 's|$$|:|' \ - >> $(depfile) -rm $(depfile).raw -endef - -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c - -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -# send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@") - -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group - -# We support two kinds of shared objects (.so): -# 1) shared_library, which is just bundling together many dependent libraries -# into a link line. -# 2) loadable_module, which is generating a module intended for dlopen(). -# -# They differ only slightly: -# In the former case, we want to package all dependent code into the .so. -# In the latter case, we want to package just the API exposed by the -# outermost module. -# This means shared_library uses --whole-archive, while loadable_module doesn't. -# (Note that --whole-archive is incompatible with the --start-group used in -# normal linking.) - -# Other shared-object link notes: -# - Set SONAME to the library filename so our binaries don't reference -# the local, absolute paths used on the link command-line. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) - - -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines with shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -# Helper that expands to a shell command to echo a string exactly as it is in -# make. This uses printf instead of echo because printf's behaviour with respect -# to escape sequences is more portable than echo's across different shells -# (e.g., dash, bash). -exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' - -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -# .d files contain ? instead of spaces, take that into account. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ - $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) - -# Helper that executes all postbuilds until one fails. -define do_postbuilds - @E=0;\ - for p in $(POSTBUILDS); do\ - eval $$p;\ - E=$$?;\ - if [ $$E -ne 0 ]; then\ - break;\ - fi;\ - done;\ - if [ $$E -ne 0 ]; then\ - rm -rf "$@";\ - exit $$E;\ - fi -endef - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. -# Third argument, if non-zero, makes it do POSTBUILDS processing. -# Note: We intentionally do NOT call dirx for depfile, since it contains ? for -# spaces already and dirx strips the ? characters. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @$(call exact_echo, $($(quiet)cmd_$(1))) - @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" - $(if $(findstring flock,$(word 1,$(cmd_$1))), - @$(cmd_$(1)) - @echo " $(quiet_cmd_$(1)): Finished", - @$(cmd_$(1)) - ) - @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) - @$(if $(2),$(fixup_dep)) - $(if $(and $(3), $(POSTBUILDS)), - $(call do_postbuilds) - ) -) -endef - -# Declare the "all" target first so it is the default, -# even though we don't have the deps yet. -.PHONY: all -all: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -TOOLSET := target -# Suffix rules, putting all outputs into $(obj). -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -# Try building from generated source, too. -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - - -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,action_after_build.target.mk)))),) - include action_after_build.target.mk -endif -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,tfjs_binding.target.mk)))),) - include tfjs_binding.target.mk -endif - -quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /usr/share/nodejs/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build/config.gypi -I/usr/share/nodejs/node-gyp/addon.gypi -I/usr/include/nodejs/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/usr/include/nodejs" "-Dnode_gyp_dir=/usr/share/nodejs/node-gyp" "-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node" "-Dnode_engine=v8" binding.gyp -Makefile: $(srcdir)/../../../../../../../../../../../../usr/include/nodejs/common.gypi $(srcdir)/../../../../../../../../../../../../usr/share/nodejs/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp - $(call do_cmd,regen_makefile) - -# "all" is a concatenation of the "all" targets from all the included -# sub-makefiles. This is just here to clarify. -all: - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. Only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/action_after_build.stamp.d b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/action_after_build.stamp.d deleted file mode 100644 index 71e13c401..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/action_after_build.stamp.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/obj.target/action_after_build.stamp := touch Release/obj.target/action_after_build.stamp diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding.node.d b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding.node.d deleted file mode 100644 index dbb13178e..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/obj.target/tfjs_binding.node := g++ -o Release/obj.target/tfjs_binding.node -shared -pthread -rdynamic -m64 -L/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib -Wl,-soname=tfjs_binding.node -Wl,--start-group Release/obj.target/tfjs_binding/binding/tfjs_backend.o Release/obj.target/tfjs_binding/binding/tfjs_binding.o -Wl,--end-group -lnode -Wl,-rpath,\$$ORIGIN/../../deps/lib -ltensorflow -ltensorflow_framework diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_backend.o.d b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_backend.o.d deleted file mode 100644 index 1a55a26dc..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_backend.o.d +++ /dev/null @@ -1,37 +0,0 @@ -cmd_Release/obj.target/tfjs_binding/binding/tfjs_backend.o := g++ -o Release/obj.target/tfjs_binding/binding/tfjs_backend.o ../binding/tfjs_backend.cc '-DNODE_GYP_MODULE_NAME=tfjs_binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/openssl/config -I/usr/include/nodejs/deps/openssl/openssl/include -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/zlib -I/usr/include/nodejs/deps/v8/include -I../.. -I/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fPIC -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF ./Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_backend.o.d.raw -c -Release/obj.target/tfjs_binding/binding/tfjs_backend.o: \ - ../binding/tfjs_backend.cc ../binding/tfjs_backend.h \ - /usr/include/nodejs/src/node_api.h \ - /usr/include/nodejs/src/node_api_types.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_attrtype.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_datatype.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_status.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tensor.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_macros.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tstring.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring_internal.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api.h \ - ../binding/napi_auto_ref.h ../binding/utils.h \ - ../binding/tf_auto_status.h ../binding/tf_auto_tensor.h \ - ../binding/tfe_auto_op.h -../binding/tfjs_backend.cc: -../binding/tfjs_backend.h: -/usr/include/nodejs/src/node_api.h: -/usr/include/nodejs/src/node_api_types.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_attrtype.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_datatype.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_status.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tensor.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_macros.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tstring.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring_internal.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api.h: -../binding/napi_auto_ref.h: -../binding/utils.h: -../binding/tf_auto_status.h: -../binding/tf_auto_tensor.h: -../binding/tfe_auto_op.h: diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_binding.o.d b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_binding.o.d deleted file mode 100644 index 5bd06f7c7..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_binding.o.d +++ /dev/null @@ -1,31 +0,0 @@ -cmd_Release/obj.target/tfjs_binding/binding/tfjs_binding.o := g++ -o Release/obj.target/tfjs_binding/binding/tfjs_binding.o ../binding/tfjs_binding.cc '-DNODE_GYP_MODULE_NAME=tfjs_binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/openssl/config -I/usr/include/nodejs/deps/openssl/openssl/include -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/zlib -I/usr/include/nodejs/deps/v8/include -I../.. -I/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fPIC -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF ./Release/.deps/Release/obj.target/tfjs_binding/binding/tfjs_binding.o.d.raw -c -Release/obj.target/tfjs_binding/binding/tfjs_binding.o: \ - ../binding/tfjs_binding.cc /usr/include/nodejs/src/node_api.h \ - /usr/include/nodejs/src/node_api_types.h ../binding/tfjs_backend.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_attrtype.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_datatype.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_status.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tensor.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_macros.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tstring.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring_internal.h \ - /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api.h \ - ../binding/utils.h ../binding/tf_auto_status.h -../binding/tfjs_binding.cc: -/usr/include/nodejs/src/node_api.h: -/usr/include/nodejs/src/node_api_types.h: -../binding/tfjs_backend.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_attrtype.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_datatype.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_status.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tensor.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_macros.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tstring.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring_internal.h: -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api.h: -../binding/utils.h: -../binding/tf_auto_status.h: diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/tfjs_binding.node.d b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/tfjs_binding.node.d deleted file mode 100644 index f7bf9b3fb..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/.deps/Release/tfjs_binding.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/tfjs_binding.node := ln -f "Release/obj.target/tfjs_binding.node" "Release/tfjs_binding.node" 2>/dev/null || (rm -rf "Release/tfjs_binding.node" && cp -af "Release/obj.target/tfjs_binding.node" "Release/tfjs_binding.node") diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/action_after_build.stamp b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/action_after_build.stamp deleted file mode 100644 index e69de29bb..000000000 diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding.node b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding.node deleted file mode 100755 index a656bb9ca..000000000 Binary files a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding.node and /dev/null differ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding/binding/tfjs_backend.o b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding/binding/tfjs_backend.o deleted file mode 100644 index 50a010fe1..000000000 Binary files a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding/binding/tfjs_backend.o and /dev/null differ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding/binding/tfjs_binding.o b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding/binding/tfjs_binding.o deleted file mode 100644 index 14b96b8f3..000000000 Binary files a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/obj.target/tfjs_binding/binding/tfjs_binding.o and /dev/null differ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/tfjs_binding.node b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/tfjs_binding.node deleted file mode 100755 index a656bb9ca..000000000 Binary files a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/Release/tfjs_binding.node and /dev/null differ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/action_after_build.target.mk b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/action_after_build.target.mk deleted file mode 100644 index 788fcba84..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/action_after_build.target.mk +++ /dev/null @@ -1,32 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := action_after_build -### Generated for copy rule. -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/lib/napi-v5/tfjs_binding.node: TOOLSET := $(TOOLSET) -/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/lib/napi-v5/tfjs_binding.node: $(builddir)/tfjs_binding.node FORCE_DO_CMD - $(call do_cmd,copy) - -all_deps += /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/lib/napi-v5/tfjs_binding.node -binding_gyp_action_after_build_target_copies = /home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/lib/napi-v5/tfjs_binding.node - -### Rules for final target. -# Build our special outputs first. -$(obj).target/action_after_build.stamp: | $(binding_gyp_action_after_build_target_copies) - -# Preserve order dependency of special output on deps. -$(binding_gyp_action_after_build_target_copies): | $(builddir)/tfjs_binding.node - -$(obj).target/action_after_build.stamp: TOOLSET := $(TOOLSET) -$(obj).target/action_after_build.stamp: $(builddir)/tfjs_binding.node FORCE_DO_CMD - $(call do_cmd,touch) - -all_deps += $(obj).target/action_after_build.stamp -# Add target alias -.PHONY: action_after_build -action_after_build: $(obj).target/action_after_build.stamp - -# Add target alias to "all" target. -.PHONY: all -all: action_after_build - diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/binding.Makefile b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/binding.Makefile deleted file mode 100644 index 5a3c6a0e9..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/binding.Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# This file is generated by gyp; do not edit. - -export builddir_name ?= ./build/. -.PHONY: all -all: - $(MAKE) tfjs_binding action_after_build diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/config.gypi b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/config.gypi deleted file mode 100644 index 86935192d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/config.gypi +++ /dev/null @@ -1,201 +0,0 @@ -# Do not edit. File was generated by node-gyp's "configure" step -{ - "target_defaults": { - "cflags": [], - "default_configuration": "Release", - "defines": [], - "include_dirs": [], - "libraries": [] - }, - "variables": { - "arch_triplet": "x86_64-linux-gnu", - "asan": 0, - "build_v8_with_gn": "false", - "coverage": "false", - "debug_nghttp2": "false", - "enable_lto": "false", - "enable_pgo_generate": "false", - "enable_pgo_use": "false", - "force_dynamic_crt": 1, - "host_arch": "x64", - "icu_gyp_path": "tools/icu/icu-system.gyp", - "icu_small": "false", - "icu_ver_major": "66", - "llvm_version": 0, - "node_byteorder": "little", - "node_debug_lib": "false", - "node_enable_d8": "false", - "node_enable_v8_vtunejit": "false", - "node_install_npm": "false", - "node_module_version": 64, - "node_no_browser_globals": "false", - "node_prefix": "/usr", - "node_relative_path": "lib/x86_64-linux-gnu/nodejs:share/nodejs:lib/nodejs", - "node_release_urlbase": "", - "node_shared": "true", - "node_shared_cares": "true", - "node_shared_http_parser": "false", - "node_shared_libuv": "true", - "node_shared_nghttp2": "true", - "node_shared_openssl": "true", - "node_shared_zlib": "true", - "node_tag": "", - "node_target_type": "shared_library", - "node_use_bundled_v8": "true", - "node_use_dtrace": "false", - "node_use_etw": "false", - "node_use_large_pages": "false", - "node_use_openssl": "true", - "node_use_pch": "false", - "node_use_perfctr": "false", - "node_use_v8_platform": "true", - "node_with_ltcg": "false", - "node_without_node_options": "false", - "openssl_fips": "", - "openssl_no_asm": 0, - "shlib_suffix": "so.64", - "target_arch": "x64", - "v8_enable_gdbjit": 0, - "v8_enable_i18n_support": 1, - "v8_enable_inspector": 1, - "v8_no_strict_aliasing": 1, - "v8_optimized_debug": 0, - "v8_promise_internal_field_count": 1, - "v8_random_seed": 0, - "v8_trace_maps": 0, - "v8_typed_array_max_size_in_heap": 0, - "v8_use_snapshot": "false", - "want_separate_host_toolset": 0, - "nodedir": "/usr/include/nodejs", - "standalone_static_library": 1, - "fallback_to_build": "true", - "module": "/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/lib/napi-v5/tfjs_binding.node", - "module_name": "tfjs_binding", - "module_path": "/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/lib/napi-v5", - "napi_version": "5", - "node_abi_napi": "napi", - "napi_build_version": "5", - "node_napi_label": "napi-v5", - "cache_lock_stale": "60000", - "ham_it_up": "", - "legacy_bundling": "", - "sign_git_tag": "", - "user_agent": "npm/6.14.4 node/v10.19.0 linux x64", - "always_auth": "", - "bin_links": "true", - "key": "", - "allow_same_version": "", - "description": "true", - "fetch_retries": "2", - "heading": "npm", - "if_present": "", - "init_version": "1.0.0", - "user": "", - "prefer_online": "", - "force": "", - "only": "", - "read_only": "", - "cache_min": "10", - "init_license": "ISC", - "editor": "vi", - "rollback": "true", - "tag_version_prefix": "v", - "cache_max": "Infinity", - "timing": "", - "userconfig": "/home/brenden/.npmrc", - "engine_strict": "", - "init_author_name": "", - "init_author_url": "", - "preid": "", - "tmp": "/tmp", - "depth": "Infinity", - "package_lock_only": "", - "save_dev": "", - "usage": "", - "metrics_registry": "https://registry.npmjs.org/", - "otp": "", - "package_lock": "true", - "progress": "true", - "https_proxy": "", - "save_prod": "", - "audit": "true", - "cidr": "", - "onload_script": "", - "sso_type": "oauth", - "rebuild_bundle": "true", - "save_bundle": "", - "shell": "/bin/bash", - "prefix": "/usr/local", - "dry_run": "", - "format_package_lock": "true", - "scope": "", - "browser": "", - "cache_lock_wait": "10000", - "ignore_prepublish": "", - "registry": "https://registry.npmjs.org/", - "save_optional": "", - "searchopts": "", - "versions": "", - "cache": "/home/brenden/.npm", - "send_metrics": "", - "global_style": "", - "ignore_scripts": "", - "version": "", - "local_address": "", - "viewer": "man", - "node_gyp": "/usr/bin/node-gyp", - "audit_level": "low", - "prefer_offline": "", - "color": "true", - "sign_git_commit": "", - "fetch_retry_mintimeout": "10000", - "maxsockets": "50", - "offline": "", - "sso_poll_frequency": "500", - "umask": "0002", - "fund": "true", - "fetch_retry_maxtimeout": "60000", - "logs_max": "10", - "message": "%s", - "ca": "", - "cert": "", - "global": "", - "link": "", - "access": "", - "also": "", - "save": "true", - "unicode": "true", - "before": "", - "long": "", - "production": "", - "searchlimit": "20", - "unsafe_perm": "true", - "update_notifier": "true", - "auth_type": "legacy", - "node_version": "10.19.0", - "tag": "latest", - "git_tag_version": "true", - "commit_hooks": "true", - "script_shell": "", - "shrinkwrap": "true", - "fetch_retry_factor": "10", - "save_exact": "", - "strict_ssl": "true", - "globalconfig": "/etc/npmrc", - "dev": "", - "init_module": "/home/brenden/.npm-init.js", - "parseable": "", - "globalignorefile": "/etc/npmignore", - "cache_lock_retries": "10", - "searchstaleness": "900", - "node_options": "", - "save_prefix": "^", - "scripts_prepend_node_path": "warn-only", - "group": "1000", - "init_author_email": "", - "searchexclude": "", - "git": "git", - "optional": "true", - "json": "" - } -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/tfjs_binding.target.mk b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/tfjs_binding.target.mk deleted file mode 100644 index 36b2721ec..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/build-tmp-napi-v5/tfjs_binding.target.mk +++ /dev/null @@ -1,160 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := tfjs_binding -DEFS_Debug := \ - '-DNODE_GYP_MODULE_NAME=tfjs_binding' \ - '-DUSING_UV_SHARED=1' \ - '-DUSING_V8_SHARED=1' \ - '-DV8_DEPRECATION_WARNINGS=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' \ - '-DDEBUG' \ - '-D_DEBUG' \ - '-DV8_ENABLE_CHECKS' - -# Flags passed to all source files. -CFLAGS_Debug := \ - -fPIC \ - -pthread \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -m64 \ - -fPIC \ - -g \ - -O0 - -# Flags passed to only C files. -CFLAGS_C_Debug := - -# Flags passed to only C++ files. -CFLAGS_CC_Debug := \ - -fno-rtti \ - -fno-exceptions \ - -std=gnu++1y - -INCS_Debug := \ - -I/usr/include/nodejs/include/node \ - -I/usr/include/nodejs/src \ - -I/usr/include/nodejs/deps/openssl/config \ - -I/usr/include/nodejs/deps/openssl/openssl/include \ - -I/usr/include/nodejs/deps/uv/include \ - -I/usr/include/nodejs/deps/zlib \ - -I/usr/include/nodejs/deps/v8/include \ - -I$(srcdir)/.. \ - -I/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include - -DEFS_Release := \ - '-DNODE_GYP_MODULE_NAME=tfjs_binding' \ - '-DUSING_UV_SHARED=1' \ - '-DUSING_V8_SHARED=1' \ - '-DV8_DEPRECATION_WARNINGS=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -fPIC \ - -pthread \ - -Wall \ - -Wextra \ - -Wno-unused-parameter \ - -m64 \ - -fPIC \ - -O3 \ - -fno-omit-frame-pointer - -# Flags passed to only C files. -CFLAGS_C_Release := - -# Flags passed to only C++ files. -CFLAGS_CC_Release := \ - -fno-rtti \ - -fno-exceptions \ - -std=gnu++1y - -INCS_Release := \ - -I/usr/include/nodejs/include/node \ - -I/usr/include/nodejs/src \ - -I/usr/include/nodejs/deps/openssl/config \ - -I/usr/include/nodejs/deps/openssl/openssl/include \ - -I/usr/include/nodejs/deps/uv/include \ - -I/usr/include/nodejs/deps/zlib \ - -I/usr/include/nodejs/deps/v8/include \ - -I$(srcdir)/.. \ - -I/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include - -OBJS := \ - $(obj).target/$(TARGET)/binding/tfjs_backend.o \ - $(obj).target/$(TARGET)/binding/tfjs_binding.o - -# Add to the list of files we specially track dependencies for. -all_deps += $(OBJS) - -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual. -$(OBJS): TOOLSET := $(TOOLSET) -$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) -$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) - -# Suffix rules, putting all outputs into $(obj). - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# Try building from generated source, too. - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# End of this set of suffix rules -### Rules for final target. -LDFLAGS_Debug := \ - -pthread \ - -rdynamic \ - -m64 \ - -L/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib - -LDFLAGS_Release := \ - -pthread \ - -rdynamic \ - -m64 \ - -L/home/brenden/Superalgos/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib - -LIBS := \ - -lnode \ - -Wl,-rpath,\$$ORIGIN/../../deps/lib \ - -ltensorflow \ - -ltensorflow_framework - -$(obj).target/tfjs_binding.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) -$(obj).target/tfjs_binding.node: LIBS := $(LIBS) -$(obj).target/tfjs_binding.node: TOOLSET := $(TOOLSET) -$(obj).target/tfjs_binding.node: $(OBJS) FORCE_DO_CMD - $(call do_cmd,solink_module) - -all_deps += $(obj).target/tfjs_binding.node -# Add target alias -.PHONY: tfjs_binding -tfjs_binding: $(builddir)/tfjs_binding.node - -# Copy this to the executable output path. -$(builddir)/tfjs_binding.node: TOOLSET := $(TOOLSET) -$(builddir)/tfjs_binding.node: $(obj).target/tfjs_binding.node FORCE_DO_CMD - $(call do_cmd,copy) - -all_deps += $(builddir)/tfjs_binding.node -# Short alias for building this executable. -.PHONY: tfjs_binding.node -tfjs_binding.node: $(obj).target/tfjs_binding.node $(builddir)/tfjs_binding.node - -# Add executable to "all" target. -.PHONY: all -all: $(builddir)/tfjs_binding.node - diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/LICENSE b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/LICENSE deleted file mode 100755 index 40f8c3476..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ -Copyright 2019 The TensorFlow Authors. All rights reserved. - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/THIRD_PARTY_TF_C_LICENSES b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/THIRD_PARTY_TF_C_LICENSES deleted file mode 100755 index 27f058ee4..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/THIRD_PARTY_TF_C_LICENSES +++ /dev/null @@ -1,8963 +0,0 @@ --------------------------------------------------------------------------------- -BEGIN LICENSE FOR third_party/eigen3/LICENSE --------------------------------------------------------------------------------- -Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links: - http://www.mozilla.org/MPL/2.0/ - http://www.mozilla.org/MPL/2.0/FAQ.html - -Some files contain third-party code under BSD or LGPL licenses, whence -the other COPYING.* files here. - -All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later. -For this reason, the COPYING.LGPL file contains the LGPL 2.1 text. - -If you want to guarantee that the Eigen code that you are #including -is licensed under the MPL2 and possibly more permissive licenses (like -BSD), #define this preprocessor symbol: EIGEN_MPL2_ONLY -For example, with most compilers, you could add this to your project - CXXFLAGS: -DEIGEN_MPL2_ONLY -This will cause a compilation error to be generated if you #include -any code that is LGPL licensed. - ----------------------------------------------------------------------- -Following applies to: -./test/mapstaticmethods.cpp -./test/schur_real.cpp -./test/prec_inverse_4x4.cpp -./test/smallvectors.cpp -./test/redux.cpp -./test/special_numbers.cpp -./test/adjoint.cpp -./test/resize.cpp -./test/mixingtypes.cpp -./test/product_trmv.cpp -./test/sparse_solvers.cpp -./test/cholesky.cpp -./test/geo_quaternion.cpp -./test/miscmatrices.cpp -./test/stddeque.cpp -./test/integer_types.cpp -./test/product_large.cpp -./test/eigensolver_generic.cpp -./test/householder.cpp -./test/geo_orthomethods.cpp -./test/array_for_matrix.cpp -./test/sparseLM.cpp -./test/upperbidiagonalization.cpp -./test/nomalloc.cpp -./test/packetmath.cpp -./test/jacobisvd.cpp -./test/geo_transformations.cpp -./test/swap.cpp -./test/eigensolver_selfadjoint.cpp -./test/inverse.cpp -./test/product_selfadjoint.cpp -./test/product_trsolve.cpp -./test/product_extra.cpp -./test/sparse_solver.h -./test/mapstride.cpp -./test/mapped_matrix.cpp -./test/geo_eulerangles.cpp -./test/eigen2support.cpp -./test/denseLM.cpp -./test/stdvector.cpp -./test/nesting_ops.cpp -./test/sparse_permutations.cpp -./test/zerosized.cpp -./test/exceptions.cpp -./test/vectorwiseop.cpp -./test/cwiseop.cpp -./test/basicstuff.cpp -./test/product_trmm.cpp -./test/linearstructure.cpp -./test/sparse_product.cpp -./test/stdvector_overload.cpp -./test/stable_norm.cpp -./test/umeyama.cpp -./test/unalignedcount.cpp -./test/triangular.cpp -./test/product_mmtr.cpp -./test/sparse_basic.cpp -./test/sparse_vector.cpp -./test/meta.cpp -./test/real_qz.cpp -./test/ref.cpp -./test/eigensolver_complex.cpp -./test/cholmod_support.cpp -./test/conjugate_gradient.cpp -./test/sparse.h -./test/simplicial_cholesky.cpp -./test/bicgstab.cpp -./test/dynalloc.cpp -./test/product_notemporary.cpp -./test/geo_hyperplane.cpp -./test/lu.cpp -./test/qr.cpp -./test/hessenberg.cpp -./test/sizeof.cpp -./test/main.h -./test/selfadjoint.cpp -./test/permutationmatrices.cpp -./test/superlu_support.cpp -./test/qtvector.cpp -./test/geo_homogeneous.cpp -./test/determinant.cpp -./test/array_reverse.cpp -./test/unalignedassert.cpp -./test/stdlist.cpp -./test/product_symm.cpp -./test/corners.cpp -./test/dontalign.cpp -./test/visitor.cpp -./test/geo_alignedbox.cpp -./test/diagonalmatrices.cpp -./test/product_small.cpp -./test/eigensolver_generalized_real.cpp -./test/umfpack_support.cpp -./test/first_aligned.cpp -./test/qr_fullpivoting.cpp -./test/array_replicate.cpp -./test/geo_parametrizedline.cpp -./test/eigen2/eigen2_unalignedassert.cpp -./test/eigen2/eigen2_prec_inverse_4x4.cpp -./test/eigen2/eigen2_alignedbox.cpp -./test/eigen2/eigen2_sparse_product.cpp -./test/eigen2/eigen2_meta.cpp -./test/eigen2/eigen2_nomalloc.cpp -./test/eigen2/eigen2_visitor.cpp -./test/eigen2/eigen2_packetmath.cpp -./test/eigen2/eigen2_svd.cpp -./test/eigen2/eigen2_mixingtypes.cpp -./test/eigen2/eigen2_qr.cpp -./test/eigen2/eigen2_cwiseop.cpp -./test/eigen2/eigen2_geometry_with_eigen2_prefix.cpp -./test/eigen2/eigen2_smallvectors.cpp -./test/eigen2/eigen2_commainitializer.cpp -./test/eigen2/eigen2_sparse_solvers.cpp -./test/eigen2/eigen2_hyperplane.cpp -./test/eigen2/eigen2_eigensolver.cpp -./test/eigen2/eigen2_linearstructure.cpp -./test/eigen2/eigen2_sizeof.cpp -./test/eigen2/eigen2_parametrizedline.cpp -./test/eigen2/eigen2_lu.cpp -./test/eigen2/eigen2_adjoint.cpp -./test/eigen2/eigen2_geometry.cpp -./test/eigen2/eigen2_stdvector.cpp -./test/eigen2/eigen2_newstdvector.cpp -./test/eigen2/eigen2_submatrices.cpp -./test/eigen2/sparse.h -./test/eigen2/eigen2_swap.cpp -./test/eigen2/eigen2_triangular.cpp -./test/eigen2/eigen2_basicstuff.cpp -./test/eigen2/gsl_helper.h -./test/eigen2/eigen2_dynalloc.cpp -./test/eigen2/eigen2_array.cpp -./test/eigen2/eigen2_map.cpp -./test/eigen2/main.h -./test/eigen2/eigen2_miscmatrices.cpp -./test/eigen2/eigen2_product_large.cpp -./test/eigen2/eigen2_first_aligned.cpp -./test/eigen2/eigen2_cholesky.cpp -./test/eigen2/eigen2_determinant.cpp -./test/eigen2/eigen2_sum.cpp -./test/eigen2/eigen2_inverse.cpp -./test/eigen2/eigen2_regression.cpp -./test/eigen2/eigen2_product_small.cpp -./test/eigen2/eigen2_qtvector.cpp -./test/eigen2/eigen2_sparse_vector.cpp -./test/eigen2/product.h -./test/eigen2/eigen2_sparse_basic.cpp -./test/eigen2/eigen2_bug_132.cpp -./test/array.cpp -./test/product_syrk.cpp -./test/commainitializer.cpp -./test/conservative_resize.cpp -./test/qr_colpivoting.cpp -./test/nullary.cpp -./test/bandmatrix.cpp -./test/pastix_support.cpp -./test/product.h -./test/block.cpp -./test/vectorization_logic.cpp -./test/jacobi.cpp -./test/diagonal.cpp -./test/schur_complex.cpp -./test/sizeoverflow.cpp -./bench/BenchTimer.h -./bench/benchFFT.cpp -./bench/eig33.cpp -./bench/spbench/spbenchsolver.h -./bench/spbench/spbenchstyle.h -./lapack/complex_double.cpp -./lapack/cholesky.cpp -./lapack/lapack_common.h -./lapack/eigenvalues.cpp -./lapack/single.cpp -./lapack/lu.cpp -./lapack/complex_single.cpp -./lapack/double.cpp -./demos/mix_eigen_and_c/binary_library.cpp -./demos/mix_eigen_and_c/binary_library.h -./demos/mix_eigen_and_c/example.c -./demos/mandelbrot/mandelbrot.cpp -./demos/mandelbrot/mandelbrot.h -./demos/opengl/icosphere.cpp -./demos/opengl/icosphere.h -./demos/opengl/camera.cpp -./demos/opengl/quaternion_demo.h -./demos/opengl/camera.h -./demos/opengl/trackball.h -./demos/opengl/gpuhelper.h -./demos/opengl/trackball.cpp -./demos/opengl/gpuhelper.cpp -./demos/opengl/quaternion_demo.cpp -./debug/gdb/printers.py -./unsupported/test/minres.cpp -./unsupported/test/openglsupport.cpp -./unsupported/test/jacobisvd.cpp -./unsupported/test/dgmres.cpp -./unsupported/test/matrix_square_root.cpp -./unsupported/test/bdcsvd.cpp -./unsupported/test/matrix_exponential.cpp -./unsupported/test/forward_adolc.cpp -./unsupported/test/polynomialsolver.cpp -./unsupported/test/matrix_function.cpp -./unsupported/test/sparse_extra.cpp -./unsupported/test/matrix_functions.h -./unsupported/test/svd_common.h -./unsupported/test/FFTW.cpp -./unsupported/test/alignedvector3.cpp -./unsupported/test/autodiff.cpp -./unsupported/test/gmres.cpp -./unsupported/test/BVH.cpp -./unsupported/test/levenberg_marquardt.cpp -./unsupported/test/matrix_power.cpp -./unsupported/test/kronecker_product.cpp -./unsupported/test/splines.cpp -./unsupported/test/polynomialutils.cpp -./unsupported/bench/bench_svd.cpp -./unsupported/Eigen/IterativeSolvers -./unsupported/Eigen/src/IterativeSolvers/DGMRES.h -./unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h -./unsupported/Eigen/src/IterativeSolvers/GMRES.h -./unsupported/Eigen/src/IterativeSolvers/IncompleteCholesky.h -./unsupported/Eigen/src/IterativeSolvers/Scaling.h -./unsupported/Eigen/src/IterativeSolvers/MINRES.h -./unsupported/Eigen/src/SparseExtra/RandomSetter.h -./unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h -./unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h -./unsupported/Eigen/src/SparseExtra/MarketIO.h -./unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h -./unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h -./unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h -./unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h -./unsupported/Eigen/src/BVH/BVAlgorithms.h -./unsupported/Eigen/src/BVH/KdBVH.h -./unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h -./unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h -./unsupported/Eigen/src/AutoDiff/AutoDiffVector.h -./unsupported/Eigen/src/Splines/Spline.h -./unsupported/Eigen/src/Splines/SplineFitting.h -./unsupported/Eigen/src/Splines/SplineFwd.h -./unsupported/Eigen/src/SVD/JacobiSVD.h -./unsupported/Eigen/src/SVD/BDCSVD.h -./unsupported/Eigen/src/SVD/SVDBase.h -./unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h -./unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h -./unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h -./unsupported/Eigen/src/MatrixFunctions/StemFunction.h -./unsupported/Eigen/src/MatrixFunctions/MatrixPower.h -./unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h -./unsupported/Eigen/src/MatrixFunctions/MatrixFunctionAtomic.h -./unsupported/Eigen/src/MoreVectorization/MathFunctions.h -./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h -./unsupported/Eigen/src/FFT/ei_fftw_impl.h -./unsupported/Eigen/src/FFT/ei_kissfft_impl.h -./unsupported/Eigen/src/Polynomials/PolynomialSolver.h -./unsupported/Eigen/src/Polynomials/Companion.h -./unsupported/Eigen/src/Polynomials/PolynomialUtils.h -./unsupported/Eigen/src/NumericalDiff/NumericalDiff.h -./unsupported/Eigen/src/Skyline/SkylineProduct.h -./unsupported/Eigen/src/Skyline/SkylineMatrixBase.h -./unsupported/Eigen/src/Skyline/SkylineStorage.h -./unsupported/Eigen/src/Skyline/SkylineUtil.h -./unsupported/Eigen/src/Skyline/SkylineInplaceLU.h -./unsupported/Eigen/src/Skyline/SkylineMatrix.h -./unsupported/Eigen/SparseExtra -./unsupported/Eigen/AdolcForward -./unsupported/Eigen/KroneckerProduct -./unsupported/Eigen/NonLinearOptimization -./unsupported/Eigen/BVH -./unsupported/Eigen/OpenGLSupport -./unsupported/Eigen/ArpackSupport -./unsupported/Eigen/AutoDiff -./unsupported/Eigen/Splines -./unsupported/Eigen/MPRealSupport -./unsupported/Eigen/MatrixFunctions -./unsupported/Eigen/MoreVectorization -./unsupported/Eigen/LevenbergMarquardt -./unsupported/Eigen/AlignedVector3 -./unsupported/Eigen/FFT -./unsupported/Eigen/Polynomials -./unsupported/Eigen/NumericalDiff -./unsupported/Eigen/Skyline -./COPYING.README -./COPYING.README -./LICENSE -./LICENSE -./LICENSE -./Eigen/Eigen2Support -./Eigen/src/Eigen2Support/VectorBlock.h -./Eigen/src/Eigen2Support/Cwise.h -./Eigen/src/Eigen2Support/Minor.h -./Eigen/src/Eigen2Support/Lazy.h -./Eigen/src/Eigen2Support/Memory.h -./Eigen/src/Eigen2Support/MathFunctions.h -./Eigen/src/Eigen2Support/Geometry/AlignedBox.h -./Eigen/src/Eigen2Support/Geometry/Hyperplane.h -./Eigen/src/Eigen2Support/Geometry/Quaternion.h -./Eigen/src/Eigen2Support/Geometry/Rotation2D.h -./Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h -./Eigen/src/Eigen2Support/Geometry/RotationBase.h -./Eigen/src/Eigen2Support/Geometry/Translation.h -./Eigen/src/Eigen2Support/Geometry/Scaling.h -./Eigen/src/Eigen2Support/Geometry/AngleAxis.h -./Eigen/src/Eigen2Support/Geometry/Transform.h -./Eigen/src/Eigen2Support/TriangularSolver.h -./Eigen/src/Eigen2Support/LU.h -./Eigen/src/Eigen2Support/QR.h -./Eigen/src/Eigen2Support/SVD.h -./Eigen/src/Eigen2Support/Meta.h -./Eigen/src/Eigen2Support/Block.h -./Eigen/src/Eigen2Support/Macros.h -./Eigen/src/Eigen2Support/LeastSquares.h -./Eigen/src/Eigen2Support/CwiseOperators.h -./Eigen/src/Jacobi/Jacobi.h -./Eigen/src/misc/Kernel.h -./Eigen/src/misc/SparseSolve.h -./Eigen/src/misc/Solve.h -./Eigen/src/misc/Image.h -./Eigen/src/SparseCore/SparseColEtree.h -./Eigen/src/SparseCore/SparseTranspose.h -./Eigen/src/SparseCore/SparseUtil.h -./Eigen/src/SparseCore/SparseCwiseBinaryOp.h -./Eigen/src/SparseCore/SparseDiagonalProduct.h -./Eigen/src/SparseCore/SparseProduct.h -./Eigen/src/SparseCore/SparseDot.h -./Eigen/src/SparseCore/SparseCwiseUnaryOp.h -./Eigen/src/SparseCore/SparseSparseProductWithPruning.h -./Eigen/src/SparseCore/SparseBlock.h -./Eigen/src/SparseCore/SparseDenseProduct.h -./Eigen/src/SparseCore/CompressedStorage.h -./Eigen/src/SparseCore/SparseMatrixBase.h -./Eigen/src/SparseCore/MappedSparseMatrix.h -./Eigen/src/SparseCore/SparseTriangularView.h -./Eigen/src/SparseCore/SparseView.h -./Eigen/src/SparseCore/SparseFuzzy.h -./Eigen/src/SparseCore/TriangularSolver.h -./Eigen/src/SparseCore/SparseSelfAdjointView.h -./Eigen/src/SparseCore/SparseMatrix.h -./Eigen/src/SparseCore/SparseVector.h -./Eigen/src/SparseCore/AmbiVector.h -./Eigen/src/SparseCore/ConservativeSparseSparseProduct.h -./Eigen/src/SparseCore/SparseRedux.h -./Eigen/src/SparseCore/SparsePermutation.h -./Eigen/src/Eigenvalues/RealSchur.h -./Eigen/src/Eigenvalues/ComplexEigenSolver.h -./Eigen/src/Eigenvalues/GeneralizedEigenSolver.h -./Eigen/src/Eigenvalues/ComplexSchur.h -./Eigen/src/Eigenvalues/RealQZ.h -./Eigen/src/Eigenvalues/EigenSolver.h -./Eigen/src/Eigenvalues/HessenbergDecomposition.h -./Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h -./Eigen/src/Eigenvalues/Tridiagonalization.h -./Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h -./Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h -./Eigen/src/SuperLUSupport/SuperLUSupport.h -./Eigen/src/StlSupport/StdDeque.h -./Eigen/src/StlSupport/StdVector.h -./Eigen/src/StlSupport/StdList.h -./Eigen/src/StlSupport/details.h -./Eigen/src/SparseQR/SparseQR.h -./Eigen/src/LU/Inverse.h -./Eigen/src/LU/arch/Inverse_SSE.h -./Eigen/src/LU/Determinant.h -./Eigen/src/LU/PartialPivLU.h -./Eigen/src/LU/FullPivLU.h -./Eigen/src/UmfPackSupport/UmfPackSupport.h -./Eigen/src/OrderingMethods/Ordering.h -./Eigen/src/OrderingMethods/Eigen_Colamd.h -./Eigen/src/QR/HouseholderQR.h -./Eigen/src/QR/ColPivHouseholderQR.h -./Eigen/src/QR/FullPivHouseholderQR.h -./Eigen/src/SVD/JacobiSVD.h -./Eigen/src/SVD/UpperBidiagonalization.h -./Eigen/src/Geometry/OrthoMethods.h -./Eigen/src/Geometry/AlignedBox.h -./Eigen/src/Geometry/Hyperplane.h -./Eigen/src/Geometry/Quaternion.h -./Eigen/src/Geometry/EulerAngles.h -./Eigen/src/Geometry/Rotation2D.h -./Eigen/src/Geometry/ParametrizedLine.h -./Eigen/src/Geometry/RotationBase.h -./Eigen/src/Geometry/arch/Geometry_SSE.h -./Eigen/src/Geometry/Umeyama.h -./Eigen/src/Geometry/Homogeneous.h -./Eigen/src/Geometry/Translation.h -./Eigen/src/Geometry/Scaling.h -./Eigen/src/Geometry/AngleAxis.h -./Eigen/src/Geometry/Transform.h -./Eigen/src/plugins/BlockMethods.h -./Eigen/src/plugins/CommonCwiseUnaryOps.h -./Eigen/src/plugins/CommonCwiseBinaryOps.h -./Eigen/src/plugins/MatrixCwiseUnaryOps.h -./Eigen/src/plugins/MatrixCwiseBinaryOps.h -./Eigen/src/Householder/Householder.h -./Eigen/src/Householder/HouseholderSequence.h -./Eigen/src/Householder/BlockHouseholder.h -./Eigen/src/Core/VectorBlock.h -./Eigen/src/Core/Matrix.h -./Eigen/src/Core/Ref.h -./Eigen/src/Core/SelfAdjointView.h -./Eigen/src/Core/MathFunctions.h -./Eigen/src/Core/GlobalFunctions.h -./Eigen/src/Core/MapBase.h -./Eigen/src/Core/EigenBase.h -./Eigen/src/Core/GenericPacketMath.h -./Eigen/src/Core/NestByValue.h -./Eigen/src/Core/CwiseUnaryOp.h -./Eigen/src/Core/SolveTriangular.h -./Eigen/src/Core/Fuzzy.h -./Eigen/src/Core/Visitor.h -./Eigen/src/Core/Map.h -./Eigen/src/Core/NoAlias.h -./Eigen/src/Core/Diagonal.h -./Eigen/src/Core/StableNorm.h -./Eigen/src/Core/CoreIterators.h -./Eigen/src/Core/products/Parallelizer.h -./Eigen/src/Core/products/SelfadjointMatrixVector.h -./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h -./Eigen/src/Core/products/TriangularSolverMatrix.h -./Eigen/src/Core/products/GeneralMatrixMatrix.h -./Eigen/src/Core/products/SelfadjointProduct.h -./Eigen/src/Core/products/CoeffBasedProduct.h -./Eigen/src/Core/products/TriangularMatrixVector.h -./Eigen/src/Core/products/SelfadjointMatrixMatrix.h -./Eigen/src/Core/products/TriangularSolverVector.h -./Eigen/src/Core/products/SelfadjointRank2Update.h -./Eigen/src/Core/products/GeneralBlockPanelKernel.h -./Eigen/src/Core/products/GeneralMatrixVector.h -./Eigen/src/Core/products/TriangularMatrixMatrix.h -./Eigen/src/Core/Reverse.h -./Eigen/src/Core/BooleanRedux.h -./Eigen/src/Core/Replicate.h -./Eigen/src/Core/arch/AltiVec/PacketMath.h -./Eigen/src/Core/arch/AltiVec/Complex.h -./Eigen/src/Core/arch/SSE/PacketMath.h -./Eigen/src/Core/arch/SSE/Complex.h -./Eigen/src/Core/arch/SSE/MathFunctions.h -./Eigen/src/Core/arch/NEON/PacketMath.h -./Eigen/src/Core/arch/NEON/Complex.h -./Eigen/src/Core/arch/Default/Settings.h -./Eigen/src/Core/CwiseUnaryView.h -./Eigen/src/Core/Array.h -./Eigen/src/Core/ArrayWrapper.h -./Eigen/src/Core/Swap.h -./Eigen/src/Core/Transpositions.h -./Eigen/src/Core/Random.h -./Eigen/src/Core/IO.h -./Eigen/src/Core/SelfCwiseBinaryOp.h -./Eigen/src/Core/VectorwiseOp.h -./Eigen/src/Core/Select.h -./Eigen/src/Core/ArrayBase.h -./Eigen/src/Core/DenseCoeffsBase.h -./Eigen/src/Core/DiagonalProduct.h -./Eigen/src/Core/Assign.h -./Eigen/src/Core/Redux.h -./Eigen/src/Core/ForceAlignedAccess.h -./Eigen/src/Core/BandMatrix.h -./Eigen/src/Core/PlainObjectBase.h -./Eigen/src/Core/DenseBase.h -./Eigen/src/Core/Flagged.h -./Eigen/src/Core/CwiseBinaryOp.h -./Eigen/src/Core/ProductBase.h -./Eigen/src/Core/TriangularMatrix.h -./Eigen/src/Core/Transpose.h -./Eigen/src/Core/DiagonalMatrix.h -./Eigen/src/Core/Dot.h -./Eigen/src/Core/Functors.h -./Eigen/src/Core/PermutationMatrix.h -./Eigen/src/Core/NumTraits.h -./Eigen/src/Core/MatrixBase.h -./Eigen/src/Core/DenseStorage.h -./Eigen/src/Core/util/Memory.h -./Eigen/src/Core/util/StaticAssert.h -./Eigen/src/Core/util/BlasUtil.h -./Eigen/src/Core/util/MatrixMapper.h -./Eigen/src/Core/util/XprHelper.h -./Eigen/src/Core/util/ForwardDeclarations.h -./Eigen/src/Core/util/Meta.h -./Eigen/src/Core/util/Macros.h -./Eigen/src/Core/util/Constants.h -./Eigen/src/Core/CwiseNullaryOp.h -./Eigen/src/Core/Block.h -./Eigen/src/Core/GeneralProduct.h -./Eigen/src/Core/CommaInitializer.h -./Eigen/src/Core/ReturnByValue.h -./Eigen/src/Core/Stride.h -./Eigen/src/SPQRSupport/SuiteSparseQRSupport.h -./Eigen/src/SparseLU/SparseLU_column_dfs.h -./Eigen/src/SparseLU/SparseLU_panel_dfs.h -./Eigen/src/SparseLU/SparseLU_relax_snode.h -./Eigen/src/SparseLU/SparseLU_panel_bmod.h -./Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h -./Eigen/src/SparseLU/SparseLU_Utils.h -./Eigen/src/SparseLU/SparseLU_gemm_kernel.h -./Eigen/src/SparseLU/SparseLU_kernel_bmod.h -./Eigen/src/SparseLU/SparseLU_pivotL.h -./Eigen/src/SparseLU/SparseLU_Memory.h -./Eigen/src/SparseLU/SparseLU_heap_relax_snode.h -./Eigen/src/SparseLU/SparseLUImpl.h -./Eigen/src/SparseLU/SparseLU_copy_to_ucol.h -./Eigen/src/SparseLU/SparseLU_Structs.h -./Eigen/src/SparseLU/SparseLU.h -./Eigen/src/SparseLU/SparseLU_column_bmod.h -./Eigen/src/SparseLU/SparseLU_pruneL.h -./Eigen/src/IterativeLinearSolvers/IncompleteLUT.h -./Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h -./Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h -./Eigen/src/IterativeLinearSolvers/ConjugateGradient.h -./Eigen/src/IterativeLinearSolvers/BiCGSTAB.h -./Eigen/src/SparseCholesky/SimplicialCholesky.h -./Eigen/src/Cholesky/LDLT.h -./Eigen/src/Cholesky/LLT.h -./Eigen/src/CholmodSupport/CholmodSupport.h -./Eigen/src/PaStiXSupport/PaStiXSupport.h -./Eigen/src/MetisSupport/MetisSupport.h -./Eigen/StdVector -./Eigen/Core -./Eigen/OrderingMethods -./Eigen/SparseLU -./Eigen/StdList -./Eigen/StdDeque -./Eigen/SparseCholesky -./Eigen/SparseCore -./scripts/relicense.py -./scripts/relicense.py -./blas/BandTriangularSolver.h -./blas/PackedTriangularMatrixVector.h -./blas/complex_double.cpp -./blas/level2_real_impl.h -./blas/level1_cplx_impl.h -./blas/level1_impl.h -./blas/level1_real_impl.h -./blas/level3_impl.h -./blas/single.cpp -./blas/level2_cplx_impl.h -./blas/PackedSelfadjointProduct.h -./blas/Rank2Update.h -./blas/complex_single.cpp -./blas/PackedTriangularSolverVector.h -./blas/double.cpp -./blas/common.h -./blas/level2_impl.h -./blas/GeneralRank1Update.h - -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - ----------------------------------------------------------------------- -Following applies to: -./doc/UsingIntelMKL.dox -./doc/UsingIntelMKL.dox -./Eigen/src/Eigenvalues/ComplexSchur_MKL.h -./Eigen/src/Eigenvalues/ComplexSchur_MKL.h -./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h -./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h -./Eigen/src/Eigenvalues/RealSchur_MKL.h -./Eigen/src/Eigenvalues/RealSchur_MKL.h -./Eigen/src/LU/arch/Inverse_SSE.h -./Eigen/src/LU/arch/Inverse_SSE.h -./Eigen/src/LU/PartialPivLU_MKL.h -./Eigen/src/LU/PartialPivLU_MKL.h -./Eigen/src/QR/HouseholderQR_MKL.h -./Eigen/src/QR/HouseholderQR_MKL.h -./Eigen/src/QR/ColPivHouseholderQR_MKL.h -./Eigen/src/QR/ColPivHouseholderQR_MKL.h -./Eigen/src/SVD/JacobiSVD_MKL.h -./Eigen/src/SVD/JacobiSVD_MKL.h -./Eigen/src/PardisoSupport/PardisoSupport.h -./Eigen/src/PardisoSupport/PardisoSupport.h -./Eigen/src/Core/Assign_MKL.h -./Eigen/src/Core/Assign_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h -./Eigen/src/Core/products/GeneralMatrixVector_MKL.h -./Eigen/src/Core/products/GeneralMatrixVector_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h -./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h -./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h -./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h -./Eigen/src/Core/products/TriangularMatrixVector_MKL.h -./Eigen/src/Core/products/TriangularMatrixVector_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h -./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h -./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h -./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h -./Eigen/src/Core/util/MKL_support.h -./Eigen/src/Core/util/MKL_support.h -./Eigen/src/Cholesky/LLT_MKL.h -./Eigen/src/Cholesky/LLT_MKL.h - -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. * Neither the name of Intel Corporation nor the - names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - ----------------------------------------------------------------------- -Following applies to: - everything under ./bench/btl - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds -of works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, -family, or household purposes, or (2) anything designed or sold for -incorporation into a dwelling. In determining whether a product is a -consumer product, doubtful cases shall be resolved in favor of -coverage. For a particular product received by a particular user, -"normally used" refers to a typical or common use of that class of -product, regardless of the status of the particular user or of the way -in which the particular user actually uses, or expects or is expected -to use, the product. A product is a consumer product regardless of -whether the product has substantial commercial, industrial or -non-consumer uses, unless such uses represent the only significant -mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to -install and execute modified versions of a covered work in that User -Product from a modified version of its Corresponding Source. The -information must suffice to ensure that the continued functioning of -the modified object code is in no case prevented or interfered with -solely because modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include -a requirement to continue to provide support service, warranty, or -updates for a work that has been modified or installed by the -recipient, or for the User Product in which it has been modified or -installed. Access to a network may be denied when the modification -itself materially and adversely affects the operation of the network -or violates the rules and protocols for communication across the -network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material -you add to a covered work, you may (if authorized by the copyright -holders of that material) supplement the terms of this License with -terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions - of it) with contractual assumptions of liability to the recipient, - for any liability that these contractual assumptions directly - impose on those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement -or otherwise) that contradict the conditions of this License, they do -not excuse you from the conditions of this License. If you cannot -convey a covered work so as to satisfy simultaneously your obligations -under this License and any other pertinent obligations, then as a -consequence you may not convey it at all. For example, if you agree -to terms that obligate you to collect a royalty for further conveying -from those to whom you convey the Program, the only way you could -satisfy both those terms and this License would be to refrain entirely -from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE -DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES -AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR -DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM -(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF -THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER -OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these -terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) This program comes - with ABSOLUTELY NO WARRANTY; for details type `show w'. This is - free software, and you are welcome to redistribute it under - certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the -appropriate parts of the General Public License. Of course, your -program's commands might be different; for a GUI interface, you would -use an "about box". - - You should also get your employer (if you work as a programmer) or -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. For more information on this, and how to apply and follow -the GNU GPL, see . - - The GNU General Public License does not permit incorporating your -program into proprietary programs. If your program is a subroutine -library, you may consider it more useful to permit linking proprietary -applications with the library. If this is what you want to do, use -the GNU Lesser General Public License instead of this License. But -first, please read . - - ----------------------------------------------------------------------- -Following applies to: -./test/metis_support.cpp -./test/sparselu.cpp -./unsupported/test/mpreal/mpreal.h -./unsupported/Eigen/src/IterativeSolvers/IterationController.h -./unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h -./unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h -./Eigen/src/OrderingMethods/Amd.h -./Eigen/src/SparseCholesky/SimplicialCholesky_impl.h - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the -GNU General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this - license document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this - license document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of - this License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - - ----------------------------------------------------------------------- -Following applies to: -./unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h -./unsupported/Eigen/src/LevenbergMarquardt/LMcovar.h -./unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h -./unsupported/Eigen/src/LevenbergMarquardt/LMpar.h -./unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h - -Minpack Copyright Notice (1999) University of Chicago. All rights -reserved - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the following -disclaimer. - -2. Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials -provided with the distribution. - -3. The end-user documentation included with the -redistribution, if any, must include the following -acknowledgment: - - "This product includes software developed by the - University of Chicago, as Operator of Argonne National - Laboratory. - -Alternately, this acknowledgment may appear in the software -itself, if and wherever such third-party acknowledgments -normally appear. - -4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" -WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE -UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND -THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE -OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY -OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR -USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF -THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) -DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION -UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL -BE CORRECTED. - -5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT -HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, -INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF -ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF -PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER -SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT -(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, -EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE -POSSIBILITY OF SUCH LOSS OR DAMAGES. --------------------------------------------------------------------------------- -END LICENSE FOR third_party/eigen3/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR third_party/fft2d/LICENSE --------------------------------------------------------------------------------- -Copyright(C) 1997,2001 Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp). -You may use, copy, modify this code for any purpose and -without fee. You may distribute this ORIGINAL package. --------------------------------------------------------------------------------- -END LICENSE FOR third_party/fft2d/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR third_party/hadoop/LICENSE.txt --------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -APACHE HADOOP SUBCOMPONENTS: - -The Apache Hadoop project contains subcomponents with separate copyright -notices and license terms. Your use of the source code for the these -subcomponents is subject to the terms and conditions of the following -licenses. - -For the org.apache.hadoop.util.bloom.* classes: - -/** - * - * Copyright (c) 2005, European Commission project OneLab under contract - * 034819 (http://www.one-lab.org) - * All rights reserved. - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the distribution. - * - Neither the name of the University Catholique de Louvain - UCL - * nor the names of its contributors may be used to endorse or - * promote products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -For portions of the native implementation of slicing-by-8 CRC calculation -in src/main/native/src/org/apache/hadoop/util: - -/** - * Copyright 2008,2009,2010 Massachusetts Institute of Technology. - * All rights reserved. Use of this source code is governed by a - * BSD-style license that can be found in the LICENSE file. - */ - - For src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c: - -/* - LZ4 - Fast LZ compression algorithm - Copyright (C) 2011, Yann Collet. - BSD License - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ --------------------------------------------------------------------------------- -END LICENSE FOR third_party/hadoop/LICENSE.txt --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR third_party/icu/data/LICENSE --------------------------------------------------------------------------------- -COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) - -Copyright © 1991-2018 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in http://www.unicode.org/copyright.html. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. - ---------------------- - -Third-Party Software Licenses - -This section contains third-party software notices and/or additional -terms for licensed third-party software components included within ICU -libraries. - -1. ICU License - ICU 1.8.1 to ICU 57.1 - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1995-2016 International Business Machines Corporation and others -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -All trademarks and registered trademarks mentioned herein are the -property of their respective owners. - -2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) - - # The Google Chrome software developed by Google is licensed under - # the BSD license. Other software included in this distribution is - # provided under other licenses, as set forth below. - # - # The BSD License - # http://opensource.org/licenses/bsd-license.php - # Copyright (C) 2006-2008, Google Inc. - # - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are met: - # - # Redistributions of source code must retain the above copyright notice, - # this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above - # copyright notice, this list of conditions and the following - # disclaimer in the documentation and/or other materials provided with - # the distribution. - # Neither the name of Google Inc. nor the names of its - # contributors may be used to endorse or promote products derived from - # this software without specific prior written permission. - # - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # - # The word list in cjdict.txt are generated by combining three word lists - # listed below with further processing for compound word breaking. The - # frequency is generated with an iterative training against Google web - # corpora. - # - # * Libtabe (Chinese) - # - https://sourceforge.net/project/?group_id=1519 - # - Its license terms and conditions are shown below. - # - # * IPADIC (Japanese) - # - http://chasen.aist-nara.ac.jp/chasen/distribution.html - # - Its license terms and conditions are shown below. - # - # ---------COPYING.libtabe ---- BEGIN-------------------- - # - # /* - # * Copyright (c) 1999 TaBE Project. - # * Copyright (c) 1999 Pai-Hsiang Hsiao. - # * All rights reserved. - # * - # * Redistribution and use in source and binary forms, with or without - # * modification, are permitted provided that the following conditions - # * are met: - # * - # * . Redistributions of source code must retain the above copyright - # * notice, this list of conditions and the following disclaimer. - # * . Redistributions in binary form must reproduce the above copyright - # * notice, this list of conditions and the following disclaimer in - # * the documentation and/or other materials provided with the - # * distribution. - # * . Neither the name of the TaBE Project nor the names of its - # * contributors may be used to endorse or promote products derived - # * from this software without specific prior written permission. - # * - # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # * OF THE POSSIBILITY OF SUCH DAMAGE. - # */ - # - # /* - # * Copyright (c) 1999 Computer Systems and Communication Lab, - # * Institute of Information Science, Academia - # * Sinica. All rights reserved. - # * - # * Redistribution and use in source and binary forms, with or without - # * modification, are permitted provided that the following conditions - # * are met: - # * - # * . Redistributions of source code must retain the above copyright - # * notice, this list of conditions and the following disclaimer. - # * . Redistributions in binary form must reproduce the above copyright - # * notice, this list of conditions and the following disclaimer in - # * the documentation and/or other materials provided with the - # * distribution. - # * . Neither the name of the Computer Systems and Communication Lab - # * nor the names of its contributors may be used to endorse or - # * promote products derived from this software without specific - # * prior written permission. - # * - # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # * OF THE POSSIBILITY OF SUCH DAMAGE. - # */ - # - # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, - # University of Illinois - # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 - # - # ---------------COPYING.libtabe-----END-------------------------------- - # - # - # ---------------COPYING.ipadic-----BEGIN------------------------------- - # - # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science - # and Technology. All Rights Reserved. - # - # Use, reproduction, and distribution of this software is permitted. - # Any copy of this software, whether in its original form or modified, - # must include both the above copyright notice and the following - # paragraphs. - # - # Nara Institute of Science and Technology (NAIST), - # the copyright holders, disclaims all warranties with regard to this - # software, including all implied warranties of merchantability and - # fitness, in no event shall NAIST be liable for - # any special, indirect or consequential damages or any damages - # whatsoever resulting from loss of use, data or profits, whether in an - # action of contract, negligence or other tortuous action, arising out - # of or in connection with the use or performance of this software. - # - # A large portion of the dictionary entries - # originate from ICOT Free Software. The following conditions for ICOT - # Free Software applies to the current dictionary as well. - # - # Each User may also freely distribute the Program, whether in its - # original form or modified, to any third party or parties, PROVIDED - # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear - # on, or be attached to, the Program, which is distributed substantially - # in the same form as set out herein and that such intended - # distribution, if actually made, will neither violate or otherwise - # contravene any of the laws and regulations of the countries having - # jurisdiction over the User or the intended distribution itself. - # - # NO WARRANTY - # - # The program was produced on an experimental basis in the course of the - # research and development conducted during the project and is provided - # to users as so produced on an experimental basis. Accordingly, the - # program is provided without any warranty whatsoever, whether express, - # implied, statutory or otherwise. The term "warranty" used herein - # includes, but is not limited to, any warranty of the quality, - # performance, merchantability and fitness for a particular purpose of - # the program and the nonexistence of any infringement or violation of - # any right of any third party. - # - # Each user of the program will agree and understand, and be deemed to - # have agreed and understood, that there is no warranty whatsoever for - # the program and, accordingly, the entire risk arising from or - # otherwise connected with the program is assumed by the user. - # - # Therefore, neither ICOT, the copyright holder, or any other - # organization that participated in or was otherwise related to the - # development of the program and their respective officials, directors, - # officers and other employees shall be held liable for any and all - # damages, including, without limitation, general, special, incidental - # and consequential damages, arising out of or otherwise in connection - # with the use or inability to use the program or any product, material - # or result produced or otherwise obtained by using the program, - # regardless of whether they have been advised of, or otherwise had - # knowledge of, the possibility of such damages at any time during the - # project or thereafter. Each user will be deemed to have agreed to the - # foregoing by his or her commencement of use of the program. The term - # "use" as used herein includes, but is not limited to, the use, - # modification, copying and distribution of the program and the - # production of secondary products from the program. - # - # In the case where the program, whether in its original form or - # modified, was distributed or delivered to or received by a user from - # any person, organization or entity other than ICOT, unless it makes or - # grants independently of ICOT any specific warranty to the user in - # writing, such person, organization or entity, will also be exempted - # from and not be held liable to the user for any such damages as noted - # above as far as the program is concerned. - # - # ---------------COPYING.ipadic-----END---------------------------------- - -3. Lao Word Break Dictionary Data (laodict.txt) - - # Copyright (c) 2013 International Business Machines Corporation - # and others. All Rights Reserved. - # - # Project: http://code.google.com/p/lao-dictionary/ - # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt - # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt - # (copied below) - # - # This file is derived from the above dictionary, with slight - # modifications. - # ---------------------------------------------------------------------- - # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, - # are permitted provided that the following conditions are met: - # - # - # Redistributions of source code must retain the above copyright notice, this - # list of conditions and the following disclaimer. Redistributions in - # binary form must reproduce the above copyright notice, this list of - # conditions and the following disclaimer in the documentation and/or - # other materials provided with the distribution. - # - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # OF THE POSSIBILITY OF SUCH DAMAGE. - # -------------------------------------------------------------------------- - -4. Burmese Word Break Dictionary Data (burmesedict.txt) - - # Copyright (c) 2014 International Business Machines Corporation - # and others. All Rights Reserved. - # - # This list is part of a project hosted at: - # github.com/kanyawtech/myanmar-karen-word-lists - # - # -------------------------------------------------------------------------- - # Copyright (c) 2013, LeRoy Benjamin Sharon - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions - # are met: Redistributions of source code must retain the above - # copyright notice, this list of conditions and the following - # disclaimer. Redistributions in binary form must reproduce the - # above copyright notice, this list of conditions and the following - # disclaimer in the documentation and/or other materials provided - # with the distribution. - # - # Neither the name Myanmar Karen Word Lists, nor the names of its - # contributors may be used to endorse or promote products derived - # from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS - # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - # SUCH DAMAGE. - # -------------------------------------------------------------------------- - -5. Time Zone Database - - ICU uses the public domain data and code derived from Time Zone -Database for its time zone support. The ownership of the TZ database -is explained in BCP 175: Procedure for Maintaining the Time Zone -Database section 7. - - # 7. Database Ownership - # - # The TZ database itself is not an IETF Contribution or an IETF - # document. Rather it is a pre-existing and regularly updated work - # that is in the public domain, and is intended to remain in the - # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do - # not apply to the TZ Database or contributions that individuals make - # to it. Should any claims be made and substantiated against the TZ - # Database, the organization that is providing the IANA - # Considerations defined in this RFC, under the memorandum of - # understanding with the IETF, currently ICANN, may act in accordance - # with all competent court orders. No ownership claims will be made - # by ICANN or the IETF Trust on the database or the code. Any person - # making a contribution to the database or code waives all rights to - # future claims in that contribution or in the TZ Database. - -6. Google double-conversion - -Copyright 2006-2011, the V8 project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -END LICENSE FOR third_party/icu/data/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/boringssl/LICENSE --------------------------------------------------------------------------------- -BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL -licensing. Files that are completely new have a Google copyright and an ISC -license. This license is reproduced at the bottom of this file. - -Contributors to BoringSSL are required to follow the CLA rules for Chromium: -https://cla.developers.google.com/clas - -Files in third_party/ have their own licenses, as described therein. The MIT -license, for third_party/fiat, which, unlike other third_party directories, is -compiled into non-test libraries, is included below. - -The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the -OpenSSL License and the original SSLeay license apply to the toolkit. See below -for the actual license texts. Actually both licenses are BSD-style Open Source -licenses. In case of any license issues related to OpenSSL please contact -openssl-core@openssl.org. - -The following are Google-internal bug numbers where explicit permission from -some authors is recorded for use of their work. (This is purely for our own -record keeping.) - 27287199 - 27287880 - 27287883 - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - - -ISC license used for completely new code in BoringSSL: - -/* Copyright (c) 2015, Google Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - - -The code in third_party/fiat carries the MIT license: - -Copyright (c) 2015-2016 the fiat-crypto authors (see -https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Licenses for support code -------------------------- - -Parts of the TLS test suite are under the Go license. This code is not included -in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so -distributing code linked against BoringSSL does not trigger this license: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -BoringSSL uses the Chromium test infrastructure to run a continuous build, -trybots etc. The scripts which manage this, and the script for generating build -metadata, are under the Chromium license. Distributing code linked against -BoringSSL does not trigger this license. - -Copyright 2015 The Chromium Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -END LICENSE FOR external/boringssl/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/com_google_protobuf/LICENSE --------------------------------------------------------------------------------- -Copyright 2008 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. --------------------------------------------------------------------------------- -END LICENSE FOR external/com_google_protobuf/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/com_googlesource_code_re2/LICENSE --------------------------------------------------------------------------------- -// Copyright (c) 2009 The RE2 Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -END LICENSE FOR external/com_googlesource_code_re2/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/curl/COPYING --------------------------------------------------------------------------------- -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1996 - 2020, Daniel Stenberg, , and many -contributors, see the THANKS file. - -All rights reserved. - -Permission to use, copy, modify, and distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright -notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. --------------------------------------------------------------------------------- -END LICENSE FOR external/curl/COPYING --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/double_conversion/LICENSE --------------------------------------------------------------------------------- -Copyright 2006-2011, the V8 project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -END LICENSE FOR external/double_conversion/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/eigen_archive/COPYING.MPL2 --------------------------------------------------------------------------------- -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. --------------------------------------------------------------------------------- -END LICENSE FOR external/eigen_archive/COPYING.MPL2 --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/farmhash_archive/COPYING --------------------------------------------------------------------------------- -// Copyright (c) 2014 Google, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. --------------------------------------------------------------------------------- -END LICENSE FOR external/farmhash_archive/COPYING --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/fft2d/readme2d.txt --------------------------------------------------------------------------------- -General Purpose 2D,3D FFT (Fast Fourier Transform) Package - -Files - alloc.c : 2D-array Allocation - alloc.h : 2D-array Allocation - fft4f2d.c : 2D FFT Package in C - Version I (radix 4, 2) - fft4f2d.f : 2D FFT Package in Fortran - Version I (radix 4, 2) - fftsg.c : 1D FFT Package in C - Fast Version (Split-Radix) - fftsg.f : 1D FFT Package in Fortran - Fast Version (Split-Radix) - fftsg2d.c : 2D FFT Package in C - Version II (Split-Radix) - fftsg2d.f : 2D FFT Package in Fortran - Version II (Split-Radix) - fftsg3d.c : 3D FFT Package in C - Version II (Split-Radix) - fftsg3d.f : 3D FFT Package in Fortran - Version II (Split-Radix) - shrtdct.c : 8x8, 16x16 DCT Package - sample2d/ - Makefile : for gcc, cc - Makefile.f77: for Fortran - Makefile.pth: Pthread version - fft4f2dt.c : Test Program for "fft4f2d.c" - fft4f2dt.f : Test Program for "fft4f2d.f" - fftsg2dt.c : Test Program for "fftsg2d.c" - fftsg2dt.f : Test Program for "fftsg2d.f" - fftsg3dt.c : Test Program for "fftsg3d.c" - fftsg3dt.f : Test Program for "fftsg3d.f" - shrtdctt.c : Test Program for "shrtdct.c" - -Difference of Files - C and Fortran versions are equal and - the same routines are in each version. - ---- Difference between "fft4f2d.*" and "fftsg2d.*" ---- - "fft4f2d.*" are optimized for the old machines that - don't have the large size CPU cache. - "fftsg2d.*", "fftsg3d.*" use 1D FFT routines in "fftsg.*". - "fftsg2d.*", "fftsg3d.*" are optimized for the machines that - have the multi-level (L1,L2,etc) cache. - -Routines in the Package - in fft4f2d.*, fftsg2d.* - cdft2d: 2-dim Complex Discrete Fourier Transform - rdft2d: 2-dim Real Discrete Fourier Transform - ddct2d: 2-dim Discrete Cosine Transform - ddst2d: 2-dim Discrete Sine Transform - rdft2dsort: rdft2d input/output ordering (fftsg2d.*) - in fftsg3d.* - cdft3d: 3-dim Complex Discrete Fourier Transform - rdft3d: 3-dim Real Discrete Fourier Transform - ddct3d: 3-dim Discrete Cosine Transform - ddst3d: 3-dim Discrete Sine Transform - rdft3dsort: rdft3d input/output ordering - in fftsg.* - cdft: 1-dim Complex Discrete Fourier Transform - rdft: 1-dim Real Discrete Fourier Transform - ddct: 1-dim Discrete Cosine Transform - ddst: 1-dim Discrete Sine Transform - dfct: 1-dim Real Symmetric DFT - dfst: 1-dim Real Anti-symmetric DFT - (these routines are called by fftsg2d.*, fftsg3d.*) - in shrtdct.c - ddct8x8s : Normalized 8x8 DCT - ddct16x16s: Normalized 16x16 DCT - (faster than ddct2d()) - -Usage - Brief explanations are in block comments of each packages. - The examples are given in the test programs. - -Copyright - Copyright(C) 1997,2001 Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp). - You may use, copy, modify this code for any purpose and - without fee. You may distribute this ORIGINAL package. - -History - ... - Nov. 2001 : Add 3D-FFT routines - Dec. 2006 : Fix a documentation bug in "fftsg3d.*" - Dec. 2006 : Fix a minor bug in "fftsg.f" - --------------------------------------------------------------------------------- -END LICENSE FOR external/fft2d/readme2d.txt --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/gemmlowp/LICENSE --------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/gemmlowp/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/gif/COPYING --------------------------------------------------------------------------------- -The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. --------------------------------------------------------------------------------- -END LICENSE FOR external/gif/COPYING --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/highwayhash/LICENSE --------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --------------------------------------------------------------------------------- -END LICENSE FOR external/highwayhash/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/icu/icu4c/LICENSE --------------------------------------------------------------------------------- -COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) - -Copyright © 1991-2019 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in https://www.unicode.org/copyright.html. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. - ---------------------- - -Third-Party Software Licenses - -This section contains third-party software notices and/or additional -terms for licensed third-party software components included within ICU -libraries. - -1. ICU License - ICU 1.8.1 to ICU 57.1 - -COPYRIGHT AND PERMISSION NOTICE - -Copyright (c) 1995-2016 International Business Machines Corporation and others -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY -SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -All trademarks and registered trademarks mentioned herein are the -property of their respective owners. - -2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) - - # The Google Chrome software developed by Google is licensed under - # the BSD license. Other software included in this distribution is - # provided under other licenses, as set forth below. - # - # The BSD License - # http://opensource.org/licenses/bsd-license.php - # Copyright (C) 2006-2008, Google Inc. - # - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are met: - # - # Redistributions of source code must retain the above copyright notice, - # this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above - # copyright notice, this list of conditions and the following - # disclaimer in the documentation and/or other materials provided with - # the distribution. - # Neither the name of Google Inc. nor the names of its - # contributors may be used to endorse or promote products derived from - # this software without specific prior written permission. - # - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # - # The word list in cjdict.txt are generated by combining three word lists - # listed below with further processing for compound word breaking. The - # frequency is generated with an iterative training against Google web - # corpora. - # - # * Libtabe (Chinese) - # - https://sourceforge.net/project/?group_id=1519 - # - Its license terms and conditions are shown below. - # - # * IPADIC (Japanese) - # - http://chasen.aist-nara.ac.jp/chasen/distribution.html - # - Its license terms and conditions are shown below. - # - # ---------COPYING.libtabe ---- BEGIN-------------------- - # - # /* - # * Copyright (c) 1999 TaBE Project. - # * Copyright (c) 1999 Pai-Hsiang Hsiao. - # * All rights reserved. - # * - # * Redistribution and use in source and binary forms, with or without - # * modification, are permitted provided that the following conditions - # * are met: - # * - # * . Redistributions of source code must retain the above copyright - # * notice, this list of conditions and the following disclaimer. - # * . Redistributions in binary form must reproduce the above copyright - # * notice, this list of conditions and the following disclaimer in - # * the documentation and/or other materials provided with the - # * distribution. - # * . Neither the name of the TaBE Project nor the names of its - # * contributors may be used to endorse or promote products derived - # * from this software without specific prior written permission. - # * - # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # * OF THE POSSIBILITY OF SUCH DAMAGE. - # */ - # - # /* - # * Copyright (c) 1999 Computer Systems and Communication Lab, - # * Institute of Information Science, Academia - # * Sinica. All rights reserved. - # * - # * Redistribution and use in source and binary forms, with or without - # * modification, are permitted provided that the following conditions - # * are met: - # * - # * . Redistributions of source code must retain the above copyright - # * notice, this list of conditions and the following disclaimer. - # * . Redistributions in binary form must reproduce the above copyright - # * notice, this list of conditions and the following disclaimer in - # * the documentation and/or other materials provided with the - # * distribution. - # * . Neither the name of the Computer Systems and Communication Lab - # * nor the names of its contributors may be used to endorse or - # * promote products derived from this software without specific - # * prior written permission. - # * - # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # * OF THE POSSIBILITY OF SUCH DAMAGE. - # */ - # - # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, - # University of Illinois - # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 - # - # ---------------COPYING.libtabe-----END-------------------------------- - # - # - # ---------------COPYING.ipadic-----BEGIN------------------------------- - # - # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science - # and Technology. All Rights Reserved. - # - # Use, reproduction, and distribution of this software is permitted. - # Any copy of this software, whether in its original form or modified, - # must include both the above copyright notice and the following - # paragraphs. - # - # Nara Institute of Science and Technology (NAIST), - # the copyright holders, disclaims all warranties with regard to this - # software, including all implied warranties of merchantability and - # fitness, in no event shall NAIST be liable for - # any special, indirect or consequential damages or any damages - # whatsoever resulting from loss of use, data or profits, whether in an - # action of contract, negligence or other tortuous action, arising out - # of or in connection with the use or performance of this software. - # - # A large portion of the dictionary entries - # originate from ICOT Free Software. The following conditions for ICOT - # Free Software applies to the current dictionary as well. - # - # Each User may also freely distribute the Program, whether in its - # original form or modified, to any third party or parties, PROVIDED - # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear - # on, or be attached to, the Program, which is distributed substantially - # in the same form as set out herein and that such intended - # distribution, if actually made, will neither violate or otherwise - # contravene any of the laws and regulations of the countries having - # jurisdiction over the User or the intended distribution itself. - # - # NO WARRANTY - # - # The program was produced on an experimental basis in the course of the - # research and development conducted during the project and is provided - # to users as so produced on an experimental basis. Accordingly, the - # program is provided without any warranty whatsoever, whether express, - # implied, statutory or otherwise. The term "warranty" used herein - # includes, but is not limited to, any warranty of the quality, - # performance, merchantability and fitness for a particular purpose of - # the program and the nonexistence of any infringement or violation of - # any right of any third party. - # - # Each user of the program will agree and understand, and be deemed to - # have agreed and understood, that there is no warranty whatsoever for - # the program and, accordingly, the entire risk arising from or - # otherwise connected with the program is assumed by the user. - # - # Therefore, neither ICOT, the copyright holder, or any other - # organization that participated in or was otherwise related to the - # development of the program and their respective officials, directors, - # officers and other employees shall be held liable for any and all - # damages, including, without limitation, general, special, incidental - # and consequential damages, arising out of or otherwise in connection - # with the use or inability to use the program or any product, material - # or result produced or otherwise obtained by using the program, - # regardless of whether they have been advised of, or otherwise had - # knowledge of, the possibility of such damages at any time during the - # project or thereafter. Each user will be deemed to have agreed to the - # foregoing by his or her commencement of use of the program. The term - # "use" as used herein includes, but is not limited to, the use, - # modification, copying and distribution of the program and the - # production of secondary products from the program. - # - # In the case where the program, whether in its original form or - # modified, was distributed or delivered to or received by a user from - # any person, organization or entity other than ICOT, unless it makes or - # grants independently of ICOT any specific warranty to the user in - # writing, such person, organization or entity, will also be exempted - # from and not be held liable to the user for any such damages as noted - # above as far as the program is concerned. - # - # ---------------COPYING.ipadic-----END---------------------------------- - -3. Lao Word Break Dictionary Data (laodict.txt) - - # Copyright (c) 2013 International Business Machines Corporation - # and others. All Rights Reserved. - # - # Project: http://code.google.com/p/lao-dictionary/ - # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt - # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt - # (copied below) - # - # This file is derived from the above dictionary, with slight - # modifications. - # ---------------------------------------------------------------------- - # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, - # are permitted provided that the following conditions are met: - # - # - # Redistributions of source code must retain the above copyright notice, this - # list of conditions and the following disclaimer. Redistributions in - # binary form must reproduce the above copyright notice, this list of - # conditions and the following disclaimer in the documentation and/or - # other materials provided with the distribution. - # - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - # OF THE POSSIBILITY OF SUCH DAMAGE. - # -------------------------------------------------------------------------- - -4. Burmese Word Break Dictionary Data (burmesedict.txt) - - # Copyright (c) 2014 International Business Machines Corporation - # and others. All Rights Reserved. - # - # This list is part of a project hosted at: - # github.com/kanyawtech/myanmar-karen-word-lists - # - # -------------------------------------------------------------------------- - # Copyright (c) 2013, LeRoy Benjamin Sharon - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions - # are met: Redistributions of source code must retain the above - # copyright notice, this list of conditions and the following - # disclaimer. Redistributions in binary form must reproduce the - # above copyright notice, this list of conditions and the following - # disclaimer in the documentation and/or other materials provided - # with the distribution. - # - # Neither the name Myanmar Karen Word Lists, nor the names of its - # contributors may be used to endorse or promote products derived - # from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS - # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - # SUCH DAMAGE. - # -------------------------------------------------------------------------- - -5. Time Zone Database - - ICU uses the public domain data and code derived from Time Zone -Database for its time zone support. The ownership of the TZ database -is explained in BCP 175: Procedure for Maintaining the Time Zone -Database section 7. - - # 7. Database Ownership - # - # The TZ database itself is not an IETF Contribution or an IETF - # document. Rather it is a pre-existing and regularly updated work - # that is in the public domain, and is intended to remain in the - # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do - # not apply to the TZ Database or contributions that individuals make - # to it. Should any claims be made and substantiated against the TZ - # Database, the organization that is providing the IANA - # Considerations defined in this RFC, under the memorandum of - # understanding with the IETF, currently ICANN, may act in accordance - # with all competent court orders. No ownership claims will be made - # by ICANN or the IETF Trust on the database or the code. Any person - # making a contribution to the database or code waives all rights to - # future claims in that contribution or in the TZ Database. - -6. Google double-conversion - -Copyright 2006-2011, the V8 project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -END LICENSE FOR external/icu/icu4c/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/libjpeg_turbo/LICENSE.md --------------------------------------------------------------------------------- -libjpeg-turbo Licenses -====================== - -libjpeg-turbo is covered by three compatible BSD-style open source licenses: - -- The IJG (Independent JPEG Group) License, which is listed in - [README.ijg](README.ijg) - - This license applies to the libjpeg API library and associated programs - (any code inherited from libjpeg, and any modifications to that code.) - -- The Modified (3-clause) BSD License, which is listed below - - This license covers the TurboJPEG API library and associated programs, as - well as the build system. - -- The [zlib License](https://opensource.org/licenses/Zlib) - - This license is a subset of the other two, and it covers the libjpeg-turbo - SIMD extensions. - - -Complying with the libjpeg-turbo Licenses -========================================= - -This section provides a roll-up of the libjpeg-turbo licensing terms, to the -best of our understanding. - -1. If you are distributing a modified version of the libjpeg-turbo source, - then: - - 1. You cannot alter or remove any existing copyright or license notices - from the source. - - **Origin** - - Clause 1 of the IJG License - - Clause 1 of the Modified BSD License - - Clauses 1 and 3 of the zlib License - - 2. You must add your own copyright notice to the header of each source - file you modified, so others can tell that you modified that file (if - there is not an existing copyright header in that file, then you can - simply add a notice stating that you modified the file.) - - **Origin** - - Clause 1 of the IJG License - - Clause 2 of the zlib License - - 3. You must include the IJG README file, and you must not alter any of the - copyright or license text in that file. - - **Origin** - - Clause 1 of the IJG License - -2. If you are distributing only libjpeg-turbo binaries without the source, or - if you are distributing an application that statically links with - libjpeg-turbo, then: - - 1. Your product documentation must include a message stating: - - This software is based in part on the work of the Independent JPEG - Group. - - **Origin** - - Clause 2 of the IJG license - - 2. If your binary distribution includes or uses the TurboJPEG API, then - your product documentation must include the text of the Modified BSD - License (see below.) - - **Origin** - - Clause 2 of the Modified BSD License - -3. You cannot use the name of the IJG or The libjpeg-turbo Project or the - contributors thereof in advertising, publicity, etc. - - **Origin** - - IJG License - - Clause 3 of the Modified BSD License - -4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be - free of defects, nor do we accept any liability for undesirable - consequences resulting from your use of the software. - - **Origin** - - IJG License - - Modified BSD License - - zlib License - - -The Modified (3-clause) BSD License -=================================== - -Copyright (C)2009-2020 D. R. Commander. All Rights Reserved. -Copyright (C)2015 Viktor Szathmáry. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -- Neither the name of the libjpeg-turbo Project nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -Why Three Licenses? -=================== - -The zlib License could have been used instead of the Modified (3-clause) BSD -License, and since the IJG License effectively subsumes the distribution -conditions of the zlib License, this would have effectively placed -libjpeg-turbo binary distributions under the IJG License. However, the IJG -License specifically refers to the Independent JPEG Group and does not extend -attribution and endorsement protections to other entities. Thus, it was -desirable to choose a license that granted us the same protections for new code -that were granted to the IJG for code derived from their software. --------------------------------------------------------------------------------- -END LICENSE FOR external/libjpeg_turbo/LICENSE.md --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/llvm-project/llvm/LICENSE.TXT --------------------------------------------------------------------------------- -============================================================================== -The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: -============================================================================== - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----- LLVM Exceptions to the Apache 2.0 License ---- - -As an exception, if, as a result of your compiling your source code, portions -of this Software are embedded into an Object form of such source code, you -may redistribute such embedded portions in such Object form without complying -with the conditions of Sections 4(a), 4(b) and 4(d) of the License. - -In addition, if you combine or link compiled forms of this Software with -software that is licensed under the GPLv2 ("Combined Software") and if a -court of competent jurisdiction determines that the patent provision (Section -3), the indemnity provision (Section 9) or other Section of the License -conflicts with the conditions of the GPLv2, you may retroactively and -prospectively choose to deem waived or otherwise exclude such Section(s) of -the License, but only in their entirety and only with respect to the Combined -Software. - -============================================================================== -Software from third parties included in the LLVM Project: -============================================================================== -The LLVM Project contains third party software which is under different license -terms. All such code will be identified clearly using at least one of two -mechanisms: -1) It will be in a separate directory tree with its own `LICENSE.txt` or - `LICENSE` file at the top containing the specific license and restrictions - which apply to that software, or -2) It will contain specific license and restriction terms at the top of every - file. - -============================================================================== -Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy): -============================================================================== -University of Illinois/NCSA -Open Source License - -Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign. -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - --------------------------------------------------------------------------------- -END LICENSE FOR external/llvm-project/llvm/LICENSE.TXT --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/llvm-project/mlir/LICENSE.TXT --------------------------------------------------------------------------------- -============================================================================== -The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: -============================================================================== - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----- LLVM Exceptions to the Apache 2.0 License ---- - -As an exception, if, as a result of your compiling your source code, portions -of this Software are embedded into an Object form of such source code, you -may redistribute such embedded portions in such Object form without complying -with the conditions of Sections 4(a), 4(b) and 4(d) of the License. - -In addition, if you combine or link compiled forms of this Software with -software that is licensed under the GPLv2 ("Combined Software") and if a -court of competent jurisdiction determines that the patent provision (Section -3), the indemnity provision (Section 9) or other Section of the License -conflicts with the conditions of the GPLv2, you may retroactively and -prospectively choose to deem waived or otherwise exclude such Section(s) of -the License, but only in their entirety and only with respect to the Combined -Software. - -============================================================================== -Software from third parties included in the LLVM Project: -============================================================================== -The LLVM Project contains third party software which is under different license -terms. All such code will be identified clearly using at least one of two -mechanisms: -1) It will be in a separate directory tree with its own `LICENSE.txt` or - `LICENSE` file at the top containing the specific license and restrictions - which apply to that software, or -2) It will contain specific license and restriction terms at the top of every - file. --------------------------------------------------------------------------------- -END LICENSE FOR external/llvm-project/mlir/LICENSE.TXT --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/lmdb/LICENSE --------------------------------------------------------------------------------- -The OpenLDAP Public License - Version 2.8, 17 August 2003 - -Redistribution and use of this software and associated documentation -("Software"), with or without modification, are permitted provided -that the following conditions are met: - -1. Redistributions in source form must retain copyright statements - and notices, - -2. Redistributions in binary form must reproduce applicable copyright - statements and notices, this list of conditions, and the following - disclaimer in the documentation and/or other materials provided - with the distribution, and - -3. Redistributions must contain a verbatim copy of this document. - -The OpenLDAP Foundation may revise this license from time to time. -Each revision is distinguished by a version number. You may use -this Software under terms of this license revision or under the -terms of any subsequent revision of the license. - -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS -CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S) -OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -The names of the authors and copyright holders must not be used in -advertising or otherwise to promote the sale, use or other dealing -in this Software without specific, written prior permission. Title -to copyright in this Software shall at all times remain with copyright -holders. - -OpenLDAP is a registered trademark of the OpenLDAP Foundation. - -Copyright 1999-2003 The OpenLDAP Foundation, Redwood City, -California, USA. All Rights Reserved. Permission to copy and -distribute verbatim copies of this document is granted. --------------------------------------------------------------------------------- -END LICENSE FOR external/lmdb/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/local_config_tensorrt/LICENSE --------------------------------------------------------------------------------- -Copyright 2018 The TensorFlow Authors. All rights reserved. - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018, The TensorFlow Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/local_config_tensorrt/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/nasm/LICENSE --------------------------------------------------------------------------------- -NASM is now licensed under the 2-clause BSD license, also known as the -simplified BSD license. - - Copyright 1996-2010 the NASM Authors - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following - conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -END LICENSE FOR external/nasm/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/nsync/LICENSE --------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/nsync/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/png/LICENSE --------------------------------------------------------------------------------- -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE -========================================= - -PNG Reference Library License version 2 ---------------------------------------- - - * Copyright (c) 1995-2019 The PNG Reference Library Authors. - * Copyright (c) 2018-2019 Cosmin Truta. - * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. - * Copyright (c) 1996-1997 Andreas Dilger. - * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - -The software is supplied "as is", without warranty of any kind, -express or implied, including, without limitation, the warranties -of merchantability, fitness for a particular purpose, title, and -non-infringement. In no event shall the Copyright owners, or -anyone distributing the software, be liable for any damages or -other liability, whether in contract, tort or otherwise, arising -from, out of, or in connection with the software, or the use or -other dealings in the software, even if advised of the possibility -of such damage. - -Permission is hereby granted to use, copy, modify, and distribute -this software, or portions hereof, for any purpose, without fee, -subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you - must not claim that you wrote the original software. If you - use this software in a product, an acknowledgment in the product - documentation would be appreciated, but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - -PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) ------------------------------------------------------------------------ - -libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are -Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are -derived from libpng-1.0.6, and are distributed according to the same -disclaimer and license as libpng-1.0.6 with the following individuals -added to the list of Contributing Authors: - - Simon-Pierre Cadieux - Eric S. Raymond - Mans Rullgard - Cosmin Truta - Gilles Vollant - James Yu - Mandar Sahastrabuddhe - Google Inc. - Vadim Barkov - -and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of - the library or against infringement. There is no warranty that our - efforts or the library will fulfill any of your particular purposes - or needs. This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and effort is - with the user. - -Some files in the "contrib" directory and some configure-generated -files that are distributed with libpng have other copyright owners, and -are released under other open source licenses. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from -libpng-0.96, and are distributed according to the same disclaimer and -license as libpng-0.96, with the following individuals added to the -list of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, -and are distributed according to the same disclaimer and license as -libpng-0.88, with the following individuals added to the list of -Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -Some files in the "scripts" directory have other copyright owners, -but are released under this license. - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing -Authors and Group 42, Inc. disclaim all warranties, expressed or -implied, including, without limitation, the warranties of -merchantability and of fitness for any purpose. The Contributing -Authors and Group 42, Inc. assume no liability for direct, indirect, -incidental, special, exemplary, or consequential damages, which may -result from the use of the PNG Reference Library, even if advised of -the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - - 2. Altered versions must be plainly marked as such and must not - be misrepresented as being the original source. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, -without fee, and encourage the use of this source code as a component -to supporting the PNG file format in commercial products. If you use -this source code in a product, acknowledgment is not required but would -be appreciated. --------------------------------------------------------------------------------- -END LICENSE FOR external/png/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/snappy/COPYING --------------------------------------------------------------------------------- -Copyright 2011, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=== - -Some of the benchmark data in testdata/ is licensed differently: - - - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and - is licensed under the Creative Commons Attribution 3.0 license - (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/ - for more information. - - - kppkn.gtb is taken from the Gaviota chess tablebase set, and - is licensed under the MIT License. See - https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1 - for more information. - - - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper - “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA - Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro, - which is licensed under the CC-BY license. See - http://www.ploscompbiol.org/static/license for more ifnormation. - - - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project - Gutenberg. The first three have expired copyrights and are in the public - domain; the latter does not have expired copyright, but is still in the - public domain according to the license information - (http://www.gutenberg.org/ebooks/53). --------------------------------------------------------------------------------- -END LICENSE FOR external/snappy/COPYING --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/zlib/zlib.h --------------------------------------------------------------------------------- -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.11, January 15th, 2017 - - Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 - (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.11" -#define ZLIB_VERNUM 0x12b0 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 11 -#define ZLIB_VER_SUBREVISION 0 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed data. - This version of the library supports only one compression method (deflation) - but other algorithms will be added later and will have the same stream - interface. - - Compression can be done in a single step if the buffers are large enough, - or can be done by repeated calls of the compression function. In the latter - case, the application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip and raw deflate streams in - memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never crash - even in the case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - z_const Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ - - Bytef *next_out; /* next output byte will go here */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ - - z_const char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text - for deflate, or the decoding state for inflate */ - uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has dropped - to zero. It must update next_out and avail_out when avail_out has dropped - to zero. The application must initialize zalloc, zfree and opaque before - calling the init function. All other fields are set by the compression - library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. In that case, zlib is thread-safe. When zalloc and zfree are - Z_NULL on entry to the initialization function, they are set to internal - routines that use the standard library functions malloc() and free(). - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this if - the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers - returned by zalloc for objects of exactly 65536 bytes *must* have their - offset normalized to zero. The default allocation function provided by this - library ensures this (see zutil.c). To reduce memory requirements and avoid - any allocation of 64K objects, at the expense of compression ratio, compile - the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or progress - reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use by the decompressor (particularly - if the decompressor wants to decompress everything in a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -#define Z_TREES 6 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field for deflate() */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is not - compatible with the zlib.h header file used by the application. This check - is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. If - zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at all - (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION - requests a default compromise between speed and compression (currently - equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if level is not a valid compression level, or - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). msg is set to null - if there is no error message. deflateInit does not perform any compression: - this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Generate more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary. Some output may be provided even if - flush is zero. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating avail_in or avail_out accordingly; avail_out should - never be zero before the call. The application can consume the compressed - output when it wants, for example when the output buffer is full (avail_out - == 0), or after each call of deflate(). If deflate returns Z_OK and with - zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. See deflatePending(), - which can be used if desired to determine whether or not there is more ouput - in that case. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumulate before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In - particular avail_in is zero after the call if enough output space has been - provided before the call.) Flushing may degrade compression for some - compression algorithms and so it should be used only when necessary. This - completes the current deflate block and follows it with an empty stored block - that is three bits plus filler bits to the next byte, followed by four bytes - (00 00 ff ff). - - If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the - output buffer, but the output is not aligned to a byte boundary. All of the - input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. - This completes the current deflate block and follows it with an empty fixed - codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed - codes block. - - If flush is set to Z_BLOCK, a deflate block is completed and emitted, as - for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to - seven bits of the current block are held to be written as the next byte after - the next deflate block is completed. In this case, the decompressor may not - be provided enough bits at this point in order to complete decompression of - the data provided so far to the compressor. It may need to wait for the next - block to be emitted. This is for advanced applications that need to control - the emission of deflate blocks. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this - function must be called again with Z_FINISH and more output space (updated - avail_out) but no more input data, until it returns with Z_STREAM_END or an - error. After deflate has returned Z_STREAM_END, the only possible operations - on the stream are deflateReset or deflateEnd. - - Z_FINISH can be used in the first deflate call after deflateInit if all the - compression is to be done in a single step. In order to complete in one - call, avail_out must be at least the value returned by deflateBound (see - below). Then deflate is guaranteed to return Z_STREAM_END. If not enough - output space is provided, deflate will not return Z_STREAM_END, and it must - be called again as described above. - - deflate() sets strm->adler to the Adler-32 checksum of all input read - so far (that is, total_in bytes). If a gzip stream is being generated, then - strm->adler will be the CRC-32 checksum of the input read so far. (See - deflateInit2 below.) - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is - considered binary. This field is only for information purposes and does not - affect the compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL or the state was inadvertently written over - by the application), or Z_BUF_ERROR if no progress is possible (for example - avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and - deflate() can be called again with more input and more output space to - continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. In the current version of inflate, the provided input is not - read or consumed. The allocation of a sliding window will be deferred to - the first call of inflate (if the decompression does not complete on the - first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression. - Actual decompression will be done by inflate(). So next_in, and avail_in, - next_out, and avail_out are unused and unchanged. The current - implementation of inflateInit() does not process any header information -- - that is deferred until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), then next_in and avail_in are updated - accordingly, and processing will resume at this point for the next call of - inflate(). - - - Generate more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. If the - caller of inflate() does not provide both available input and available - output space, it is possible that there will be no progress made. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - To assist in this, on return inflate() always sets strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed Adler-32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained unless inflateGetHeader() is used. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - produced so far. The CRC-32 is checked against the gzip trailer, as is the - uncompressed length, modulo 2^32. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value, in which case strm->msg points to a string with a more specific - error), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL, or the state was inadvertently written over - by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR - if no progress was possible or if there was not enough room in the output - buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is to be attempted. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state - was inconsistent. -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by the - caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - For the current implementation of deflate(), a windowBits value of 8 (a - window size of 256 bytes) is not supported. As a result, a request for 8 - will result in 9 (a 512-byte window). In that case, providing 8 to - inflateInit2() will result in an error when the zlib header with 9 is - checked against the initialization of inflate(). The remedy is to not use 8 - with deflateInit2() with this initialization, or at least in that case use 9 - with inflateInit2(). - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute a check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to the appropriate value, - if the operating system was determined at compile time. If a gzip stream is - being written, strm->adler is a CRC-32 instead of an Adler-32. - - For raw deflate or gzip encoding, a request for a 256-byte window is - rejected as invalid, since only the zlib header provides a means of - transmitting the window size to the decompressor. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the Adler-32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The Adler-32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - Adler-32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by deflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If deflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - deflateGetDictionary() may return a length less than the window size, even - when more than the window size in input has been provided. It may return up - to 258 bytes less in that case, due to how zlib's implementation of deflate - manages the sliding window and lookahead for matches, where matches can be - up to 258 bytes long. If the application needs the last window-size bytes of - input, then that would need to be saved by the application outside of zlib. - - deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, but - does not free and reallocate the internal compression state. The stream - will leave the compression level and any other attributes that may have been - set unchanged. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2(). This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression approach (which is a function of the level) or the - strategy is changed, and if any input has been consumed in a previous - deflate() call, then the input available so far is compressed with the old - level and strategy using deflate(strm, Z_BLOCK). There are three approaches - for the compression levels 0, 1..3, and 4..9 respectively. The new level - and strategy will take effect at the next call of deflate(). - - If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does - not have enough output space to complete, then the parameter change will not - take effect. In this case, deflateParams() can be called again with the - same parameters and more output space to try again. - - In order to assure a change in the parameters on the first try, the - deflate stream should be flushed using deflate() with Z_BLOCK or other flush - request until strm.avail_out is not zero, before calling deflateParams(). - Then no more input data should be provided before the deflateParams() call. - If this is done, the old level and strategy will be applied to the data - compressed before deflateParams(), and the new level and strategy will be - applied to the the data compressed after deflateParams(). - - deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream - state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if - there was not enough output space to complete the compression of the - available input data before a change in the strategy or approach. Note that - in the case of a Z_BUF_ERROR, the parameters are not changed. A return - value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be - retried with more output space. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an Adler-32 or a CRC-32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see - below), inflate() will not automatically decode concatenated gzip streams. - inflate() will return Z_STREAM_END at the end of the gzip stream. The state - would need to be reset to continue decoding a subsequent gzip stream. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the Adler-32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect Adler-32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. If the window size is changed, then the - memory allocated for the window is freed, and the window will be reallocated - by inflate() if needed. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above, or -65536 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the default - behavior of inflate(), which expects a zlib header and trailer around the - deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero -- buf is ignored in that - case -- and inflateBack() will return a buffer error. inflateBack() will - call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. - out() should return zero on success, or non-zero on failure. If out() - returns non-zero, inflateBack() will return with an error. Neither in() nor - out() are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: ZLIB_DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. compress() is equivalent to compress2() with a level - parameter of Z_DEFAULT_COMPRESSION. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed data. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed data. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen)); -/* - Same as uncompress, except that sourceLen is a pointer, where the - length of the source is *sourceLen. On return, *sourceLen is the number of - source bytes consumed. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - - Opens a gzip (.gz) file for reading or writing. The mode parameter is as - in fopen ("rb" or "wb") but can also include a compression level ("wb9") or - a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only - compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' - for fixed code compression as in "wb9F". (See the description of - deflateInit2 for more information about the strategy parameter.) 'T' will - request transparent writing or appending with no compression and not using - the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen associates a gzFile with the file descriptor fd. File descriptors - are obtained from calls like open, dup, creat, pipe or fileno (if the file - has been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions. The - default buffer size is 8192 bytes. This function must be called after - gzopen() or gzdopen(), and before any other calls that read or write the - file. The buffer memory allocation is always deferred to the first read or - write. Three times that size in buffer space is allocated. A larger buffer - size of, for example, 64K or 128K bytes will noticeably increase the speed - of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. Previously provided - data is flushed before the parameter change. - - gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not - opened for writing, Z_ERRNO if there is an error writing the flushed data, - or Z_MEM_ERROR if there is a memory allocation error. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. If len is too large to fit in an int, - then nothing is read, -1 is returned, and the error state is set to - Z_STREAM_ERROR. -*/ - -ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, - gzFile file)); -/* - Read up to nitems items of size size from file to buf, otherwise operating - as gzread() does. This duplicates the interface of stdio's fread(), with - size_t request and return types. If the library defines size_t, then - z_size_t is identical to size_t. If not, then z_size_t is an unsigned - integer type that can contain a pointer. - - gzfread() returns the number of full items read of size size, or zero if - the end of the file was reached and a full item could not be read, or if - there was an error. gzerror() must be consulted if zero is returned in - order to determine if there was an error. If the multiplication of size and - nitems overflows, i.e. the product does not fit in a z_size_t, then nothing - is read, zero is returned, and the error state is set to Z_STREAM_ERROR. - - In the event that the end of file is reached and only a partial item is - available at the end, i.e. the remaining uncompressed data length is not a - multiple of size, then the final partial item is nevetheless read into buf - and the end-of-file flag is set. The length of the partial item read is not - provided, but could be inferred from the result of gztell(). This behavior - is the same as the behavior of fread() implementations in common libraries, - but it prevents the direct use of gzfread() to read a concurrently written - file, reseting and retrying on end-of-file, when size is not 1. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes written or 0 in case of - error. -*/ - -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, - z_size_t nitems, gzFile file)); -/* - gzfwrite() writes nitems items of size size from buf to file, duplicating - the interface of stdio's fwrite(), with size_t request and return types. If - the library defines size_t, then z_size_t is identical to size_t. If not, - then z_size_t is an unsigned integer type that can contain a pointer. - - gzfwrite() returns the number of full items written of size size, or zero - if there was an error. If the multiplication of size and nitems overflows, - i.e. the product does not fit in a z_size_t, then nothing is written, zero - is returned, and the error state is set to Z_STREAM_ERROR. -*/ - -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the arguments to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or a negative zlib error code in case - of error. The number of uncompressed bytes written is limited to 8191, or - one less than the buffer size given to gzbuffer(). The caller should assure - that this limit is not exceeded. If it is exceeded, then gzprintf() will - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf() - because the secure snprintf() or vsnprintf() functions were not available. - This can be determined using zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or a - newline character is read and transferred to buf, or an end-of-file - condition is encountered. If any characters are read or if len == 1, the - string is terminated with a null character. If no characters are read due - to an end-of-file or len < 1, then the buffer is left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read as the first character - on the next read. At least one character of push-back is allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter flush - is as in the deflate() function. The return value is the zlib error number - (see function gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatenated gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - - Returns the starting position for the next gzread or gzwrite on the given - compressed file. This position represents a number of bytes in the - uncompressed data stream, and is zero when starting, even if appending or - reading a gzip stream from the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - - Returns the current offset in the file being read or written. This offset - includes the count of bytes that precede the gzip stream, for example when - appending or when using gzdopen() for reading. When reading, the offset - does not include as yet unused buffered input. This information can be used - for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Returns true (1) if the end-of-file indicator has been set while reading, - false (0) otherwise. Note that the end-of-file indicator is set only if the - read tried to go past the end of the input, but came up short. Therefore, - just like feof(), gzeof() may return false even if there is no more data to - read, in the event that the last read request was for the exact number of - bytes remaining in the input file. This will happen if the input file size - is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Returns true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file and - deallocates the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the given - compressed file. errnum is set to zlib error number. If an error occurred - in the file system and not in the compression library, errnum is set to - Z_ERRNO and the application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is Z_NULL, this function returns the - required initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); -/* - Same as adler32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is Z_NULL, this function returns the required - initial value for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); -/* - Same as crc32(), but with a size_t length. -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#ifdef Z_PREFIX_SET -# define z_deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define z_inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define z_inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#else -# define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -# define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -# define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) -#endif - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - -#endif /* !Z_SOLO */ - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ --------------------------------------------------------------------------------- -END LICENSE FOR external/zlib/zlib.h --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/aws/LICENSE --------------------------------------------------------------------------------- - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/aws/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/aws-checksums/LICENSE --------------------------------------------------------------------------------- - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/aws-checksums/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/aws-c-event-stream/LICENSE --------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/aws-c-event-stream/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/aws-c-common/LICENSE --------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/aws-c-common/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/com_github_googlecloudplatform_google_cloud_cpp/LICENSE --------------------------------------------------------------------------------- - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/com_github_googlecloudplatform_google_cloud_cpp/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/com_github_grpc_grpc/LICENSE --------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --------------------------------------------------------------------------------- -END LICENSE FOR external/com_github_grpc_grpc/LICENSE --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -BEGIN LICENSE FOR external/com_github_grpc_grpc/third_party/address_sorting/LICENSE --------------------------------------------------------------------------------- -Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the project nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. --------------------------------------------------------------------------------- -END LICENSE FOR external/com_github_grpc_grpc/third_party/address_sorting/LICENSE --------------------------------------------------------------------------------- diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h deleted file mode 100755 index f550b690e..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h +++ /dev/null @@ -1,1591 +0,0 @@ -/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_C_API_H_ -#define TENSORFLOW_C_C_API_H_ - -#include -#include - -#include "tensorflow/c/tf_attrtype.h" -#include "tensorflow/c/tf_datatype.h" -#include "tensorflow/c/tf_status.h" -#include "tensorflow/c/tf_tensor.h" -#include "tensorflow/c/tf_tstring.h" - -// -------------------------------------------------------------------------- -// C API for TensorFlow. -// -// The API leans towards simplicity and uniformity instead of convenience -// since most usage will be by language specific wrappers. -// -// Conventions: -// * We use the prefix TF_ for everything in the API. -// * Objects are always passed around as pointers to opaque structs -// and these structs are allocated/deallocated via the API. -// * TF_Status holds error information. It is an object type -// and therefore is passed around as a pointer to an opaque -// struct as mentioned above. -// * Every call that has a TF_Status* argument clears it on success -// and fills it with error info on failure. -// * unsigned char is used for booleans (instead of the 'bool' type). -// In C++ bool is a keyword while in C99 bool is a macro defined -// in stdbool.h. It is possible for the two to be inconsistent. -// For example, neither the C99 nor the C++11 standard force a byte -// size on the bool type, so the macro defined in stdbool.h could -// be inconsistent with the bool keyword in C++. Thus, the use -// of stdbool.h is avoided and unsigned char is used instead. -// * size_t is used to represent byte sizes of objects that are -// materialized in the address space of the calling process. -// * int is used as an index into arrays. -// * Deletion functions are safe to call on nullptr. -// -// Questions left to address: -// * Might at some point need a way for callers to provide their own Env. -// * Maybe add TF_TensorShape that encapsulates dimension info. -// -// Design decisions made: -// * Backing store for tensor memory has an associated deallocation -// function. This deallocation function will point to client code -// for tensors populated by the client. So the client can do things -// like shadowing a numpy array. -// * We do not provide TF_OK since it is not strictly necessary and we -// are not optimizing for convenience. -// * We make assumption that one session has one graph. This should be -// fine since we have the ability to run sub-graphs. -// * We could allow NULL for some arguments (e.g., NULL options arg). -// However since convenience is not a primary goal, we don't do this. -// * Devices are not in this API. Instead, they are created/used internally -// and the API just provides high level controls over the number of -// devices of each type. - -// Macro to control visibility of exported symbols in the shared library (.so, -// .dylib, .dll). -// This duplicates the TF_EXPORT macro definition in -// tensorflow/core/platform/macros.h in order to keep this .h file independent -// of any other includes. -#ifdef SWIG -#define TF_CAPI_EXPORT -#else -#if defined(_WIN32) -#ifdef TF_COMPILE_LIBRARY -#define TF_CAPI_EXPORT __declspec(dllexport) -#else -#define TF_CAPI_EXPORT __declspec(dllimport) -#endif // TF_COMPILE_LIBRARY -#else -#define TF_CAPI_EXPORT __attribute__((visibility("default"))) -#endif // _WIN32 -#endif // SWIG - -#ifdef __cplusplus -extern "C" { -#endif - -// -------------------------------------------------------------------------- -// TF_Version returns a string describing version information of the -// TensorFlow library. TensorFlow using semantic versioning. -TF_CAPI_EXPORT extern const char* TF_Version(void); - -// -------------------------------------------------------------------------- -// TF_Buffer holds a pointer to a block of data and its associated length. -// Typically, the data consists of a serialized protocol buffer, but other data -// may also be held in a buffer. -// -// By default, TF_Buffer itself does not do any memory management of the -// pointed-to block. If need be, users of this struct should specify how to -// deallocate the block by setting the `data_deallocator` function pointer. -typedef struct TF_Buffer { - const void* data; - size_t length; - void (*data_deallocator)(void* data, size_t length); -} TF_Buffer; - -// Makes a copy of the input and sets an appropriate deallocator. Useful for -// passing in read-only, input protobufs. -TF_CAPI_EXPORT extern TF_Buffer* TF_NewBufferFromString(const void* proto, - size_t proto_len); - -// Useful for passing *out* a protobuf. -TF_CAPI_EXPORT extern TF_Buffer* TF_NewBuffer(void); - -TF_CAPI_EXPORT extern void TF_DeleteBuffer(TF_Buffer*); - -TF_CAPI_EXPORT extern TF_Buffer TF_GetBuffer(TF_Buffer* buffer); - -// -------------------------------------------------------------------------- -// Used to return strings across the C API. The caller does not take ownership -// of the underlying data pointer and is not responsible for freeing it. -typedef struct TF_StringView { - const char* data; - size_t len; -} TF_StringView; - -// -------------------------------------------------------------------------- -// TF_SessionOptions holds options that can be passed during session creation. -typedef struct TF_SessionOptions TF_SessionOptions; - -// Return a new options object. -TF_CAPI_EXPORT extern TF_SessionOptions* TF_NewSessionOptions(void); - -// Set the target in TF_SessionOptions.options. -// target can be empty, a single entry, or a comma separated list of entries. -// Each entry is in one of the following formats : -// "local" -// ip:port -// host:port -TF_CAPI_EXPORT extern void TF_SetTarget(TF_SessionOptions* options, - const char* target); - -// Set the config in TF_SessionOptions.options. -// config should be a serialized tensorflow.ConfigProto proto. -// If config was not parsed successfully as a ConfigProto, record the -// error information in *status. -TF_CAPI_EXPORT extern void TF_SetConfig(TF_SessionOptions* options, - const void* proto, size_t proto_len, - TF_Status* status); - -// Destroy an options object. -TF_CAPI_EXPORT extern void TF_DeleteSessionOptions(TF_SessionOptions*); - -// TODO(jeff,sanjay): -// - export functions to set Config fields - -// -------------------------------------------------------------------------- -// The new graph construction API, still under development. - -// Represents a computation graph. Graphs may be shared between sessions. -// Graphs are thread-safe when used as directed below. -typedef struct TF_Graph TF_Graph; - -// Return a new graph object. -TF_CAPI_EXPORT extern TF_Graph* TF_NewGraph(void); - -// Destroy an options object. Graph will be deleted once no more -// TFSession's are referencing it. -TF_CAPI_EXPORT extern void TF_DeleteGraph(TF_Graph*); - -// Operation being built. The underlying graph must outlive this. -typedef struct TF_OperationDescription TF_OperationDescription; - -// Operation that has been added to the graph. Valid until the graph is -// deleted -- in particular adding a new operation to the graph does not -// invalidate old TF_Operation* pointers. -typedef struct TF_Operation TF_Operation; - -// Represents a specific input of an operation. -typedef struct TF_Input { - TF_Operation* oper; - int index; // The index of the input within oper. -} TF_Input; - -// Represents a specific output of an operation. -typedef struct TF_Output { - TF_Operation* oper; - int index; // The index of the output within oper. -} TF_Output; - -// TF_Function is a grouping of operations with defined inputs and outputs. -// Once created and added to graphs, functions can be invoked by creating an -// operation whose operation type matches the function name. -typedef struct TF_Function TF_Function; - -// Function definition options. TODO(iga): Define and implement -typedef struct TF_FunctionOptions TF_FunctionOptions; - -// Sets the shape of the Tensor referenced by `output` in `graph` to -// the shape described by `dims` and `num_dims`. -// -// If the number of dimensions is unknown, `num_dims` must be set to -// -1 and `dims` can be null. If a dimension is unknown, the -// corresponding entry in the `dims` array must be -1. -// -// This does not overwrite the existing shape associated with `output`, -// but merges the input shape with the existing shape. For example, -// setting a shape of [-1, 2] with an existing shape [2, -1] would set -// a final shape of [2, 2] based on shape merging semantics. -// -// Returns an error into `status` if: -// * `output` is not in `graph`. -// * An invalid shape is being set (e.g., the shape being set -// is incompatible with the existing shape). -TF_CAPI_EXPORT extern void TF_GraphSetTensorShape(TF_Graph* graph, - TF_Output output, - const int64_t* dims, - const int num_dims, - TF_Status* status); - -// Returns the number of dimensions of the Tensor referenced by `output` -// in `graph`. -// -// If the number of dimensions in the shape is unknown, returns -1. -// -// Returns an error into `status` if: -// * `output` is not in `graph`. -TF_CAPI_EXPORT extern int TF_GraphGetTensorNumDims(TF_Graph* graph, - TF_Output output, - TF_Status* status); - -// Returns the shape of the Tensor referenced by `output` in `graph` -// into `dims`. `dims` must be an array large enough to hold `num_dims` -// entries (e.g., the return value of TF_GraphGetTensorNumDims). -// -// If the number of dimensions in the shape is unknown or the shape is -// a scalar, `dims` will remain untouched. Otherwise, each element of -// `dims` will be set corresponding to the size of the dimension. An -// unknown dimension is represented by `-1`. -// -// Returns an error into `status` if: -// * `output` is not in `graph`. -// * `num_dims` does not match the actual number of dimensions. -TF_CAPI_EXPORT extern void TF_GraphGetTensorShape(TF_Graph* graph, - TF_Output output, - int64_t* dims, int num_dims, - TF_Status* status); - -// Operation will only be added to *graph when TF_FinishOperation() is -// called (assuming TF_FinishOperation() does not return an error). -// *graph must not be deleted until after TF_FinishOperation() is -// called. -TF_CAPI_EXPORT extern TF_OperationDescription* TF_NewOperation( - TF_Graph* graph, const char* op_type, const char* oper_name); - -// Specify the device for `desc`. Defaults to empty, meaning unconstrained. -TF_CAPI_EXPORT extern void TF_SetDevice(TF_OperationDescription* desc, - const char* device); - -// The calls to TF_AddInput and TF_AddInputList must match (in number, -// order, and type) the op declaration. For example, the "Concat" op -// has registration: -// REGISTER_OP("Concat") -// .Input("concat_dim: int32") -// .Input("values: N * T") -// .Output("output: T") -// .Attr("N: int >= 2") -// .Attr("T: type"); -// that defines two inputs, "concat_dim" and "values" (in that order). -// You must use TF_AddInput() for the first input (since it takes a -// single tensor), and TF_AddInputList() for the second input (since -// it takes a list, even if you were to pass a list with a single -// tensor), as in: -// TF_OperationDescription* desc = TF_NewOperation(graph, "Concat", "c"); -// TF_Output concat_dim_input = {...}; -// TF_AddInput(desc, concat_dim_input); -// TF_Output values_inputs[5] = {{...}, ..., {...}}; -// TF_AddInputList(desc, values_inputs, 5); - -// For inputs that take a single tensor. -TF_CAPI_EXPORT extern void TF_AddInput(TF_OperationDescription* desc, - TF_Output input); - -// For inputs that take a list of tensors. -// inputs must point to TF_Output[num_inputs]. -TF_CAPI_EXPORT extern void TF_AddInputList(TF_OperationDescription* desc, - const TF_Output* inputs, - int num_inputs); - -// Call once per control input to `desc`. -TF_CAPI_EXPORT extern void TF_AddControlInput(TF_OperationDescription* desc, - TF_Operation* input); - -// Request that `desc` be co-located on the device where `op` -// is placed. -// -// Use of this is discouraged since the implementation of device placement is -// subject to change. Primarily intended for internal libraries -TF_CAPI_EXPORT extern void TF_ColocateWith(TF_OperationDescription* desc, - TF_Operation* op); - -// Call some TF_SetAttr*() function for every attr that is not -// inferred from an input and doesn't have a default value you wish to -// keep. - -// `value` must point to a string of length `length` bytes. -TF_CAPI_EXPORT extern void TF_SetAttrString(TF_OperationDescription* desc, - const char* attr_name, - const void* value, size_t length); -// `values` and `lengths` each must have lengths `num_values`. -// `values[i]` must point to a string of length `lengths[i]` bytes. -TF_CAPI_EXPORT extern void TF_SetAttrStringList(TF_OperationDescription* desc, - const char* attr_name, - const void* const* values, - const size_t* lengths, - int num_values); -TF_CAPI_EXPORT extern void TF_SetAttrInt(TF_OperationDescription* desc, - const char* attr_name, int64_t value); -TF_CAPI_EXPORT extern void TF_SetAttrIntList(TF_OperationDescription* desc, - const char* attr_name, - const int64_t* values, - int num_values); -TF_CAPI_EXPORT extern void TF_SetAttrFloat(TF_OperationDescription* desc, - const char* attr_name, float value); -TF_CAPI_EXPORT extern void TF_SetAttrFloatList(TF_OperationDescription* desc, - const char* attr_name, - const float* values, - int num_values); -TF_CAPI_EXPORT extern void TF_SetAttrBool(TF_OperationDescription* desc, - const char* attr_name, - unsigned char value); -TF_CAPI_EXPORT extern void TF_SetAttrBoolList(TF_OperationDescription* desc, - const char* attr_name, - const unsigned char* values, - int num_values); -TF_CAPI_EXPORT extern void TF_SetAttrType(TF_OperationDescription* desc, - const char* attr_name, - TF_DataType value); -TF_CAPI_EXPORT extern void TF_SetAttrTypeList(TF_OperationDescription* desc, - const char* attr_name, - const TF_DataType* values, - int num_values); -TF_CAPI_EXPORT extern void TF_SetAttrPlaceholder(TF_OperationDescription* desc, - const char* attr_name, - const char* placeholder); - -// Set a 'func' attribute to the specified name. -// `value` must point to a string of length `length` bytes. -TF_CAPI_EXPORT extern void TF_SetAttrFuncName(TF_OperationDescription* desc, - const char* attr_name, - const char* value, size_t length); - -// Set `num_dims` to -1 to represent "unknown rank". Otherwise, -// `dims` points to an array of length `num_dims`. `dims[i]` must be -// >= -1, with -1 meaning "unknown dimension". -TF_CAPI_EXPORT extern void TF_SetAttrShape(TF_OperationDescription* desc, - const char* attr_name, - const int64_t* dims, int num_dims); -// `dims` and `num_dims` must point to arrays of length `num_shapes`. -// Set `num_dims[i]` to -1 to represent "unknown rank". Otherwise, -// `dims[i]` points to an array of length `num_dims[i]`. `dims[i][j]` -// must be >= -1, with -1 meaning "unknown dimension". -TF_CAPI_EXPORT extern void TF_SetAttrShapeList(TF_OperationDescription* desc, - const char* attr_name, - const int64_t* const* dims, - const int* num_dims, - int num_shapes); -// `proto` must point to an array of `proto_len` bytes representing a -// binary-serialized TensorShapeProto. -TF_CAPI_EXPORT extern void TF_SetAttrTensorShapeProto( - TF_OperationDescription* desc, const char* attr_name, const void* proto, - size_t proto_len, TF_Status* status); -// `protos` and `proto_lens` must point to arrays of length `num_shapes`. -// `protos[i]` must point to an array of `proto_lens[i]` bytes -// representing a binary-serialized TensorShapeProto. -TF_CAPI_EXPORT extern void TF_SetAttrTensorShapeProtoList( - TF_OperationDescription* desc, const char* attr_name, - const void* const* protos, const size_t* proto_lens, int num_shapes, - TF_Status* status); - -TF_CAPI_EXPORT extern void TF_SetAttrTensor(TF_OperationDescription* desc, - const char* attr_name, - TF_Tensor* value, - TF_Status* status); -TF_CAPI_EXPORT extern void TF_SetAttrTensorList(TF_OperationDescription* desc, - const char* attr_name, - TF_Tensor* const* values, - int num_values, - TF_Status* status); - -// `proto` should point to a sequence of bytes of length `proto_len` -// representing a binary serialization of an AttrValue protocol -// buffer. -TF_CAPI_EXPORT extern void TF_SetAttrValueProto(TF_OperationDescription* desc, - const char* attr_name, - const void* proto, - size_t proto_len, - TF_Status* status); - -// If this function succeeds: -// * *status is set to an OK value, -// * a TF_Operation is added to the graph, -// * a non-null value pointing to the added operation is returned -- -// this value is valid until the underlying graph is deleted. -// Otherwise: -// * *status is set to a non-OK value, -// * the graph is not modified, -// * a null value is returned. -// In either case, it deletes `desc`. -TF_CAPI_EXPORT extern TF_Operation* TF_FinishOperation( - TF_OperationDescription* desc, TF_Status* status); - -// TF_Operation functions. Operations are immutable once created, so -// these are all query functions. - -TF_CAPI_EXPORT extern const char* TF_OperationName(TF_Operation* oper); -TF_CAPI_EXPORT extern const char* TF_OperationOpType(TF_Operation* oper); -TF_CAPI_EXPORT extern const char* TF_OperationDevice(TF_Operation* oper); - -TF_CAPI_EXPORT extern int TF_OperationNumOutputs(TF_Operation* oper); -TF_CAPI_EXPORT extern TF_DataType TF_OperationOutputType(TF_Output oper_out); -TF_CAPI_EXPORT extern int TF_OperationOutputListLength(TF_Operation* oper, - const char* arg_name, - TF_Status* status); - -TF_CAPI_EXPORT extern int TF_OperationNumInputs(TF_Operation* oper); -TF_CAPI_EXPORT extern TF_DataType TF_OperationInputType(TF_Input oper_in); -TF_CAPI_EXPORT extern int TF_OperationInputListLength(TF_Operation* oper, - const char* arg_name, - TF_Status* status); - -// In this code: -// TF_Output producer = TF_OperationInput(consumer); -// There is an edge from producer.oper's output (given by -// producer.index) to consumer.oper's input (given by consumer.index). -TF_CAPI_EXPORT extern TF_Output TF_OperationInput(TF_Input oper_in); - -// Get list of all inputs of a specific operation. `inputs` must point to -// an array of length at least `max_inputs` (ideally set to -// TF_OperationNumInputs(oper)). Beware that a concurrent -// modification of the graph can increase the number of inputs of -// an operation. -TF_CAPI_EXPORT extern void TF_OperationAllInputs(TF_Operation* oper, - TF_Output* inputs, - int max_inputs); - -// Get the number of current consumers of a specific output of an -// operation. Note that this number can change when new operations -// are added to the graph. -TF_CAPI_EXPORT extern int TF_OperationOutputNumConsumers(TF_Output oper_out); - -// Get list of all current consumers of a specific output of an -// operation. `consumers` must point to an array of length at least -// `max_consumers` (ideally set to -// TF_OperationOutputNumConsumers(oper_out)). Beware that a concurrent -// modification of the graph can increase the number of consumers of -// an operation. Returns the number of output consumers (should match -// TF_OperationOutputNumConsumers(oper_out)). -TF_CAPI_EXPORT extern int TF_OperationOutputConsumers(TF_Output oper_out, - TF_Input* consumers, - int max_consumers); - -// Get the number of control inputs to an operation. -TF_CAPI_EXPORT extern int TF_OperationNumControlInputs(TF_Operation* oper); - -// Get list of all control inputs to an operation. `control_inputs` must -// point to an array of length `max_control_inputs` (ideally set to -// TF_OperationNumControlInputs(oper)). Returns the number of control -// inputs (should match TF_OperationNumControlInputs(oper)). -TF_CAPI_EXPORT extern int TF_OperationGetControlInputs( - TF_Operation* oper, TF_Operation** control_inputs, int max_control_inputs); - -// Get the number of operations that have `*oper` as a control input. -// Note that this number can change when new operations are added to -// the graph. -TF_CAPI_EXPORT extern int TF_OperationNumControlOutputs(TF_Operation* oper); - -// Get the list of operations that have `*oper` as a control input. -// `control_outputs` must point to an array of length at least -// `max_control_outputs` (ideally set to -// TF_OperationNumControlOutputs(oper)). Beware that a concurrent -// modification of the graph can increase the number of control -// outputs. Returns the number of control outputs (should match -// TF_OperationNumControlOutputs(oper)). -TF_CAPI_EXPORT extern int TF_OperationGetControlOutputs( - TF_Operation* oper, TF_Operation** control_outputs, - int max_control_outputs); - -// TF_AttrMetadata describes the value of an attribute on an operation. -typedef struct TF_AttrMetadata { - // A boolean: 1 if the attribute value is a list, 0 otherwise. - unsigned char is_list; - - // Length of the list if is_list is true. Undefined otherwise. - int64_t list_size; - - // Type of elements of the list if is_list != 0. - // Type of the single value stored in the attribute if is_list == 0. - TF_AttrType type; - - // Total size the attribute value. - // The units of total_size depend on is_list and type. - // (1) If type == TF_ATTR_STRING and is_list == 0 - // then total_size is the byte size of the string - // valued attribute. - // (2) If type == TF_ATTR_STRING and is_list == 1 - // then total_size is the cumulative byte size - // of all the strings in the list. - // (3) If type == TF_ATTR_SHAPE and is_list == 0 - // then total_size is the number of dimensions - // of the shape valued attribute, or -1 - // if its rank is unknown. - // (4) If type == TF_ATTR_SHAPE and is_list == 1 - // then total_size is the cumulative number - // of dimensions of all shapes in the list. - // (5) Otherwise, total_size is undefined. - int64_t total_size; -} TF_AttrMetadata; - -// Returns metadata about the value of the attribute `attr_name` of `oper`. -TF_CAPI_EXPORT extern TF_AttrMetadata TF_OperationGetAttrMetadata( - TF_Operation* oper, const char* attr_name, TF_Status* status); - -// Fills in `value` with the value of the attribute `attr_name`. `value` must -// point to an array of length at least `max_length` (ideally set to -// TF_AttrMetadata.total_size from TF_OperationGetAttrMetadata(oper, -// attr_name)). -TF_CAPI_EXPORT extern void TF_OperationGetAttrString(TF_Operation* oper, - const char* attr_name, - void* value, - size_t max_length, - TF_Status* status); - -// Get the list of strings in the value of the attribute `attr_name`. Fills in -// `values` and `lengths`, each of which must point to an array of length at -// least `max_values`. -// -// The elements of values will point to addresses in `storage` which must be at -// least `storage_size` bytes in length. Ideally, max_values would be set to -// TF_AttrMetadata.list_size and `storage` would be at least -// TF_AttrMetadata.total_size, obtained from TF_OperationGetAttrMetadata(oper, -// attr_name). -// -// Fails if storage_size is too small to hold the requested number of strings. -TF_CAPI_EXPORT extern void TF_OperationGetAttrStringList( - TF_Operation* oper, const char* attr_name, void** values, size_t* lengths, - int max_values, void* storage, size_t storage_size, TF_Status* status); - -TF_CAPI_EXPORT extern void TF_OperationGetAttrInt(TF_Operation* oper, - const char* attr_name, - int64_t* value, - TF_Status* status); - -// Fills in `values` with the value of the attribute `attr_name` of `oper`. -// `values` must point to an array of length at least `max_values` (ideally set -// TF_AttrMetadata.list_size from TF_OperationGetAttrMetadata(oper, -// attr_name)). -TF_CAPI_EXPORT extern void TF_OperationGetAttrIntList(TF_Operation* oper, - const char* attr_name, - int64_t* values, - int max_values, - TF_Status* status); - -TF_CAPI_EXPORT extern void TF_OperationGetAttrFloat(TF_Operation* oper, - const char* attr_name, - float* value, - TF_Status* status); - -// Fills in `values` with the value of the attribute `attr_name` of `oper`. -// `values` must point to an array of length at least `max_values` (ideally set -// to TF_AttrMetadata.list_size from TF_OperationGetAttrMetadata(oper, -// attr_name)). -TF_CAPI_EXPORT extern void TF_OperationGetAttrFloatList(TF_Operation* oper, - const char* attr_name, - float* values, - int max_values, - TF_Status* status); - -TF_CAPI_EXPORT extern void TF_OperationGetAttrBool(TF_Operation* oper, - const char* attr_name, - unsigned char* value, - TF_Status* status); - -// Fills in `values` with the value of the attribute `attr_name` of `oper`. -// `values` must point to an array of length at least `max_values` (ideally set -// to TF_AttrMetadata.list_size from TF_OperationGetAttrMetadata(oper, -// attr_name)). -TF_CAPI_EXPORT extern void TF_OperationGetAttrBoolList(TF_Operation* oper, - const char* attr_name, - unsigned char* values, - int max_values, - TF_Status* status); - -TF_CAPI_EXPORT extern void TF_OperationGetAttrType(TF_Operation* oper, - const char* attr_name, - TF_DataType* value, - TF_Status* status); - -// Fills in `values` with the value of the attribute `attr_name` of `oper`. -// `values` must point to an array of length at least `max_values` (ideally set -// to TF_AttrMetadata.list_size from TF_OperationGetAttrMetadata(oper, -// attr_name)). -TF_CAPI_EXPORT extern void TF_OperationGetAttrTypeList(TF_Operation* oper, - const char* attr_name, - TF_DataType* values, - int max_values, - TF_Status* status); - -// Fills in `value` with the value of the attribute `attr_name` of `oper`. -// `values` must point to an array of length at least `num_dims` (ideally set to -// TF_Attr_Meta.size from TF_OperationGetAttrMetadata(oper, attr_name)). -TF_CAPI_EXPORT extern void TF_OperationGetAttrShape(TF_Operation* oper, - const char* attr_name, - int64_t* value, - int num_dims, - TF_Status* status); - -// Fills in `dims` with the list of shapes in the attribute `attr_name` of -// `oper` and `num_dims` with the corresponding number of dimensions. On return, -// for every i where `num_dims[i]` > 0, `dims[i]` will be an array of -// `num_dims[i]` elements. A value of -1 for `num_dims[i]` indicates that the -// i-th shape in the list is unknown. -// -// The elements of `dims` will point to addresses in `storage` which must be -// large enough to hold at least `storage_size` int64_ts. Ideally, `num_shapes` -// would be set to TF_AttrMetadata.list_size and `storage_size` would be set to -// TF_AttrMetadata.total_size from TF_OperationGetAttrMetadata(oper, -// attr_name). -// -// Fails if storage_size is insufficient to hold the requested shapes. -TF_CAPI_EXPORT extern void TF_OperationGetAttrShapeList( - TF_Operation* oper, const char* attr_name, int64_t** dims, int* num_dims, - int num_shapes, int64_t* storage, int storage_size, TF_Status* status); - -// Sets `value` to the binary-serialized TensorShapeProto of the value of -// `attr_name` attribute of `oper`'. -TF_CAPI_EXPORT extern void TF_OperationGetAttrTensorShapeProto( - TF_Operation* oper, const char* attr_name, TF_Buffer* value, - TF_Status* status); - -// Fills in `values` with binary-serialized TensorShapeProto values of the -// attribute `attr_name` of `oper`. `values` must point to an array of length at -// least `num_values` (ideally set to TF_AttrMetadata.list_size from -// TF_OperationGetAttrMetadata(oper, attr_name)). -TF_CAPI_EXPORT extern void TF_OperationGetAttrTensorShapeProtoList( - TF_Operation* oper, const char* attr_name, TF_Buffer** values, - int max_values, TF_Status* status); - -// Gets the TF_Tensor valued attribute of `attr_name` of `oper`. -// -// Allocates a new TF_Tensor which the caller is expected to take -// ownership of (and can deallocate using TF_DeleteTensor). -TF_CAPI_EXPORT extern void TF_OperationGetAttrTensor(TF_Operation* oper, - const char* attr_name, - TF_Tensor** value, - TF_Status* status); - -// Fills in `values` with the TF_Tensor values of the attribute `attr_name` of -// `oper`. `values` must point to an array of TF_Tensor* of length at least -// `max_values` (ideally set to TF_AttrMetadata.list_size from -// TF_OperationGetAttrMetadata(oper, attr_name)). -// -// The caller takes ownership of all the non-null TF_Tensor* entries in `values` -// (which can be deleted using TF_DeleteTensor(values[i])). -TF_CAPI_EXPORT extern void TF_OperationGetAttrTensorList(TF_Operation* oper, - const char* attr_name, - TF_Tensor** values, - int max_values, - TF_Status* status); - -// Sets `output_attr_value` to the binary-serialized AttrValue proto -// representation of the value of the `attr_name` attr of `oper`. -TF_CAPI_EXPORT extern void TF_OperationGetAttrValueProto( - TF_Operation* oper, const char* attr_name, TF_Buffer* output_attr_value, - TF_Status* status); - -// Returns the operation in the graph with `oper_name`. Returns nullptr if -// no operation found. -TF_CAPI_EXPORT extern TF_Operation* TF_GraphOperationByName( - TF_Graph* graph, const char* oper_name); - -// Iterate through the operations of a graph. To use: -// size_t pos = 0; -// TF_Operation* oper; -// while ((oper = TF_GraphNextOperation(graph, &pos)) != nullptr) { -// DoSomethingWithOperation(oper); -// } -TF_CAPI_EXPORT extern TF_Operation* TF_GraphNextOperation(TF_Graph* graph, - size_t* pos); - -// Write out a serialized representation of `graph` (as a GraphDef protocol -// message) to `output_graph_def` (allocated by TF_NewBuffer()). -// `output_graph_def`'s underlying buffer will be freed when TF_DeleteBuffer() -// is called. -// -// May fail on very large graphs in the future. -TF_CAPI_EXPORT extern void TF_GraphToGraphDef(TF_Graph* graph, - TF_Buffer* output_graph_def, - TF_Status* status); - -// Returns the serialized OpDef proto with name `op_name`, or a bad status if no -// such op exists. This can return OpDefs of functions copied into the graph. -TF_CAPI_EXPORT extern void TF_GraphGetOpDef(TF_Graph* graph, - const char* op_name, - TF_Buffer* output_op_def, - TF_Status* status); - -// Returns the serialized VersionDef proto for this graph. -TF_CAPI_EXPORT extern void TF_GraphVersions(TF_Graph* graph, - TF_Buffer* output_version_def, - TF_Status* status); - -// TF_ImportGraphDefOptions holds options that can be passed to -// TF_GraphImportGraphDef. -typedef struct TF_ImportGraphDefOptions TF_ImportGraphDefOptions; - -TF_CAPI_EXPORT extern TF_ImportGraphDefOptions* TF_NewImportGraphDefOptions( - void); -TF_CAPI_EXPORT extern void TF_DeleteImportGraphDefOptions( - TF_ImportGraphDefOptions* opts); - -// Set the prefix to be prepended to the names of nodes in `graph_def` that will -// be imported into `graph`. `prefix` is copied and has no lifetime -// requirements. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsSetPrefix( - TF_ImportGraphDefOptions* opts, const char* prefix); - -// Set the execution device for nodes in `graph_def`. -// Only applies to nodes where a device was not already explicitly specified. -// `device` is copied and has no lifetime requirements. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsSetDefaultDevice( - TF_ImportGraphDefOptions* opts, const char* device); - -// Set whether to uniquify imported operation names. If true, imported operation -// names will be modified if their name already exists in the graph. If false, -// conflicting names will be treated as an error. Note that this option has no -// effect if a prefix is set, since the prefix will guarantee all names are -// unique. Defaults to false. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsSetUniquifyNames( - TF_ImportGraphDefOptions* opts, unsigned char uniquify_names); - -// If true, the specified prefix will be modified if it already exists as an -// operation name or prefix in the graph. If false, a conflicting prefix will be -// treated as an error. This option has no effect if no prefix is specified. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsSetUniquifyPrefix( - TF_ImportGraphDefOptions* opts, unsigned char uniquify_prefix); - -// Set any imported nodes with input `src_name:src_index` to have that input -// replaced with `dst`. `src_name` refers to a node in the graph to be imported, -// `dst` references a node already existing in the graph being imported into. -// `src_name` is copied and has no lifetime requirements. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsAddInputMapping( - TF_ImportGraphDefOptions* opts, const char* src_name, int src_index, - TF_Output dst); - -// Set any imported nodes with control input `src_name` to have that input -// replaced with `dst`. `src_name` refers to a node in the graph to be imported, -// `dst` references an operation already existing in the graph being imported -// into. `src_name` is copied and has no lifetime requirements. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsRemapControlDependency( - TF_ImportGraphDefOptions* opts, const char* src_name, TF_Operation* dst); - -// Cause the imported graph to have a control dependency on `oper`. `oper` -// should exist in the graph being imported into. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsAddControlDependency( - TF_ImportGraphDefOptions* opts, TF_Operation* oper); - -// Add an output in `graph_def` to be returned via the `return_outputs` output -// parameter of TF_GraphImportGraphDef(). If the output is remapped via an input -// mapping, the corresponding existing tensor in `graph` will be returned. -// `oper_name` is copied and has no lifetime requirements. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsAddReturnOutput( - TF_ImportGraphDefOptions* opts, const char* oper_name, int index); - -// Returns the number of return outputs added via -// TF_ImportGraphDefOptionsAddReturnOutput(). -TF_CAPI_EXPORT extern int TF_ImportGraphDefOptionsNumReturnOutputs( - const TF_ImportGraphDefOptions* opts); - -// Add an operation in `graph_def` to be returned via the `return_opers` output -// parameter of TF_GraphImportGraphDef(). `oper_name` is copied and has no -// lifetime requirements. -TF_CAPI_EXPORT extern void TF_ImportGraphDefOptionsAddReturnOperation( - TF_ImportGraphDefOptions* opts, const char* oper_name); - -// Returns the number of return operations added via -// TF_ImportGraphDefOptionsAddReturnOperation(). -TF_CAPI_EXPORT extern int TF_ImportGraphDefOptionsNumReturnOperations( - const TF_ImportGraphDefOptions* opts); - -// TF_ImportGraphDefResults holds results that are generated by -// TF_GraphImportGraphDefWithResults(). -typedef struct TF_ImportGraphDefResults TF_ImportGraphDefResults; - -// Fetches the return outputs requested via -// TF_ImportGraphDefOptionsAddReturnOutput(). The number of fetched outputs is -// returned in `num_outputs`. The array of return outputs is returned in -// `outputs`. `*outputs` is owned by and has the lifetime of `results`. -TF_CAPI_EXPORT extern void TF_ImportGraphDefResultsReturnOutputs( - TF_ImportGraphDefResults* results, int* num_outputs, TF_Output** outputs); - -// Fetches the return operations requested via -// TF_ImportGraphDefOptionsAddReturnOperation(). The number of fetched -// operations is returned in `num_opers`. The array of return operations is -// returned in `opers`. `*opers` is owned by and has the lifetime of `results`. -TF_CAPI_EXPORT extern void TF_ImportGraphDefResultsReturnOperations( - TF_ImportGraphDefResults* results, int* num_opers, TF_Operation*** opers); - -// Fetches any input mappings requested via -// TF_ImportGraphDefOptionsAddInputMapping() that didn't appear in the GraphDef -// and weren't used as input to any node in the imported graph def. The number -// of fetched mappings is returned in `num_missing_unused_input_mappings`. The -// array of each mapping's source node name is returned in `src_names`, and the -// array of each mapping's source index is returned in `src_indexes`. -// -// `*src_names`, `*src_indexes`, and the memory backing each string in -// `src_names` are owned by and have the lifetime of `results`. -TF_CAPI_EXPORT extern void TF_ImportGraphDefResultsMissingUnusedInputMappings( - TF_ImportGraphDefResults* results, int* num_missing_unused_input_mappings, - const char*** src_names, int** src_indexes); - -// Deletes a results object returned by TF_GraphImportGraphDefWithResults(). -TF_CAPI_EXPORT extern void TF_DeleteImportGraphDefResults( - TF_ImportGraphDefResults* results); - -// Import the graph serialized in `graph_def` into `graph`. Returns nullptr and -// a bad status on error. Otherwise, returns a populated -// TF_ImportGraphDefResults instance. The returned instance must be deleted via -// TF_DeleteImportGraphDefResults(). -TF_CAPI_EXPORT extern TF_ImportGraphDefResults* -TF_GraphImportGraphDefWithResults(TF_Graph* graph, const TF_Buffer* graph_def, - const TF_ImportGraphDefOptions* options, - TF_Status* status); - -// Import the graph serialized in `graph_def` into `graph`. -// Convenience function for when only return outputs are needed. -// -// `num_return_outputs` must be the number of return outputs added (i.e. the -// result of TF_ImportGraphDefOptionsNumReturnOutputs()). If -// `num_return_outputs` is non-zero, `return_outputs` must be of length -// `num_return_outputs`. Otherwise it can be null. -TF_CAPI_EXPORT extern void TF_GraphImportGraphDefWithReturnOutputs( - TF_Graph* graph, const TF_Buffer* graph_def, - const TF_ImportGraphDefOptions* options, TF_Output* return_outputs, - int num_return_outputs, TF_Status* status); - -// Import the graph serialized in `graph_def` into `graph`. -// Convenience function for when no results are needed. -TF_CAPI_EXPORT extern void TF_GraphImportGraphDef( - TF_Graph* graph, const TF_Buffer* graph_def, - const TF_ImportGraphDefOptions* options, TF_Status* status); - -// Adds a copy of function `func` and optionally its gradient function `grad` -// to `g`. Once `func`/`grad` is added to `g`, it can be called by creating -// an operation using the function's name. -// Any changes to `func`/`grad` (including deleting it) done after this method -// returns, won't affect the copy of `func`/`grad` in `g`. -// If `func` or `grad` are already in `g`, TF_GraphCopyFunction has no -// effect on them, but can establish the function->gradient relationship -// between them if `func` does not already have a gradient. If `func` already -// has a gradient different from `grad`, an error is returned. -// -// `func` must not be null. -// If `grad` is null and `func` is not in `g`, `func` is added without a -// gradient. -// If `grad` is null and `func` is in `g`, TF_GraphCopyFunction is a noop. -// `grad` must have appropriate signature as described in the doc of -// GradientDef in tensorflow/core/framework/function.proto. -// -// If successful, status is set to OK and `func` and `grad` are added to `g`. -// Otherwise, status is set to the encountered error and `g` is unmodified. -TF_CAPI_EXPORT extern void TF_GraphCopyFunction(TF_Graph* g, - const TF_Function* func, - const TF_Function* grad, - TF_Status* status); - -// Returns the number of TF_Functions registered in `g`. -TF_CAPI_EXPORT extern int TF_GraphNumFunctions(TF_Graph* g); - -// Fills in `funcs` with the TF_Function* registered in `g`. -// `funcs` must point to an array of TF_Function* of length at least -// `max_func`. In usual usage, max_func should be set to the result of -// TF_GraphNumFunctions(g). In this case, all the functions registered in -// `g` will be returned. Else, an unspecified subset. -// -// If successful, returns the number of TF_Function* successfully set in -// `funcs` and sets status to OK. The caller takes ownership of -// all the returned TF_Functions. They must be deleted with TF_DeleteFunction. -// On error, returns 0, sets status to the encountered error, and the contents -// of funcs will be undefined. -TF_CAPI_EXPORT extern int TF_GraphGetFunctions(TF_Graph* g, TF_Function** funcs, - int max_func, TF_Status* status); - -// Note: The following function may fail on very large protos in the future. - -TF_CAPI_EXPORT extern void TF_OperationToNodeDef(TF_Operation* oper, - TF_Buffer* output_node_def, - TF_Status* status); - -typedef struct TF_WhileParams { - // The number of inputs to the while loop, i.e. the number of loop variables. - // This is the size of cond_inputs, body_inputs, and body_outputs. - const int ninputs; - - // The while condition graph. The inputs are the current values of the loop - // variables. The output should be a scalar boolean. - TF_Graph* const cond_graph; - const TF_Output* const cond_inputs; - TF_Output cond_output; - - // The loop body graph. The inputs are the current values of the loop - // variables. The outputs are the updated values of the loop variables. - TF_Graph* const body_graph; - const TF_Output* const body_inputs; - TF_Output* const body_outputs; - - // Unique null-terminated name for this while loop. This is used as a prefix - // for created operations. - const char* name; -} TF_WhileParams; - -// Creates a TF_WhileParams for creating a while loop in `g`. `inputs` are -// outputs that already exist in `g` used as initial values for the loop -// variables. -// -// The returned TF_WhileParams will have all fields initialized except -// `cond_output`, `body_outputs`, and `name`. The `body_outputs` buffer will be -// allocated to size `ninputs`. The caller should build `cond_graph` and -// `body_graph` starting from the inputs, and store the final outputs in -// `cond_output` and `body_outputs`. -// -// If `status` is OK, the caller must call either TF_FinishWhile or -// TF_AbortWhile on the returned TF_WhileParams. If `status` isn't OK, the -// returned TF_WhileParams is not valid, and the caller should not call -// TF_FinishWhile() or TF_AbortWhile(). -// -// Missing functionality (TODO): -// - Gradients -// - Reference-type inputs -// - Directly referencing external tensors from the cond/body graphs (this is -// possible in the Python API) -TF_CAPI_EXPORT extern TF_WhileParams TF_NewWhile(TF_Graph* g, TF_Output* inputs, - int ninputs, - TF_Status* status); - -// Builds the while loop specified by `params` and returns the output tensors of -// the while loop in `outputs`. `outputs` should be allocated to size -// `params.ninputs`. -// -// `params` is no longer valid once this returns. -// -// Either this or TF_AbortWhile() must be called after a successful -// TF_NewWhile() call. -TF_CAPI_EXPORT extern void TF_FinishWhile(const TF_WhileParams* params, - TF_Status* status, - TF_Output* outputs); - -// Frees `params`s resources without building a while loop. `params` is no -// longer valid after this returns. Either this or TF_FinishWhile() must be -// called after a successful TF_NewWhile() call. -TF_CAPI_EXPORT extern void TF_AbortWhile(const TF_WhileParams* params); - -// Adds operations to compute the partial derivatives of sum of `y`s w.r.t `x`s, -// i.e., d(y_1 + y_2 + ...)/dx_1, d(y_1 + y_2 + ...)/dx_2... -// -// `dx` are used as initial gradients (which represent the symbolic partial -// derivatives of some loss function `L` w.r.t. `y`). -// `dx` must be nullptr or have size `ny`. -// If `dx` is nullptr, the implementation will use dx of `OnesLike` for all -// shapes in `y`. -// The partial derivatives are returned in `dy`. `dy` should be allocated to -// size `nx`. -// -// Gradient nodes are automatically named under the "gradients/" prefix. To -// guarantee name uniqueness, subsequent calls to the same graph will -// append an incremental tag to the prefix: "gradients_1/", "gradients_2/", ... -// See TF_AddGradientsWithPrefix, which provides a means to specify a custom -// name prefix for operations added to a graph to compute the gradients. -// -// WARNING: This function does not yet support all the gradients that python -// supports. See -// https://www.tensorflow.org/code/tensorflow/cc/gradients/README.md -// for instructions on how to add C++ more gradients. -TF_CAPI_EXPORT void TF_AddGradients(TF_Graph* g, TF_Output* y, int ny, - TF_Output* x, int nx, TF_Output* dx, - TF_Status* status, TF_Output* dy); - -// Adds operations to compute the partial derivatives of sum of `y`s w.r.t `x`s, -// i.e., d(y_1 + y_2 + ...)/dx_1, d(y_1 + y_2 + ...)/dx_2... -// This is a variant of TF_AddGradients that allows to caller to pass a custom -// name prefix to the operations added to a graph to compute the gradients. -// -// `dx` are used as initial gradients (which represent the symbolic partial -// derivatives of some loss function `L` w.r.t. `y`). -// `dx` must be nullptr or have size `ny`. -// If `dx` is nullptr, the implementation will use dx of `OnesLike` for all -// shapes in `y`. -// The partial derivatives are returned in `dy`. `dy` should be allocated to -// size `nx`. -// `prefix` names the scope into which all gradients operations are being added. -// `prefix` must be unique within the provided graph otherwise this operation -// will fail. If `prefix` is nullptr, the default prefixing behaviour takes -// place, see TF_AddGradients for more details. -// -// WARNING: This function does not yet support all the gradients that python -// supports. See -// https://www.tensorflow.org/code/tensorflow/cc/gradients/README.md -// for instructions on how to add C++ more gradients. -TF_CAPI_EXPORT void TF_AddGradientsWithPrefix(TF_Graph* g, const char* prefix, - TF_Output* y, int ny, - TF_Output* x, int nx, - TF_Output* dx, TF_Status* status, - TF_Output* dy); - -// Create a TF_Function from a TF_Graph -// -// Params: -// fn_body - the graph whose operations (or subset of whose operations) will be -// converted to TF_Function. -// fn_name - the name of the new TF_Function. Should match the operation -// name (OpDef.name) regexp [A-Z][A-Za-z0-9_.\\-/]*. -// If `append_hash_to_fn_name` is false, `fn_name` must be distinct -// from other function and operation names (at least those -// registered in graphs where this function will be used). -// append_hash_to_fn_name - Must be 0 or 1. If set to 1, the actual name -// of the function will be `fn_name` appended with -// '_'. -// If set to 0, the function's name will be `fn_name`. -// num_opers - `num_opers` contains the number of elements in the `opers` array -// or a special value of -1 meaning that no array is given. -// The distinction between an empty array of operations and no -// array of operations is necessary to distinguish the case of -// creating a function with no body (e.g. identity or permutation) -// and the case of creating a function whose body contains all -// the nodes in the graph (except for the automatic skipping, see -// below). -// opers - Array of operations to become the body of the function or null. -// - If no array is given (`num_opers` = -1), all the -// operations in `fn_body` will become part of the function -// except operations referenced in `inputs`. These operations -// must have a single output (these operations are typically -// placeholders created for the sole purpose of representing -// an input. We can relax this constraint if there are -// compelling use cases). -// - If an array is given (`num_opers` >= 0), all operations -// in it will become part of the function. In particular, no -// automatic skipping of dummy input operations is performed. -// ninputs - number of elements in `inputs` array -// inputs - array of TF_Outputs that specify the inputs to the function. -// If `ninputs` is zero (the function takes no inputs), `inputs` -// can be null. The names used for function inputs are normalized -// names of the operations (usually placeholders) pointed to by -// `inputs`. These operation names should start with a letter. -// Normalization will convert all letters to lowercase and -// non-alphanumeric characters to '_' to make resulting names match -// the "[a-z][a-z0-9_]*" pattern for operation argument names. -// `inputs` cannot contain the same tensor twice. -// noutputs - number of elements in `outputs` array -// outputs - array of TF_Outputs that specify the outputs of the function. -// If `noutputs` is zero (the function returns no outputs), `outputs` -// can be null. `outputs` can contain the same tensor more than once. -// output_names - The names of the function's outputs. `output_names` array -// must either have the same length as `outputs` -// (i.e. `noutputs`) or be null. In the former case, -// the names should match the regular expression for ArgDef -// names - "[a-z][a-z0-9_]*". In the latter case, -// names for outputs will be generated automatically. -// opts - various options for the function, e.g. XLA's inlining control. -// description - optional human-readable description of this function. -// status - Set to OK on success and an appropriate error on failure. -// -// Note that when the same TF_Output is listed as both an input and an output, -// the corresponding function's output will equal to this input, -// instead of the original node's output. -// -// Callers must also satisfy the following constraints: -// - `inputs` cannot refer to TF_Outputs within a control flow context. For -// example, one cannot use the output of "switch" node as input. -// - `inputs` and `outputs` cannot have reference types. Reference types are -// not exposed through C API and are being replaced with Resources. We support -// reference types inside function's body to support legacy code. Do not -// use them in new code. -// - Every node in the function's body must have all of its inputs (including -// control inputs). In other words, for every node in the body, each input -// must be either listed in `inputs` or must come from another node in -// the body. In particular, it is an error to have a control edge going from -// a node outside of the body into a node in the body. This applies to control -// edges going from nodes referenced in `inputs` to nodes in the body when -// the former nodes are not in the body (automatically skipped or not -// included in explicitly specified body). -// -// Returns: -// On success, a newly created TF_Function instance. It must be deleted by -// calling TF_DeleteFunction. -// -// On failure, null. -TF_CAPI_EXPORT extern TF_Function* TF_GraphToFunction( - const TF_Graph* fn_body, const char* fn_name, - unsigned char append_hash_to_fn_name, int num_opers, - const TF_Operation* const* opers, int ninputs, const TF_Output* inputs, - int noutputs, const TF_Output* outputs, const char* const* output_names, - const TF_FunctionOptions* opts, const char* description, TF_Status* status); - -// Similar to TF_GraphToFunction but allows specifying control outputs of the -// function. -// -// The arguments of TF_GraphToFunction have the same meaning, but the new -// arguments are as follows: -// -// ncontrol_outputs: Number of control outputs of the function. -// control_outputs: vector of TF_Operation objects to be marked as control -// outputs of the function. Operations marked as control outputs are -// guaranteed to execute. -// control_output_names: Optional. If not nullptr, vector of strings, one -// per control output, with their names to be added to the function's -// OpDef. -TF_CAPI_EXPORT extern TF_Function* TF_GraphToFunctionWithControlOutputs( - const TF_Graph* fn_body, const char* fn_name, - unsigned char append_hash_to_fn_name, int num_opers, - const TF_Operation* const* opers, int ninputs, const TF_Output* inputs, - int noutputs, const TF_Output* outputs, const char* const* output_names, - int ncontrol_outputs, const TF_Operation* const* control_outputs, - const char* const* control_output_names, const TF_FunctionOptions* opts, - const char* description, TF_Status* status); - -// Returns the name of the graph function. -// The return value points to memory that is only usable until the next -// mutation to *func. -TF_CAPI_EXPORT extern const char* TF_FunctionName(TF_Function* func); - -// Write out a serialized representation of `func` (as a FunctionDef protocol -// message) to `output_func_def` (allocated by TF_NewBuffer()). -// `output_func_def`'s underlying buffer will be freed when TF_DeleteBuffer() -// is called. -// -// May fail on very large graphs in the future. -TF_CAPI_EXPORT extern void TF_FunctionToFunctionDef(TF_Function* func, - TF_Buffer* output_func_def, - TF_Status* status); - -// Construct and return the function whose FunctionDef representation is -// serialized in `proto`. `proto_len` must equal the number of bytes -// pointed to by `proto`. -// Returns: -// On success, a newly created TF_Function instance. It must be deleted by -// calling TF_DeleteFunction. -// -// On failure, null. -TF_CAPI_EXPORT extern TF_Function* TF_FunctionImportFunctionDef( - const void* proto, size_t proto_len, TF_Status* status); - -// Sets function attribute named `attr_name` to value stored in `proto`. -// If this attribute is already set to another value, it is overridden. -// `proto` should point to a sequence of bytes of length `proto_len` -// representing a binary serialization of an AttrValue protocol -// buffer. -TF_CAPI_EXPORT extern void TF_FunctionSetAttrValueProto(TF_Function* func, - const char* attr_name, - const void* proto, - size_t proto_len, - TF_Status* status); - -// Sets `output_attr_value` to the binary-serialized AttrValue proto -// representation of the value of the `attr_name` attr of `func`. -// If `attr_name` attribute is not present, status is set to an error. -TF_CAPI_EXPORT extern void TF_FunctionGetAttrValueProto( - TF_Function* func, const char* attr_name, TF_Buffer* output_attr_value, - TF_Status* status); - -// Frees the memory used by the `func` struct. -// TF_DeleteFunction is a noop if `func` is null. -// Deleting a function does not remove it from any graphs it was copied to. -TF_CAPI_EXPORT extern void TF_DeleteFunction(TF_Function* func); - -// Attempts to evaluate `output`. This will only be possible if `output` doesn't -// depend on any graph inputs (this function is safe to call if this isn't the -// case though). -// -// If the evaluation is successful, this function returns true and `output`s -// value is returned in `result`. Otherwise returns false. An error status is -// returned if something is wrong with the graph or input. Note that this may -// return false even if no error status is set. -TF_CAPI_EXPORT extern unsigned char TF_TryEvaluateConstant(TF_Graph* graph, - TF_Output output, - TF_Tensor** result, - TF_Status* status); - -// TODO(josh11b): Register OpDef, available to all operations added -// to this graph. - -// -------------------------------------------------------------------------- -// API for driving Graph execution. - -typedef struct TF_Session TF_Session; - -// Return a new execution session with the associated graph, or NULL on -// error. Does not take ownership of any input parameters. -// -// *`graph` must be a valid graph (not deleted or nullptr). `graph` will be be -// kept alive for the lifetime of the returned TF_Session. New nodes can still -// be added to `graph` after this call. -TF_CAPI_EXPORT extern TF_Session* TF_NewSession(TF_Graph* graph, - const TF_SessionOptions* opts, - TF_Status* status); - -// This function creates a new TF_Session (which is created on success) using -// `session_options`, and then initializes state (restoring tensors and other -// assets) using `run_options`. -// -// Any NULL and non-NULL value combinations for (`run_options, `meta_graph_def`) -// are valid. -// -// - `export_dir` must be set to the path of the exported SavedModel. -// - `tags` must include the set of tags used to identify one MetaGraphDef in -// the SavedModel. -// - `graph` must be a graph newly allocated with TF_NewGraph(). -// -// If successful, populates `graph` with the contents of the Graph and -// `meta_graph_def` with the MetaGraphDef of the loaded model. -TF_CAPI_EXPORT extern TF_Session* TF_LoadSessionFromSavedModel( - const TF_SessionOptions* session_options, const TF_Buffer* run_options, - const char* export_dir, const char* const* tags, int tags_len, - TF_Graph* graph, TF_Buffer* meta_graph_def, TF_Status* status); - -// Close a session. -// -// Contacts any other processes associated with the session, if applicable. -// May not be called after TF_DeleteSession(). -TF_CAPI_EXPORT extern void TF_CloseSession(TF_Session*, TF_Status* status); - -// Destroy a session object. -// -// Even if error information is recorded in *status, this call discards all -// local resources associated with the session. The session may not be used -// during or after this call (and the session drops its reference to the -// corresponding graph). -TF_CAPI_EXPORT extern void TF_DeleteSession(TF_Session*, TF_Status* status); - -// Run the graph associated with the session starting with the supplied inputs -// (inputs[0,ninputs-1] with corresponding values in input_values[0,ninputs-1]). -// -// Any NULL and non-NULL value combinations for (`run_options`, -// `run_metadata`) are valid. -// -// - `run_options` may be NULL, in which case it will be ignored; or -// non-NULL, in which case it must point to a `TF_Buffer` containing the -// serialized representation of a `RunOptions` protocol buffer. -// - `run_metadata` may be NULL, in which case it will be ignored; or -// non-NULL, in which case it must point to an empty, freshly allocated -// `TF_Buffer` that may be updated to contain the serialized representation -// of a `RunMetadata` protocol buffer. -// -// The caller retains ownership of `input_values` (which can be deleted using -// TF_DeleteTensor). The caller also retains ownership of `run_options` and/or -// `run_metadata` (when not NULL) and should manually call TF_DeleteBuffer on -// them. -// -// On success, the tensors corresponding to outputs[0,noutputs-1] are placed in -// output_values[]. Ownership of the elements of output_values[] is transferred -// to the caller, which must eventually call TF_DeleteTensor on them. -// -// On failure, output_values[] contains NULLs. -TF_CAPI_EXPORT extern void TF_SessionRun( - TF_Session* session, - // RunOptions - const TF_Buffer* run_options, - // Input tensors - const TF_Output* inputs, TF_Tensor* const* input_values, int ninputs, - // Output tensors - const TF_Output* outputs, TF_Tensor** output_values, int noutputs, - // Target operations - const TF_Operation* const* target_opers, int ntargets, - // RunMetadata - TF_Buffer* run_metadata, - // Output status - TF_Status*); - -// Set up the graph with the intended feeds (inputs) and fetches (outputs) for a -// sequence of partial run calls. -// -// On success, returns a handle that is used for subsequent PRun calls. The -// handle should be deleted with TF_DeletePRunHandle when it is no longer -// needed. -// -// On failure, out_status contains a tensorflow::Status with an error -// message. *handle is set to nullptr. -TF_CAPI_EXPORT extern void TF_SessionPRunSetup( - TF_Session*, - // Input names - const TF_Output* inputs, int ninputs, - // Output names - const TF_Output* outputs, int noutputs, - // Target operations - const TF_Operation* const* target_opers, int ntargets, - // Output handle - const char** handle, - // Output status - TF_Status*); - -// Continue to run the graph with additional feeds and fetches. The -// execution state is uniquely identified by the handle. -TF_CAPI_EXPORT extern void TF_SessionPRun( - TF_Session*, const char* handle, - // Input tensors - const TF_Output* inputs, TF_Tensor* const* input_values, int ninputs, - // Output tensors - const TF_Output* outputs, TF_Tensor** output_values, int noutputs, - // Target operations - const TF_Operation* const* target_opers, int ntargets, - // Output status - TF_Status*); - -// Deletes a handle allocated by TF_SessionPRunSetup. -// Once called, no more calls to TF_SessionPRun should be made. -TF_CAPI_EXPORT extern void TF_DeletePRunHandle(const char* handle); - -// -------------------------------------------------------------------------- -// The deprecated session API. Please switch to the above instead of -// TF_ExtendGraph(). This deprecated API can be removed at any time without -// notice. - -typedef struct TF_DeprecatedSession TF_DeprecatedSession; - -TF_CAPI_EXPORT extern TF_DeprecatedSession* TF_NewDeprecatedSession( - const TF_SessionOptions*, TF_Status* status); -TF_CAPI_EXPORT extern void TF_CloseDeprecatedSession(TF_DeprecatedSession*, - TF_Status* status); -TF_CAPI_EXPORT extern void TF_DeleteDeprecatedSession(TF_DeprecatedSession*, - TF_Status* status); -TF_CAPI_EXPORT extern void TF_Reset(const TF_SessionOptions* opt, - const char** containers, int ncontainers, - TF_Status* status); -// Treat the bytes proto[0,proto_len-1] as a serialized GraphDef and -// add the nodes in that GraphDef to the graph for the session. -// -// Prefer use of TF_Session and TF_GraphImportGraphDef over this. -TF_CAPI_EXPORT extern void TF_ExtendGraph(TF_DeprecatedSession*, - const void* proto, size_t proto_len, - TF_Status*); - -// See TF_SessionRun() above. -TF_CAPI_EXPORT extern void TF_Run(TF_DeprecatedSession*, - const TF_Buffer* run_options, - const char** input_names, TF_Tensor** inputs, - int ninputs, const char** output_names, - TF_Tensor** outputs, int noutputs, - const char** target_oper_names, int ntargets, - TF_Buffer* run_metadata, TF_Status*); - -// See TF_SessionPRunSetup() above. -TF_CAPI_EXPORT extern void TF_PRunSetup(TF_DeprecatedSession*, - const char** input_names, int ninputs, - const char** output_names, int noutputs, - const char** target_oper_names, - int ntargets, const char** handle, - TF_Status*); - -// See TF_SessionPRun above. -TF_CAPI_EXPORT extern void TF_PRun(TF_DeprecatedSession*, const char* handle, - const char** input_names, TF_Tensor** inputs, - int ninputs, const char** output_names, - TF_Tensor** outputs, int noutputs, - const char** target_oper_names, int ntargets, - TF_Status*); - -typedef struct TF_DeviceList TF_DeviceList; - -// Lists all devices in a TF_Session. -// -// Caller takes ownership of the returned TF_DeviceList* which must eventually -// be freed with a call to TF_DeleteDeviceList. -TF_CAPI_EXPORT extern TF_DeviceList* TF_SessionListDevices(TF_Session* session, - TF_Status* status); - -// Lists all devices in a TF_Session. -// -// Caller takes ownership of the returned TF_DeviceList* which must eventually -// be freed with a call to TF_DeleteDeviceList. -TF_CAPI_EXPORT extern TF_DeviceList* TF_DeprecatedSessionListDevices( - TF_DeprecatedSession* session, TF_Status* status); - -// Deallocates the device list. -TF_CAPI_EXPORT extern void TF_DeleteDeviceList(TF_DeviceList* list); - -// Counts the number of elements in the device list. -TF_CAPI_EXPORT extern int TF_DeviceListCount(const TF_DeviceList* list); - -// Retrieves the full name of the device (e.g. /job:worker/replica:0/...) -// The return value will be a pointer to a null terminated string. The caller -// must not modify or delete the string. It will be deallocated upon a call to -// TF_DeleteDeviceList. -// -// If index is out of bounds, an error code will be set in the status object, -// and a null pointer will be returned. -TF_CAPI_EXPORT extern const char* TF_DeviceListName(const TF_DeviceList* list, - int index, - TF_Status* status); - -// Retrieves the type of the device at the given index. -// -// The caller must not modify or delete the string. It will be deallocated upon -// a call to TF_DeleteDeviceList. -// -// If index is out of bounds, an error code will be set in the status object, -// and a null pointer will be returned. -TF_CAPI_EXPORT extern const char* TF_DeviceListType(const TF_DeviceList* list, - int index, - TF_Status* status); - -// Retrieve the amount of memory associated with a given device. -// -// If index is out of bounds, an error code will be set in the status object, -// and -1 will be returned. -TF_CAPI_EXPORT extern int64_t TF_DeviceListMemoryBytes( - const TF_DeviceList* list, int index, TF_Status* status); - -// Retrieve the incarnation number of a given device. -// -// If index is out of bounds, an error code will be set in the status object, -// and 0 will be returned. -TF_CAPI_EXPORT extern uint64_t TF_DeviceListIncarnation( - const TF_DeviceList* list, int index, TF_Status* status); - -// -------------------------------------------------------------------------- -// Load plugins containing custom ops and kernels - -// TF_Library holds information about dynamically loaded TensorFlow plugins. -typedef struct TF_Library TF_Library; - -// Load the library specified by library_filename and register the ops and -// kernels present in that library. -// -// Pass "library_filename" to a platform-specific mechanism for dynamically -// loading a library. The rules for determining the exact location of the -// library are platform-specific and are not documented here. -// -// On success, place OK in status and return the newly created library handle. -// The caller owns the library handle. -// -// On failure, place an error status in status and return NULL. -TF_CAPI_EXPORT extern TF_Library* TF_LoadLibrary(const char* library_filename, - TF_Status* status); - -// Get the OpList of OpDefs defined in the library pointed by lib_handle. -// -// Returns a TF_Buffer. The memory pointed to by the result is owned by -// lib_handle. The data in the buffer will be the serialized OpList proto for -// ops defined in the library. -TF_CAPI_EXPORT extern TF_Buffer TF_GetOpList(TF_Library* lib_handle); - -// Frees the memory associated with the library handle. -// Does NOT unload the library. -TF_CAPI_EXPORT extern void TF_DeleteLibraryHandle(TF_Library* lib_handle); - -// Get the OpList of all OpDefs defined in this address space. -// Returns a TF_Buffer, ownership of which is transferred to the caller -// (and can be freed using TF_DeleteBuffer). -// -// The data in the buffer will be the serialized OpList proto for ops registered -// in this address space. -TF_CAPI_EXPORT extern TF_Buffer* TF_GetAllOpList(void); - -// TF_ApiDefMap encapsulates a collection of API definitions for an operation. -// -// This object maps the name of a TensorFlow operation to a description of the -// API to generate for it, as defined by the ApiDef protocol buffer ( -// https://www.tensorflow.org/code/tensorflow/core/framework/api_def.proto) -// -// The ApiDef messages are typically used to generate convenience wrapper -// functions for TensorFlow operations in various language bindings. -typedef struct TF_ApiDefMap TF_ApiDefMap; - -// Creates a new TF_ApiDefMap instance. -// -// Params: -// op_list_buffer - TF_Buffer instance containing serialized OpList -// protocol buffer. (See -// https://www.tensorflow.org/code/tensorflow/core/framework/op_def.proto -// for the OpList proto definition). -// status - Set to OK on success and an appropriate error on failure. -TF_CAPI_EXPORT extern TF_ApiDefMap* TF_NewApiDefMap(TF_Buffer* op_list_buffer, - TF_Status* status); - -// Deallocates a TF_ApiDefMap. -TF_CAPI_EXPORT extern void TF_DeleteApiDefMap(TF_ApiDefMap* apimap); - -// Add ApiDefs to the map. -// -// `text` corresponds to a text representation of an ApiDefs protocol message. -// (https://www.tensorflow.org/code/tensorflow/core/framework/api_def.proto). -// -// The provided ApiDefs will be merged with existing ones in the map, with -// precedence given to the newly added version in case of conflicts with -// previous calls to TF_ApiDefMapPut. -TF_CAPI_EXPORT extern void TF_ApiDefMapPut(TF_ApiDefMap* api_def_map, - const char* text, size_t text_len, - TF_Status* status); - -// Returns a serialized ApiDef protocol buffer for the TensorFlow operation -// named `name`. -TF_CAPI_EXPORT extern TF_Buffer* TF_ApiDefMapGet(TF_ApiDefMap* api_def_map, - const char* name, - size_t name_len, - TF_Status* status); - -// -------------------------------------------------------------------------- -// Kernel definition information. - -// Returns a serialized KernelList protocol buffer containing KernelDefs for all -// registered kernels. -TF_CAPI_EXPORT extern TF_Buffer* TF_GetAllRegisteredKernels(TF_Status* status); - -// Returns a serialized KernelList protocol buffer containing KernelDefs for all -// kernels registered for the operation named `name`. -TF_CAPI_EXPORT extern TF_Buffer* TF_GetRegisteredKernelsForOp( - const char* name, TF_Status* status); - -// Update edge, switch input/ output in a node -TF_CAPI_EXPORT extern void TF_UpdateEdge(TF_Graph* graph, TF_Output new_src, - TF_Input dst, TF_Status* status); - -// -------------------------------------------------------------------------- -// In-process TensorFlow server functionality, for use in distributed training. -// A Server instance encapsulates a set of devices and a Session target that -// can participate in distributed training. A server belongs to a cluster -// (specified by a ClusterSpec), and corresponds to a particular task in a -// named job. The server can communicate with any other server in the same -// cluster. - -// In-process TensorFlow server. -typedef struct TF_Server TF_Server; - -// Creates a new in-process TensorFlow server configured using a serialized -// ServerDef protocol buffer provided via `proto` and `proto_len`. -// -// The server will not serve any requests until TF_ServerStart is invoked. -// The server will stop serving requests once TF_ServerStop or -// TF_DeleteServer is invoked. -TF_CAPI_EXPORT extern TF_Server* TF_NewServer(const void* proto, - size_t proto_len, - TF_Status* status); - -// Starts an in-process TensorFlow server. -TF_CAPI_EXPORT extern void TF_ServerStart(TF_Server* server, TF_Status* status); - -// Stops an in-process TensorFlow server. -TF_CAPI_EXPORT extern void TF_ServerStop(TF_Server* server, TF_Status* status); - -// Blocks until the server has been successfully stopped (via TF_ServerStop or -// TF_ServerClose). -TF_CAPI_EXPORT extern void TF_ServerJoin(TF_Server* server, TF_Status* status); - -// Returns the target string that can be provided to TF_SetTarget() to connect -// a TF_Session to `server`. -// -// The returned string is valid only until TF_DeleteServer is invoked. -TF_CAPI_EXPORT extern const char* TF_ServerTarget(TF_Server* server); - -// Destroy an in-process TensorFlow server, frees memory. If server is running -// it will be stopped and joined. -TF_CAPI_EXPORT extern void TF_DeleteServer(TF_Server* server); - -// Register a listener method that processes printed messages. -// -// If any listeners are registered, the print operator will call all listeners -// with the printed messages and immediately return without writing to the -// logs. -TF_CAPI_EXPORT extern void TF_RegisterLogListener( - void (*listener)(const char*)); - -// Register a FileSystem plugin from filename `plugin_filename`. -// -// On success, place OK in status. -// On failure, place an error status in status. -TF_CAPI_EXPORT extern void TF_RegisterFilesystemPlugin( - const char* plugin_filename, TF_Status* status); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif // TENSORFLOW_C_C_API_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_experimental.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_experimental.h deleted file mode 100755 index 90e074d23..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_experimental.h +++ /dev/null @@ -1,311 +0,0 @@ -/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_C_API_EXPERIMENTAL_H_ -#define TENSORFLOW_C_C_API_EXPERIMENTAL_H_ - -#include -#include - -#include "tensorflow/c/c_api.h" -#include "tensorflow/c/eager/c_api.h" - -// -------------------------------------------------------------------------- -// Experimental C API for TensorFlow. -// -// The API here is subject to changes in the future. -// -------------------------------------------------------------------------- - -// Macro to control visibility of exported symbols in the shared library (.so, -// .dylib, .dll). -// This duplicates the TF_EXPORT macro definition in -// tensorflow/core/platform/macros.h in order to keep this .h file independent -// of any other includes.$a -#ifdef SWIG -#define TF_CAPI_EXPORT -#else -#if defined(_WIN32) -#ifdef TF_COMPILE_LIBRARY -#define TF_CAPI_EXPORT __declspec(dllexport) -#else -#define TF_CAPI_EXPORT __declspec(dllimport) -#endif // TF_COMPILE_LIBRARY -#else -#define TF_CAPI_EXPORT __attribute__((visibility("default"))) -#endif // _WIN32 -#endif // SWIG - -#ifdef __cplusplus -extern "C" { -#endif - -// When `enable` is true, set -// tensorflow.ConfigProto.OptimizerOptions.global_jit_level to ON_1, and also -// set XLA flag values to prepare for XLA compilation. Otherwise set -// global_jit_level to OFF. -// -// This and the next API are syntax sugar over TF_SetConfig(), and is used by -// clients that cannot read/write the tensorflow.ConfigProto proto. -// TODO: Migrate to TF_CreateConfig() below. -TF_CAPI_EXPORT extern void TF_EnableXLACompilation(TF_SessionOptions* options, - unsigned char enable); - -// Set XLA's internal BuildXlaOpsPassFlags.tf_xla_enable_lazy_compilation to the -// value of 'enabled'. Also returns the original value of that flag. -// -// Use in tests to allow XLA to fallback to TF classic. This has global effect. -TF_CAPI_EXPORT unsigned char TF_SetXlaEnableLazyCompilation( - unsigned char enable); -TF_CAPI_EXPORT unsigned char TF_SetTfXlaCpuGlobalJit(unsigned char enable); - -// Sets XLA's auto jit mode according to the specified string, which is parsed -// as if passed in XLA_FLAGS. This has global effect. -TF_CAPI_EXPORT void TF_SetXlaAutoJitMode(const char* mode); - -// Sets XLA's minimum cluster size. This has global effect. -TF_CAPI_EXPORT void TF_SetXlaMinClusterSize(int size); - -// Gets/Sets TF/XLA flag for whether(true) or not(false) to disable constant -// folding. This is for testing to ensure that XLA is being tested rather than -// Tensorflow's CPU implementation through constant folding. -TF_CAPI_EXPORT unsigned char TF_GetXlaConstantFoldingDisabled(); -TF_CAPI_EXPORT void TF_SetXlaConstantFoldingDisabled( - unsigned char should_enable); - -// Create a serialized tensorflow.ConfigProto proto, where: -// -// a) ConfigProto.optimizer_options.global_jit_level is set to to ON_1 if -// `enable_xla_compilation` is non-zero, and OFF otherwise. -// b) ConfigProto.gpu_options.allow_growth is set to `gpu_memory_allow_growth`. -// c) ConfigProto.device_count is set to `num_cpu_devices`. -TF_CAPI_EXPORT extern TF_Buffer* TF_CreateConfig( - unsigned char enable_xla_compilation, unsigned char gpu_memory_allow_growth, - unsigned int num_cpu_devices); - -// Create a serialized tensorflow.RunOptions proto, where RunOptions.trace_level -// is set to FULL_TRACE if `enable_full_trace` is non-zero, and NO_TRACE -// otherwise. -TF_CAPI_EXPORT extern TF_Buffer* TF_CreateRunOptions( - unsigned char enable_full_trace); - -// Returns the graph content in a human-readable format, with length set in -// `len`. The format is subject to change in the future. -// The returned string is heap-allocated, and caller should call free() on it. -TF_CAPI_EXPORT extern const char* TF_GraphDebugString(TF_Graph* graph, - size_t* len); - -// Returns the function content in a human-readable format, with length set in -// `len`. The format is subject to change in the future. -// The returned string is heap-allocated, and caller should call free() on it. -// -// Do not return const char*, because some foreign language binding -// (e.g. swift) cannot then call free() on the returned pointer. -TF_CAPI_EXPORT extern char* TF_FunctionDebugString(TF_Function* func, - size_t* len); - -// On success, dequeues a tensor from a TF-managed FifoQueue given by -// `tensor_id`, associated with `session`. There must be a graph node named -// "fifo_queue_dequeue_", to be executed by this API call. - -// Caller must call TF_DeleteTensor() over the returned tensor. If the queue is -// empty, this call is blocked. -// -// Tensors are enqueued via the corresponding TF enqueue op. -// TODO(hongm): Add support for `timeout_ms`. -TF_CAPI_EXPORT extern TF_Tensor* TF_DequeueNamedTensor(TF_Session* session, - int tensor_id, - TF_Status* status); - -// On success, enqueues `tensor` into a TF-managed FifoQueue given by -// `tensor_id`, associated with `session`. There must be a graph node named -// "fifo_queue_enqueue_", to be executed by this API call. It reads -// from a placeholder node "arg_tensor_enqueue_". -// -// `tensor` is still owned by the caller. This call will be blocked if the queue -// has reached its capacity, and will be unblocked when the queued tensors again -// drop below the capacity due to dequeuing. -// -// Tensors are dequeued via the corresponding TF dequeue op. -// TODO(hongm): Add support for `timeout_ms`. -TF_CAPI_EXPORT extern void TF_EnqueueNamedTensor(TF_Session* session, - int tensor_id, - TF_Tensor* tensor, - TF_Status* status); -// Create a serialized tensorflow.ServerDef proto. -TF_Buffer* TFE_GetServerDef(const char* text_proto, TF_Status* status); - -TF_CAPI_EXPORT extern void TF_MakeInternalErrorStatus(TF_Status* status, - const char* errMsg); - -// TF_NewCheckpointReader() return the CheckpointReader that can be use to -// investigate or load the variable from the checkpoint file -typedef struct TF_CheckpointReader TF_CheckpointReader; -TF_CAPI_EXPORT extern TF_CheckpointReader* TF_NewCheckpointReader( - const char* filename, TF_Status* status); -TF_CAPI_EXPORT extern void TF_DeleteCheckpointReader( - TF_CheckpointReader* reader); -TF_CAPI_EXPORT extern int TF_CheckpointReaderHasTensor( - TF_CheckpointReader* reader, const char* name); -// Get the variable name at the given index -TF_CAPI_EXPORT extern const char* TF_CheckpointReaderGetVariable( - TF_CheckpointReader* reader, int index); -// Get the number of variable in the checkpoint -TF_CAPI_EXPORT extern int TF_CheckpointReaderSize(TF_CheckpointReader* reader); -// Get the DataType of a variable -TF_CAPI_EXPORT extern TF_DataType TF_CheckpointReaderGetVariableDataType( - TF_CheckpointReader* reader, const char* name); -// Read the shape of a variable and write to `dims` -TF_CAPI_EXPORT extern void TF_CheckpointReaderGetVariableShape( - TF_CheckpointReader* reader, const char* name, int64_t* dims, int num_dims, - TF_Status* status); -// Get the number of dimension of a variable -TF_CAPI_EXPORT extern int TF_CheckpointReaderGetVariableNumDims( - TF_CheckpointReader* reader, const char* name); -// Load the weight of a variable -TF_CAPI_EXPORT extern TF_Tensor* TF_CheckpointReaderGetTensor( - TF_CheckpointReader* reader, const char* name, TF_Status* status); - -// TF_NewAttrBuilder() returns an object that you can set attributes on as -// though it were an op. This allows querying properties of that op for -// type-checking purposes like if the op will run on a particular device type. -typedef struct TF_AttrBuilder TF_AttrBuilder; -TF_CAPI_EXPORT extern TF_AttrBuilder* TF_NewAttrBuilder(const char* op_name); -TF_CAPI_EXPORT extern void TF_DeleteAttrBuilder(TF_AttrBuilder* builder); -TF_CAPI_EXPORT extern void TF_AttrBuilderSetType(TF_AttrBuilder* builder, - const char* attr_name, - TF_DataType value); -TF_CAPI_EXPORT extern void TF_AttrBuilderSetTypeList(TF_AttrBuilder* builder, - const char* attr_name, - const TF_DataType* values, - int num_values); - -// Checks the tensorflow::NodeDef built via the methods above to see if it can -// run on device_type. -TF_CAPI_EXPORT extern void TF_AttrBuilderCheckCanRunOnDevice( - TF_AttrBuilder* builder, const char* device_type, TF_Status* status); - -// For argument number input_index, fetch the corresponding number_attr that -// needs to be updated with the argument length of the input list. -// Returns nullptr if there is any problem like op_name is not found, or the -// argument does not support this attribute type. -TF_CAPI_EXPORT extern const char* TF_GetNumberAttrForOpListInput( - const char* op_name, int input_index, TF_Status* status); - -// Returns 1 if the op is stateful, 0 otherwise. The return value is undefined -// if the status is not ok. -TF_CAPI_EXPORT extern int TF_OpIsStateful(const char* op_type, - TF_Status* status); - -// Platform specific initialization routine. Very few platforms actually require -// this to be called. -TF_CAPI_EXPORT void TF_InitMain(const char* usage, int* argc, char*** argv); - -// Platform-specific implementation to return an unused port. (This should used -// in tests only.) -TF_CAPI_EXPORT int TF_PickUnusedPortOrDie(void); - -// Fast path method that makes constructing a single scalar tensor require less -// overhead and copies. -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandleFromScalar( - TF_DataType data_type, void* data, size_t len, TF_Status* status); - -// Specify the server_def that enables collective ops. -// This is different to the above function in that it doesn't create remote -// contexts, and remotely executing ops is not possible. It just enables -// communication for collective ops. -TF_CAPI_EXPORT extern void TFE_EnableCollectiveOps(TFE_Context* ctx, - const void* proto, - size_t proto_len, - TF_Status* status); - -// Aborts all ongoing collectives with the specified status. After abortion, -// subsequent collectives will error with this status immediately. To reset the -// collectives, create a new EagerContext. -// -// This is intended to be used when a peer failure is detected. -TF_CAPI_EXPORT extern void TFE_AbortCollectiveOps(TFE_Context* ctx, - TF_Status* status); - -// Checks the health of collective ops peers. Explicit health check is needed in -// multi worker collective ops to detect failures in the cluster. If a peer is -// down, collective ops may hang. -TF_CAPI_EXPORT extern void TFE_CollectiveOpsCheckPeerHealth( - TFE_Context* ctx, const char* task, int64_t timeout_in_ms, - TF_Status* status); - -// Information about the shape of a Tensor and its type. -struct TF_ShapeAndType { - // Number of dimensions. -1 indicates unknown rank. - int num_dims; - // Array of dimensions. -1 indicates unknown dim. - int64_t* dims; - // The data type. May be 0 to denote unknown type. - TF_DataType dtype; -}; - -typedef struct TF_ShapeAndType TF_ShapeAndType; - -// A list of TF_ShapeAndType elements.. -struct TF_ShapeAndTypeList { - int num_items; - TF_ShapeAndType* items; -}; -typedef struct TF_ShapeAndTypeList TF_ShapeAndTypeList; - -// API for manipulating TF_ShapeAndTypeList objects. -// -TF_CAPI_EXPORT extern TF_ShapeAndTypeList* TF_NewShapeAndTypeList( - int num_shapes); -TF_CAPI_EXPORT extern void TF_ShapeAndTypeListSetShape( - TF_ShapeAndTypeList* shape_list, int index, const int64_t* dims, - int num_dims); -TF_CAPI_EXPORT extern void TF_ShapeAndTypeListSetUnknownShape( - TF_ShapeAndTypeList* shape_list, int index); -TF_CAPI_EXPORT extern void TF_ShapeAndTypeListSetDtype( - TF_ShapeAndTypeList* shape_list, int index, TF_DataType dtype); -TF_CAPI_EXPORT extern void TF_DeleteShapeAndTypeList( - TF_ShapeAndTypeList* shape_list); -TF_CAPI_EXPORT extern void TF_DeleteShapeAndTypeListArray( - TF_ShapeAndTypeList** shape_list_array, int num_items); - -// Infer shapes for the given `op`. The arguments mimic the arguments of the -// `shape_inference::InferenceContext` constructor. Note the following: -// - The inputs of the `op` are not used for shape inference. So, it is -// OK to not have the inputs properly set in `op`. See `input_tensors` -// if you want shape inference to consider the input tensors of the -// op for shape inference. -// - The types need not be set in `input_shapes` as it is not used. -// - The number of `input_tensors` should be the same as the number of items -// in `input_shapes`. -// -// The results are returned in `output_shapes` and -// `output_resource_shapes_and_types`. The caller is responsible for freeing the -// memory in these buffers by calling `TF_DeleteShapeAndTypeList`. -TF_CAPI_EXPORT extern void TFE_InferShapes( - TFE_Op* op, TF_ShapeAndTypeList* input_shapes, TF_Tensor** input_tensors, - TF_ShapeAndTypeList* input_tensor_as_shapes, - TF_ShapeAndTypeList** input_resource_shapes_and_types, - TF_ShapeAndTypeList** output_shapes, - TF_ShapeAndTypeList*** output_resource_shapes_and_types, TF_Status* status); - -TF_CAPI_EXPORT extern void -TF_ImportGraphDefOptionsSetValidateColocationConstraints( - TF_ImportGraphDefOptions* opts, unsigned char enable); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif // TENSORFLOW_C_C_API_EXPERIMENTAL_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_macros.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_macros.h deleted file mode 100755 index e0c91a0d5..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api_macros.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_C_API_MACROS_H_ -#define TENSORFLOW_C_C_API_MACROS_H_ - -#ifdef SWIG -#define TF_CAPI_EXPORT -#else -#if defined(_WIN32) -#ifdef TF_COMPILE_LIBRARY -#define TF_CAPI_EXPORT __declspec(dllexport) -#else -#define TF_CAPI_EXPORT __declspec(dllimport) -#endif // TF_COMPILE_LIBRARY -#else -#define TF_CAPI_EXPORT __attribute__((visibility("default"))) -#endif // _WIN32 -#endif // SWIG - -// TF_Bool is the C API typedef for unsigned char, while TF_BOOL is -// the datatype for boolean tensors. -#ifndef TF_Bool -#define TF_Bool unsigned char -#endif // TF_Bool - -// Macro used to calculate struct size for maintaining ABI stability across -// different struct implementations. -#ifndef TF_OFFSET_OF_END -#define TF_OFFSET_OF_END(TYPE, MEMBER) \ - (offsetof(TYPE, MEMBER) + sizeof(((TYPE *)0)->MEMBER)) -#endif // TF_OFFSET_OF_END - -#endif // TENSORFLOW_C_C_API_MACROS_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api.h deleted file mode 100755 index 0afb69bb8..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api.h +++ /dev/null @@ -1,466 +0,0 @@ -/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_EAGER_C_API_H_ -#define TENSORFLOW_C_EAGER_C_API_H_ - -// C API extensions to experiment with eager execution of kernels. -// WARNING: Unlike tensorflow/c/c_api.h, the API here is not guaranteed to be -// stable and can change without notice. - -#include "tensorflow/c/c_api.h" - -// Macro to control visibility of exported symbols in the shared library (.so, -// .dylib, .dll). -// This duplicates the TF_EXPORT macro definition in -// tensorflow/core/platform/macros.h in order to keep this .h file independent -// of any other includes.$a -#ifdef SWIG -#define TF_CAPI_EXPORT -#else -#if defined(_WIN32) -#ifdef TF_COMPILE_LIBRARY -#define TF_CAPI_EXPORT __declspec(dllexport) -#else -#define TF_CAPI_EXPORT __declspec(dllimport) -#endif // TF_COMPILE_LIBRARY -#else -#define TF_CAPI_EXPORT __attribute__((visibility("default"))) -#endif // _WIN32 -#endif // SWIG - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct TFE_ContextOptions TFE_ContextOptions; - -// Return a new options object. -TF_CAPI_EXPORT extern TFE_ContextOptions* TFE_NewContextOptions(void); - -// Set the config in TF_ContextOptions.options. -// config should be a serialized tensorflow.ConfigProto proto. -// If config was not parsed successfully as a ConfigProto, record the -// error information in *status. -TF_CAPI_EXPORT extern void TFE_ContextOptionsSetConfig( - TFE_ContextOptions* options, const void* proto, size_t proto_len, - TF_Status* status); - -// Controls how to act when we try to run an operation on a given device but -// some input tensors are not on that device. -// LINT.IfChange -// Note: Keep in sync with internal copy of enum in eager/context.h. -typedef enum TFE_ContextDevicePlacementPolicy { - // Running operations with input tensors on the wrong device will fail. - TFE_DEVICE_PLACEMENT_EXPLICIT = 0, - // Copy the tensor to the right device but log a warning. - TFE_DEVICE_PLACEMENT_WARN = 1, - // Silently copy the tensor, which has a performance cost since the operation - // will be blocked till the copy completes. This is the default placement - // policy. - TFE_DEVICE_PLACEMENT_SILENT = 2, - // Placement policy which silently copies int32 tensors but not other dtypes. - TFE_DEVICE_PLACEMENT_SILENT_FOR_INT32 = 3, -} TFE_ContextDevicePlacementPolicy; -// LINT.ThenChange(//tensorflow/c/eager/immediate_execution_context.h) - -// Sets the default execution mode (sync/async). Note that this can be -// overridden per thread using TFE_ContextSetExecutorForThread. -TF_CAPI_EXPORT extern void TFE_ContextOptionsSetAsync(TFE_ContextOptions*, - unsigned char enable); - -TF_CAPI_EXPORT extern void TFE_ContextOptionsSetDevicePlacementPolicy( - TFE_ContextOptions*, TFE_ContextDevicePlacementPolicy); - -// Destroy an options object. -TF_CAPI_EXPORT extern void TFE_DeleteContextOptions(TFE_ContextOptions*); - -// "Context" under which operations/functions are executed. It encapsulates -// things like the available devices, resource manager etc. -// TFE_Context must outlive all tensor handles created using it. In other -// words, TFE_DeleteContext() must be called after all tensor handles have -// been deleted (with TFE_DeleteTensorHandle). -// -// TODO(ashankar): Merge with TF_Session? -typedef struct TFE_Context TFE_Context; - -TF_CAPI_EXPORT extern TFE_Context* TFE_NewContext( - const TFE_ContextOptions* opts, TF_Status* status); -TF_CAPI_EXPORT extern void TFE_DeleteContext(TFE_Context* ctx); -TF_CAPI_EXPORT extern TF_DeviceList* TFE_ContextListDevices(TFE_Context* ctx, - TF_Status* status); - -// Clears the internal caches in the TFE context. Useful when reseeding random -// ops. -TF_CAPI_EXPORT extern void TFE_ContextClearCaches(TFE_Context* ctx); - -// Sets a thread-local device placement policy. After this call, other calls to -// TFE_Execute in the same thread will use the device policy specified here -// instead of the device policy used to construct the context. This has no -// effect on the device policy used by other program threads. -TF_CAPI_EXPORT extern void TFE_ContextSetThreadLocalDevicePlacementPolicy( - TFE_Context* ctx, TFE_ContextDevicePlacementPolicy policy); - -// Returns the device placement policy to be used by this context in the current -// thread. -TF_CAPI_EXPORT extern TFE_ContextDevicePlacementPolicy -TFE_ContextGetDevicePlacementPolicy(TFE_Context* ctx); - -// A tensorflow.ServerDef specifies remote workers (in addition to the current -// workers name). Operations created on this context can then be executed on -// any of these remote workers by setting an appropriate device. -// -// If the following is set, all servers identified by the -// ServerDef must be up when the context is created. -TF_CAPI_EXPORT extern void TFE_ContextSetServerDef(TFE_Context* ctx, - int keep_alive_secs, - const void* proto, - size_t proto_len, - TF_Status* status); - -// A handle to a tensor on a device. -// -// Like a TF_Tensor, a TFE_TensorHandle refers to a tensor with a value, shape, -// type etc. Unlike a TF_Tensor, a TFE_TensorHandle may refer to such tensors -// placed in memory of different devices or remote address spaces. -typedef struct TFE_TensorHandle TFE_TensorHandle; - -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandle(const TF_Tensor* t, - TF_Status* status); -// Indicates that the caller will not be using `h` any more. -TF_CAPI_EXPORT extern void TFE_DeleteTensorHandle(TFE_TensorHandle* h); -TF_CAPI_EXPORT extern TF_DataType TFE_TensorHandleDataType(TFE_TensorHandle* h); -// This function will block till the operation that produces `h` has completed. -TF_CAPI_EXPORT extern int TFE_TensorHandleNumDims(TFE_TensorHandle* h, - TF_Status* status); -TF_CAPI_EXPORT extern int64_t TFE_TensorHandleNumElements(TFE_TensorHandle* h, - TF_Status* status); -// This function will block till the operation that produces `h` has completed. -TF_CAPI_EXPORT extern int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, - int dim_index, - TF_Status* status); - -// Returns the device of the operation that produced `h`. If `h` was produced by -// a copy, returns the destination device of the copy. Note that the returned -// device name is not always the device holding the tensor handle's memory. If -// you want the latter, use TFE_TensorHandleBackingDeviceName. This function -// will block till the operation that produces `h` has completed. -TF_CAPI_EXPORT extern const char* TFE_TensorHandleDeviceName( - TFE_TensorHandle* h, TF_Status* status); - -// Returns the name of the device in whose memory `h` resides. -// -// This function will block till the operation that produces `h` has completed. -TF_CAPI_EXPORT extern const char* TFE_TensorHandleBackingDeviceName( - TFE_TensorHandle* h, TF_Status* status); - -// Return a pointer to a new TFE_TensorHandle that shares the underlying tensor -// with `h`. On success, `status` is set to OK. On failure, `status` reflects -// the error and a nullptr is returned. -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_TensorHandleCopySharingTensor( - TFE_TensorHandle* h, TF_Status* status); - -// This function will block till the operation that produces `h` has -// completed. The memory returned might alias the internal memory used by -// TensorFlow. Hence, callers should not mutate this memory (for example by -// modifying the memory region pointed to by TF_TensorData() on the returned -// TF_Tensor). -TF_CAPI_EXPORT extern TF_Tensor* TFE_TensorHandleResolve(TFE_TensorHandle* h, - TF_Status* status); - -// Create a new TFE_TensorHandle with the same contents as 'h' but placed -// in the memory of the device name 'device_name'. -// If source and destination are the same device, then this creates a new handle -// that shares the underlying buffer. Otherwise, it currently requires at least -// one of the source or destination devices to be CPU (i.e., for the source or -// destination tensor to be placed in host memory). -// If async execution is enabled, the copy may be enqueued and the call will -// return "non-ready" handle. Else, this function returns after the copy has -// been done. -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_TensorHandleCopyToDevice( - TFE_TensorHandle* h, TFE_Context* ctx, const char* device_name, - TF_Status* status); - -// Debugging/Profiling information for TFE_TensorHandle -// -// TFE_TensorDebugInfo contains information useful for debugging and -// profiling tensors. -typedef struct TFE_TensorDebugInfo TFE_TensorDebugInfo; - -// Retrieves TFE_TensorDebugInfo for `handle`. -// If TFE_TensorHandleTensorDebugInfo succeeds, `status` is set to OK and caller -// is responsible for deleting returned TFE_TensorDebugInfo. -// If TFE_TensorHandleTensorDebugInfo fails, `status` is set to appropriate -// error and nullptr is returned. This function can block till the operation -// that produces `handle` has completed. -TF_CAPI_EXPORT extern TFE_TensorDebugInfo* TFE_TensorHandleTensorDebugInfo( - TFE_TensorHandle* h, TF_Status* status); - -// Deletes `debug_info`. -TF_CAPI_EXPORT extern void TFE_DeleteTensorDebugInfo( - TFE_TensorDebugInfo* debug_info); - -// Returns the number of dimensions used to represent the tensor on its device. -// The number of dimensions used to represent the tensor on device can be -// different from the number returned by TFE_TensorHandleNumDims. -// The return value was current at the time of TFE_TensorDebugInfo creation. -TF_CAPI_EXPORT extern int TFE_TensorDebugInfoOnDeviceNumDims( - TFE_TensorDebugInfo* debug_info); - -// Returns the number of elements in dimension `dim_index`. -// Tensor representation on device can be transposed from its representation -// on host. The data contained in dimension `dim_index` on device -// can correspond to the data contained in another dimension in on-host -// representation. The dimensions are indexed using the standard TensorFlow -// major-to-minor order (slowest varying dimension first), -// not the XLA's minor-to-major order. -// On-device dimensions can be padded. TFE_TensorDebugInfoOnDeviceDim returns -// the number of elements in a dimension after padding. -// The return value was current at the time of TFE_TensorDebugInfo creation. -TF_CAPI_EXPORT extern int64_t TFE_TensorDebugInfoOnDeviceDim( - TFE_TensorDebugInfo* debug_info, int dim_index); - -// Description of the TensorFlow op to execute. -// -// Assumes that the provided 'ctx' outlives the returned TFE_Op, i.e., -// TFE_DeleteOp() is called before TFE_DeleteContext(). -// -// Very similar to TF_OperationDescription with some differences: -// (1) TF_Output or TFE_TensorHandle* as arguments to TF_AddInput, -// TF_AddInputList -// (2) TF_ColocateWith, TF_AddControlInput etc. do not make sense. -// (3) Implementation detail: Avoid use of NodeBuilder/NodeDefBuilder since -// the additional sanity checks there seem unnecessary; -typedef struct TFE_Op TFE_Op; - -TF_CAPI_EXPORT extern TFE_Op* TFE_NewOp(TFE_Context* ctx, - const char* op_or_function_name, - TF_Status* status); -TF_CAPI_EXPORT extern void TFE_DeleteOp(TFE_Op* op); - -// Returns the op or function name `op` will execute. -// -// The returned string remains valid throughout the lifetime of 'op'. -TF_CAPI_EXPORT extern const char* TFE_OpGetName(const TFE_Op* op, - TF_Status* status); -TF_CAPI_EXPORT extern TFE_Context* TFE_OpGetContext(const TFE_Op* op, - TF_Status* status); - -TF_CAPI_EXPORT extern void TFE_OpSetDevice(TFE_Op* op, const char* device_name, - TF_Status* status); -// The returned string remains valid throughout the lifetime of 'op'. -TF_CAPI_EXPORT extern const char* TFE_OpGetDevice(const TFE_Op* op, - TF_Status* status); - -TF_CAPI_EXPORT extern void TFE_OpAddInput(TFE_Op* op, TFE_TensorHandle* input, - TF_Status* status); - -TF_CAPI_EXPORT extern void TFE_OpAddInputList(TFE_Op* op, - TFE_TensorHandle** inputs, - int num_inputs, - TF_Status* status); - -// Fetches the current number of inputs attached to `op`. -// -// Does not use the operation's definition to determine how many inputs should -// be attached. It is intended for use with TFE_OpGetFlatInput to inspect an -// already-finalized operation. -// -// Note that TFE_OpGetFlatInputCount and TFE_OpGetFlatInput operate on a flat -// sequence of inputs, unlike TFE_OpGetInputLength (for getting the length of a -// particular named input list, which may only be part of the op's inputs). -TF_CAPI_EXPORT extern int TFE_OpGetFlatInputCount(const TFE_Op* op, - TF_Status* status); -// Returns a borrowed reference to one of `op`'s inputs. Use -// `TFE_TensorHandleCopySharingTensor` to make a new reference. -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_OpGetFlatInput(const TFE_Op* op, - int index, - TF_Status* status); - -TF_CAPI_EXPORT extern TF_AttrType TFE_OpGetAttrType(TFE_Op* op, - const char* attr_name, - unsigned char* is_list, - TF_Status* status); -// Get an attribute type given an op name; a fusion of TFE_NewOp and -// TFE_OpGetAttrType for use from Python without the overhead of the individual -// calls and memory management of TFE_Op. -TF_CAPI_EXPORT extern TF_AttrType TFE_OpNameGetAttrType( - TFE_Context* ctx, const char* op_or_function_name, const char* attr_name, - unsigned char* is_list, TF_Status* status); - -TF_CAPI_EXPORT extern void TFE_OpSetAttrString(TFE_Op* op, - const char* attr_name, - const void* value, - size_t length); -TF_CAPI_EXPORT extern void TFE_OpSetAttrInt(TFE_Op* op, const char* attr_name, - int64_t value); -TF_CAPI_EXPORT extern void TFE_OpSetAttrFloat(TFE_Op* op, const char* attr_name, - float value); -TF_CAPI_EXPORT extern void TFE_OpSetAttrBool(TFE_Op* op, const char* attr_name, - unsigned char value); -TF_CAPI_EXPORT extern void TFE_OpSetAttrType(TFE_Op* op, const char* attr_name, - TF_DataType value); -// If the number of dimensions is unknown, `num_dims` must be set to -// -1 and `dims` can be null. If a dimension is unknown, the -// corresponding entry in the `dims` array must be -1. -TF_CAPI_EXPORT extern void TFE_OpSetAttrShape(TFE_Op* op, const char* attr_name, - const int64_t* dims, - const int num_dims, - TF_Status* out_status); - -// Sets the attribute attr_name to be a function specified by 'function'. -// -// TODO(ashankar,iga): Add this functionality to the C API for graph -// construction. Perhaps we want an AttrValueMap equivalent in the C API? -TF_CAPI_EXPORT extern void TFE_OpSetAttrFunction(TFE_Op* op, - const char* attr_name, - const TFE_Op* value); - -TF_CAPI_EXPORT void TFE_OpSetAttrFunctionName(TFE_Op* op, const char* attr_name, - const char* data, size_t length); - -TF_CAPI_EXPORT extern void TFE_OpSetAttrTensor(TFE_Op* op, - const char* attr_name, - TF_Tensor* tensor, - TF_Status* status); - -TF_CAPI_EXPORT extern void TFE_OpSetAttrStringList(TFE_Op* op, - const char* attr_name, - const void* const* values, - const size_t* lengths, - int num_values); -TF_CAPI_EXPORT extern void TFE_OpSetAttrIntList(TFE_Op* op, - const char* attr_name, - const int64_t* values, - int num_values); -TF_CAPI_EXPORT extern void TFE_OpSetAttrFloatList(TFE_Op* op, - const char* attr_name, - const float* values, - int num_values); -TF_CAPI_EXPORT extern void TFE_OpSetAttrBoolList(TFE_Op* op, - const char* attr_name, - const unsigned char* values, - int num_values); -TF_CAPI_EXPORT extern void TFE_OpSetAttrTypeList(TFE_Op* op, - const char* attr_name, - const TF_DataType* values, - int num_values); -TF_CAPI_EXPORT extern void TFE_OpSetAttrShapeList( - TFE_Op* op, const char* attr_name, const int64_t** dims, - const int* num_dims, int num_values, TF_Status* out_status); -TF_CAPI_EXPORT extern void TFE_OpSetAttrFunctionList(TFE_Op* op, - const char* attr_name, - const TFE_Op** value, - int num_values); - -// Returns the length (number of tensors) of the input argument `input_name` -// found in the provided `op`. -TF_CAPI_EXPORT extern int TFE_OpGetInputLength(TFE_Op* op, - const char* input_name, - TF_Status* status); - -// Returns the length (number of tensors) of the output argument `output_name` -// found in the provided `op`. -TF_CAPI_EXPORT extern int TFE_OpGetOutputLength(TFE_Op* op, - const char* output_name, - TF_Status* status); - -// Execute the operation defined by 'op' and return handles to computed -// tensors in `retvals`. -// -// 'retvals' must point to a pre-allocated array of TFE_TensorHandle* and -// '*num_retvals' should be set to the size of this array. It is an error if -// the size of 'retvals' is less than the number of outputs. This call sets -// *num_retvals to the number of outputs. -// -// If async execution is enabled, the call may simply enqueue the execution -// and return "non-ready" handles in `retvals`. Note that any handles contained -// in 'op' should not be mutated till the kernel execution actually finishes. -// -// For sync execution, if any of the inputs to `op` are not ready, this call -// will block till they become ready and then return when the kernel execution -// is done. -// TODO(agarwal): change num_retvals to int from int*. -TF_CAPI_EXPORT extern void TFE_Execute(TFE_Op* op, TFE_TensorHandle** retvals, - int* num_retvals, TF_Status* status); - -// Add a function (serialized FunctionDef protocol buffer) to ctx so -// that it can be invoked using TFE_Execute. -TF_CAPI_EXPORT extern void TFE_ContextAddFunctionDef( - TFE_Context* ctx, const char* serialized_function_def, size_t size, - TF_Status* status); - -// Adds a function (created from TF_GraphToFunction or -// TF_FunctionImportFunctionDef) to the context, allowing it to be executed with -// TFE_Execute by creating an op with the same name as the function. -TF_CAPI_EXPORT extern void TFE_ContextAddFunction(TFE_Context* ctx, - TF_Function* function, - TF_Status* status); - -// Removes a function from the context. Once removed, you can no longer -// TFE_Execute it or TFE_Execute any TFE_Op which has it as an attribute or any -// other function which calls it as an attribute. -TF_CAPI_EXPORT extern void TFE_ContextRemoveFunction(TFE_Context* ctx, - const char* name, - TF_Status* status); - -// Checks whether a function is registered under `name`. -TF_CAPI_EXPORT unsigned char TFE_ContextHasFunction(TFE_Context* ctx, - const char* name); - -// Enables tracing of RunMetadata on the ops executed from this context. -TF_CAPI_EXPORT extern void TFE_ContextEnableRunMetadata(TFE_Context* ctx); - -// Disables tracing of RunMetadata on the ops executed from this context. -TF_CAPI_EXPORT extern void TFE_ContextDisableRunMetadata(TFE_Context* ctx); - -// Populates the passed-in buffer with a serialized RunMetadata protocol buffer -// containing any run metadata information accumulated so far and clears this -// information. -// If async mode is enabled, this call blocks till all currently pending ops are -// done. -TF_CAPI_EXPORT extern void TFE_ContextExportRunMetadata(TFE_Context* ctx, - TF_Buffer* buf, - TF_Status* status); - -// Some TF ops need a step container to be set to limit the lifetime of some -// resources (mostly TensorArray and Stack, used in while loop gradients in -// graph mode). Calling this on a context tells it to start a step. -TF_CAPI_EXPORT extern void TFE_ContextStartStep(TFE_Context* ctx); - -// Ends a step. When there is no active step (that is, every started step has -// been ended) step containers will be cleared. Note: it is not safe to call -// TFE_ContextEndStep while ops which rely on the step container may be running. -TF_CAPI_EXPORT extern void TFE_ContextEndStep(TFE_Context* ctx); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#ifdef __cplusplus -// A workaround to ease conversion to and from numpy objects and -// TFE_TensorHandle's. -// -// TODO(ashankar): Figure out an alternative scheme that precludes the need for -// these API-boundary breaking methods. -namespace tensorflow { -class Tensor; -} // namespace tensorflow - -TFE_TensorHandle* TFE_NewTensorHandle(const tensorflow::Tensor& t, - TF_Status* status); -#endif - -#endif // TENSORFLOW_C_EAGER_C_API_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api_experimental.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api_experimental.h deleted file mode 100755 index d0739a543..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/c_api_experimental.h +++ /dev/null @@ -1,568 +0,0 @@ -/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ -#ifndef TENSORFLOW_C_EAGER_C_API_EXPERIMENTAL_H_ -#define TENSORFLOW_C_EAGER_C_API_EXPERIMENTAL_H_ - -#include "tensorflow/c/c_api.h" -#include "tensorflow/c/eager/c_api.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Resets `op_to_reset` with `op_or_function_name` and `raw_device_name`. This -// is for performance optimization by reusing an exiting unused op rather than -// creating a new op every time. If `raw_device_name` is `NULL` or empty, it -// does not set the device name. If it's not `NULL`, then it attempts to parse -// and set the device name. It's effectively `TFE_OpSetDevice`, but it is faster -// than separately calling it because if the existing op has the same -// `raw_device_name`, it skips parsing and just leave as it is. -TF_CAPI_EXPORT extern void TFE_OpReset(TFE_Op* op_to_reset, - const char* op_or_function_name, - const char* raw_device_name, - TF_Status* status); - -// Enables only graph collection in RunMetadata on the functions executed from -// this context. -TF_CAPI_EXPORT extern void TFE_ContextEnableGraphCollection(TFE_Context* ctx); - -// Disables only graph collection in RunMetadata on the functions executed from -// this context. -TF_CAPI_EXPORT extern void TFE_ContextDisableGraphCollection(TFE_Context* ctx); - -// TODO(fishx): Move these monitoring APIs into a separate file. -// ----------------------------------------------------------------------------- -// Monitoring Counter APIs. -// These APIs de-templated monitoring Counter for swig. - -typedef struct TFE_MonitoringCounterCell TFE_MonitoringCounterCell; - -// Atomically increments the value of the cell. The value must be non-negative. -TF_CAPI_EXPORT extern void TFE_MonitoringCounterCellIncrementBy( - TFE_MonitoringCounterCell* cell, int64_t value); - -// Retrieves the current value of the cell. -TF_CAPI_EXPORT extern int64_t TFE_MonitoringCounterCellValue( - TFE_MonitoringCounterCell* cell); - -// APIs for Counter without label. -typedef struct TFE_MonitoringCounter0 TFE_MonitoringCounter0; -// Returns a new Counter metric object. The caller should manage lifetime of -// the object. Using duplicate metric name will crash the program with fatal -// error. -TF_CAPI_EXPORT extern TFE_MonitoringCounter0* TFE_MonitoringNewCounter0( - const char* name, TF_Status* status, const char* description); -// Deletes the Counter object. -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteCounter0( - TFE_MonitoringCounter0* counter); -// Retrieves the cell from the Counter object. The Counter object will manage -// lifetime of the cell. -TF_CAPI_EXPORT extern TFE_MonitoringCounterCell* TFE_MonitoringGetCellCounter0( - TFE_MonitoringCounter0* counter); - -// APIs for Counter with 1 label. -typedef struct TFE_MonitoringCounter1 TFE_MonitoringCounter1; -TF_CAPI_EXPORT extern TFE_MonitoringCounter1* TFE_MonitoringNewCounter1( - const char* name, TF_Status* status, const char* description, - const char* label1); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteCounter1( - TFE_MonitoringCounter1* counter); -TF_CAPI_EXPORT extern TFE_MonitoringCounterCell* TFE_MonitoringGetCellCounter1( - TFE_MonitoringCounter1* counter, const char* label1); - -// APIs for Counter with 2 labels. -typedef struct TFE_MonitoringCounter2 TFE_MonitoringCounter2; -TF_CAPI_EXPORT extern TFE_MonitoringCounter2* TFE_MonitoringNewCounter2( - const char* name, TF_Status* status, const char* description, - const char* label1, const char* label2); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteCounter2( - TFE_MonitoringCounter2* counter); -TF_CAPI_EXPORT extern TFE_MonitoringCounterCell* TFE_MonitoringGetCellCounter2( - TFE_MonitoringCounter2* counter, const char* label1, const char* label2); - -// ----------------------------------------------------------------------------- -// Monitoring Gauge APIs. -// These APIs de-templated monitoring Gauge for swig. - -typedef struct TFE_MonitoringIntGaugeCell TFE_MonitoringIntGaugeCell; - -// Atomically set the value of the cell. -TF_CAPI_EXPORT extern void TFE_MonitoringIntGaugeCellSet( - TFE_MonitoringIntGaugeCell* cell, int64_t value); - -// Retrieves the current value of the cell. -TF_CAPI_EXPORT extern int64_t TFE_MonitoringIntGaugeCellValue( - TFE_MonitoringIntGaugeCell* cell); - -// APIs for Int Gauge without label. -typedef struct TFE_MonitoringIntGauge0 TFE_MonitoringIntGauge0; -TF_CAPI_EXPORT extern TFE_MonitoringIntGauge0* TFE_MonitoringNewIntGauge0( - const char* name, TF_Status* out_status, const char* description); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteIntGauge0( - TFE_MonitoringIntGauge0* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringIntGaugeCell* -TFE_MonitoringGetCellIntGauge0(TFE_MonitoringIntGauge0* gauge); - -// APIs for Int Gauge with 1 label. -typedef struct TFE_MonitoringIntGauge1 TFE_MonitoringIntGauge1; -TF_CAPI_EXPORT extern TFE_MonitoringIntGauge1* TFE_MonitoringNewIntGauge1( - const char* name, TF_Status* out_status, const char* description, - const char* label1); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteIntGauge1( - TFE_MonitoringIntGauge1* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringIntGaugeCell* -TFE_MonitoringGetCellIntGauge1(TFE_MonitoringIntGauge1* gauge, - const char* label1); - -// APIs for Int Gauge with 2 label. -typedef struct TFE_MonitoringIntGauge2 TFE_MonitoringIntGauge2; -TF_CAPI_EXPORT extern TFE_MonitoringIntGauge2* TFE_MonitoringNewIntGauge2( - const char* name, TF_Status* out_status, const char* description, - const char* label1, const char* label2); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteIntGauge2( - TFE_MonitoringIntGauge2* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringIntGaugeCell* -TFE_MonitoringGetCellIntGauge2(TFE_MonitoringIntGauge2* gauge, - const char* label1, const char* label2); - -typedef struct TFE_MonitoringStringGaugeCell TFE_MonitoringStringGaugeCell; -TF_CAPI_EXPORT extern void TFE_MonitoringStringGaugeCellSet( - TFE_MonitoringStringGaugeCell* cell, const char* value); -// Retrieves the string value and saves it in buffer. -TF_CAPI_EXPORT extern const void TFE_MonitoringStringGaugeCellValue( - TFE_MonitoringStringGaugeCell* cell, TF_Buffer* buf); - -// APIs for String Gauge without label. -typedef struct TFE_MonitoringStringGauge0 TFE_MonitoringStringGauge0; -TF_CAPI_EXPORT extern TFE_MonitoringStringGauge0* TFE_MonitoringNewStringGauge0( - const char* name, TF_Status* out_status, const char* description); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteStringGauge0( - TFE_MonitoringStringGauge0* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringStringGaugeCell* -TFE_MonitoringGetCellStringGauge0(TFE_MonitoringStringGauge0* gauge); - -// APIs for String Gauge with 1 label. -typedef struct TFE_MonitoringStringGauge1 TFE_MonitoringStringGauge1; -TF_CAPI_EXPORT extern TFE_MonitoringStringGauge1* TFE_MonitoringNewStringGauge1( - const char* name, TF_Status* out_status, const char* description, - const char* label1); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteStringGauge1( - TFE_MonitoringStringGauge1* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringStringGaugeCell* -TFE_MonitoringGetCellStringGauge1(TFE_MonitoringStringGauge1* gauge, - const char* label1); - -// APIs for String Gauge with 2 label. -typedef struct TFE_MonitoringStringGauge2 TFE_MonitoringStringGauge2; -TF_CAPI_EXPORT extern TFE_MonitoringStringGauge2* TFE_MonitoringNewStringGauge2( - const char* name, TF_Status* out_status, const char* description, - const char* label1, const char* label2); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteStringGauge2( - TFE_MonitoringStringGauge2* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringStringGaugeCell* -TFE_MonitoringGetCellStringGauge2(TFE_MonitoringStringGauge2* gauge, - const char* label1, const char* label2); - -typedef struct TFE_MonitoringBoolGaugeCell TFE_MonitoringBoolGaugeCell; -TF_CAPI_EXPORT extern void TFE_MonitoringBoolGaugeCellSet( - TFE_MonitoringBoolGaugeCell* cell, bool value); -TF_CAPI_EXPORT extern bool TFE_MonitoringBoolGaugeCellValue( - TFE_MonitoringBoolGaugeCell* cell); - -// APIs for Bool Gauge without label. -typedef struct TFE_MonitoringBoolGauge0 TFE_MonitoringBoolGauge0; -TF_CAPI_EXPORT extern TFE_MonitoringBoolGauge0* TFE_MonitoringNewBoolGauge0( - const char* name, TF_Status* out_status, const char* description); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteBoolGauge0( - TFE_MonitoringBoolGauge0* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringBoolGaugeCell* -TFE_MonitoringGetCellBoolGauge0(TFE_MonitoringBoolGauge0* gauge); - -// APIs for Bool Gauge with 1 label. -typedef struct TFE_MonitoringBoolGauge1 TFE_MonitoringBoolGauge1; -TF_CAPI_EXPORT extern TFE_MonitoringBoolGauge1* TFE_MonitoringNewBoolGauge1( - const char* name, TF_Status* out_status, const char* description, - const char* label1); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteBoolGauge1( - TFE_MonitoringBoolGauge1* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringBoolGaugeCell* -TFE_MonitoringGetCellBoolGauge1(TFE_MonitoringBoolGauge1* gauge, - const char* label1); - -// APIs for Bool Gauge with 2 label. -typedef struct TFE_MonitoringBoolGauge2 TFE_MonitoringBoolGauge2; -TF_CAPI_EXPORT extern TFE_MonitoringBoolGauge2* TFE_MonitoringNewBoolGauge2( - const char* name, TF_Status* out_status, const char* description, - const char* label1, const char* label2); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteBoolGauge2( - TFE_MonitoringBoolGauge2* gauge); -TF_CAPI_EXPORT extern TFE_MonitoringBoolGaugeCell* -TFE_MonitoringGetCellBoolGauge2(TFE_MonitoringBoolGauge2* gauge, - const char* label1, const char* label2); - -// ----------------------------------------------------------------------------- -// Monitoring Sampler APIs. -// These APIs de-templated monitoring Sampler for swig. - -typedef struct TFE_MonitoringSamplerCell TFE_MonitoringSamplerCell; - -// Atomically add the value of the cell. -TF_CAPI_EXPORT extern void TFE_MonitoringSamplerCellAdd( - TFE_MonitoringSamplerCell* cell, double value); - -// Retrieves the current value of the cell. The return value is a HistogramProto -// saved in buffer. -TF_CAPI_EXPORT extern void TFE_MonitoringSamplerCellValue( - TFE_MonitoringSamplerCell* cell, TF_Buffer* buf); - -// APIs for sampler buckets -typedef struct TFE_MonitoringBuckets TFE_MonitoringBuckets; -TF_CAPI_EXPORT extern TFE_MonitoringBuckets* -TFE_MonitoringNewExponentialBuckets(double scale, double growth_factor, - int bucket_count); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteBuckets( - TFE_MonitoringBuckets* buckets); - -// APIs for Sampler without label. -typedef struct TFE_MonitoringSampler0 TFE_MonitoringSampler0; -TF_CAPI_EXPORT extern TFE_MonitoringSampler0* TFE_MonitoringNewSampler0( - const char* name, TFE_MonitoringBuckets* buckets, TF_Status* out_status, - const char* description); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteSampler0( - TFE_MonitoringSampler0* sampler); -TF_CAPI_EXPORT extern TFE_MonitoringSamplerCell* TFE_MonitoringGetCellSampler0( - TFE_MonitoringSampler0* sampler); - -// APIs for Sampler with 1 label. -typedef struct TFE_MonitoringSampler1 TFE_MonitoringSampler1; -TF_CAPI_EXPORT extern TFE_MonitoringSampler1* TFE_MonitoringNewSampler1( - const char* name, TFE_MonitoringBuckets* buckets, TF_Status* out_status, - const char* description, const char* label1); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteSampler1( - TFE_MonitoringSampler1* sampler); -TF_CAPI_EXPORT extern TFE_MonitoringSamplerCell* TFE_MonitoringGetCellSampler1( - TFE_MonitoringSampler1* sampler, const char* label1); - -// APIs for Sampler with 2 label. -typedef struct TFE_MonitoringSampler2 TFE_MonitoringSampler2; -TF_CAPI_EXPORT extern TFE_MonitoringSampler2* TFE_MonitoringNewSampler2( - const char* name, TFE_MonitoringBuckets* buckets, TF_Status* out_status, - const char* description, const char* label1, const char* label2); -TF_CAPI_EXPORT extern void TFE_MonitoringDeleteSampler2( - TFE_MonitoringSampler2* sampler); -TF_CAPI_EXPORT extern TFE_MonitoringSamplerCell* TFE_MonitoringGetCellSampler2( - TFE_MonitoringSampler2* sampler, const char* label1, const char* label2); - -// Sets whether to copy the remote inputs of a function lazily. -TF_CAPI_EXPORT extern void TFE_ContextOptionsSetLazyRemoteInputsCopy( - TFE_ContextOptions*, bool lazy_copy); - -// Sets whether to use TFRT -TF_CAPI_EXPORT extern void TFE_ContextOptionsSetTfrt(TFE_ContextOptions*, - bool use_tfrt); - -// Returns the context_id from the EagerContext which is used by the -// EagerService to maintain consistency between client and worker. The -// context_id is initialized with a dummy value and is later set when the worker -// is initialized (either locally or remotely). The context_id can change during -// the process lifetime although this should cause the worker to be -// reinitialized (e.g. cleared caches) as well. -TF_CAPI_EXPORT extern uint64_t TFE_GetContextId(TFE_Context* ctx); - -// ----------------------------------------------------------------------------- -// Cancellation APIs. - -typedef struct TFE_CancellationManager TFE_CancellationManager; -TF_CAPI_EXPORT extern TFE_CancellationManager* TFE_NewCancellationManager(); -TF_CAPI_EXPORT extern bool TFE_CancellationManagerIsCancelled( - TFE_CancellationManager*); -TF_CAPI_EXPORT extern void TFE_CancellationManagerStartCancel( - TFE_CancellationManager*); -TF_CAPI_EXPORT extern void TFE_DeleteCancellationManager( - TFE_CancellationManager*); - -// Associates the given `cancellation_manager` with `op`, so that invoking -// `TFE_CancellationManagerStartCancel(cancellation_manager)` will cancel the -// execution of `op`. -typedef struct TFE_CancellationManager TFE_CancellationManager; -TF_CAPI_EXPORT extern void TFE_OpSetCancellationManager( - TFE_Op* op, TFE_CancellationManager* cancellation_manager, - TF_Status* status); - -// ----------------------------------------------------------------------------- -// Eager Executor APIs. -typedef struct TFE_Executor TFE_Executor; - -// Creates a new eager Executor. Nodes in one executor are guaranteed to be -// executed in sequence. Assigning nodes to different executors allows executing -// nodes in parallel. -TF_CAPI_EXPORT extern TFE_Executor* TFE_NewExecutor(bool is_async); - -// Deletes the eager Executor without waiting for enqueued nodes. Please call -// TFE_ExecutorWaitForAllPendingNodes before calling this API if you want to -// make sure all nodes are finished. -TF_CAPI_EXPORT extern void TFE_DeleteExecutor(TFE_Executor*); - -// Returns true if the executor is in async mode. -TF_CAPI_EXPORT extern bool TFE_ExecutorIsAsync(TFE_Executor*); - -// Causes the calling thread to block till all ops dispatched in this executor -// have been executed. Note that "execution" here refers to kernel execution / -// scheduling of copies, etc. Similar to sync execution, it doesn't guarantee -// that lower level device queues (like GPU streams) have been flushed. -// -// This call may not block for execution of ops enqueued concurrently with this -// call. -TF_CAPI_EXPORT extern void TFE_ExecutorWaitForAllPendingNodes( - TFE_Executor*, TF_Status* status); - -// When an error happens, any pending operations are discarded and newly issued -// ops return an error. This call clears the error state and re-enables -// execution of newly issued ops. -// -// Note that outputs of discarded ops remain in a corrupt state and should not -// be used for future calls. -// TODO(agarwal): mark the affected handles and raise errors if they are used. -TF_CAPI_EXPORT extern void TFE_ExecutorClearError(TFE_Executor*); - -// Sets a custom Executor for current thread. All nodes created by this thread -// will be added to this Executor. It will override current executor. -TF_CAPI_EXPORT extern void TFE_ContextSetExecutorForThread(TFE_Context*, - TFE_Executor*); - -// Returns the Executor for current thread. -TF_CAPI_EXPORT extern TFE_Executor* TFE_ContextGetExecutorForThread( - TFE_Context*); - -// ----------------------------------------------------------------------------- -// Dynamic cluster API. - -// Update an existing context with a new set of servers defined in a ServerDef -// proto. Servers can be added to and removed from the list of remote workers -// in the context. New set of servers identified by the ServerDef must be up -// when the context is updated. -// -// This API is for experimental usage and may be subject to change. -TF_CAPI_EXPORT extern void TFE_ContextUpdateServerDef(TFE_Context* ctx, - int keep_alive_secs, - const void* proto, - size_t proto_len, - TF_Status* status); - -// Checks whether a remote worker is alive or not. This will return true even if -// the context doesn't exist on the remote worker. -TF_CAPI_EXPORT extern bool TFE_ContextCheckAlive(TFE_Context* ctx, - const char* worker_name, - TF_Status* status); - -// Sync pending nodes in local executors (including the context default executor -// and thread executors) and streaming requests to remote executors, and get the -// combined status. -TF_CAPI_EXPORT extern void TFE_ContextAsyncWait(TFE_Context* ctx, - TF_Status* status); - -// This function will block till the operation that produces `h` has -// completed. This is only valid on local TFE_TensorHandles. The pointer -// returned will be on the device in which the TFE_TensorHandle resides (so e.g. -// for a GPU tensor this will return a pointer to GPU memory). The pointer is -// only guaranteed to be valid until TFE_DeleteTensorHandle is called on this -// TensorHandle. Only supports POD data types. -TF_CAPI_EXPORT extern void* TFE_TensorHandleDevicePointer(TFE_TensorHandle*, - TF_Status*); - -// This function will block till the operation that produces `h` has -// completed. This is only valid on local TFE_TensorHandles. Returns the size in -// bytes of the memory pointed to by the device pointer returned above. -TF_CAPI_EXPORT extern size_t TFE_TensorHandleDeviceMemorySize(TFE_TensorHandle*, - TF_Status*); - -// Creates a new TensorHandle from memory residing in device_name. Takes -// ownership of the memory, and will call deleter to release it after TF -// no longer needs it or in case of error. -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandleFromDeviceMemory( - TFE_Context* ctx, const char* device_name, TF_DataType, const int64_t* dims, - int num_dims, void* data, size_t len, - void (*deallocator)(void* data, size_t len, void* arg), - void* deallocator_arg, TF_Status* status); - -// Retrieves the address space (i.e. job, replia, task) of the local host and -// saves it in the buffer. -TF_CAPI_EXPORT extern void TFE_HostAddressSpace(TFE_Context* ctx, - TF_Buffer* buf); - -// APIs for generically dealing with op attributes (e.g. when forwarding them -// through custom device implementations). -// -// TODO(allenl): Currently these are black boxes, but we should have some way to -// inspect values. This would let people e.g. copy over most attributes and then -// modify some based on their values. - -// A reference to an op's name -> attribute mapping -typedef struct TFE_OpAttrs TFE_OpAttrs; - -// Fetch a reference to `op`'s attributes. The returned reference is only valid -// while `op` is alive. -TF_CAPI_EXPORT extern const TFE_OpAttrs* TFE_OpGetAttrs(const TFE_Op* op); -// Add attributes in `attrs` to `op`. -// -// Does not overwrite or update existing attributes, but adds new ones. -TF_CAPI_EXPORT extern void TFE_OpAddAttrs(TFE_Op* op, const TFE_OpAttrs* attrs); - -// Serialize `attrs` as a tensorflow::NameAttrList protocol buffer (into `buf`), -// containing the op name and a map of its attributes. -TF_CAPI_EXPORT extern void TFE_OpAttrsSerialize(const TFE_OpAttrs* attrs, - TF_Buffer* buf, - TF_Status* status); - -// Set an op's attribute from a serialized AttrValue protocol buffer. -// -// Analogous to TF_SetAttrValueProto for building graph operations. -TF_CAPI_EXPORT extern void TFE_OpSetAttrValueProto(const TFE_Op* op, - const char* attr_name, - const void* proto, - size_t proto_len, - TF_Status* status); - -// TODO(b/166642410): It would be nice, for custom devices and for other users, -// to have a non-string representation of devices (TF_Device) extracted from -// tensors/ops/etc. and usable in APIs like OpSetDevice/ResetOp/etc. - -#define TFE_CUSTOM_DEVICE_VERSION 3 - -// Struct to be filled in -typedef struct TFE_CustomDevice { - int version = TFE_CUSTOM_DEVICE_VERSION; - // Method to copy a tensor to the custom device. - TFE_TensorHandle* (*copy_tensor_to_device)(TFE_Context* context, - TFE_TensorHandle* tensor, - TF_Status* status, - void* device_info) = nullptr; - - // Method to copy a tensor from the custom device to a target device. - TFE_TensorHandle* (*copy_tensor_from_device)(TFE_Context* context, - TFE_TensorHandle* tensor, - const char* target_device_name, - TF_Status* status, - void* device_info); - - // Method to execute an operation. - // - // Arguments provide enough information to reconstruct the original `TFE_Op`, - // or construct a transformed version, by inspecting the passed `op`. - // - // TFE_OpGetDevice(op) records the original placement of the operation. It may - // be an empty string if no device was explicitly requested, but will - // otherwise be the name of this custom device. Ops are placed onto a custom - // device if any of their inputs are on that custom device, but custom devices - // are free to set a bad status in order to require explicit placement. - void (*execute)(const TFE_Op* op, int* num_outputs, - TFE_TensorHandle** outputs, TF_Status* s, void* device_info); - - // Method to delete a device. - void (*delete_device)(void* device_info); -} TFE_CustomDevice; - -// Registers a custom device for use with eager execution. -// -// Eager operations may be placed on this device, e.g. `with -// tf.device("CUSTOM"):` from Python if `device_name` for this call is -// "/job:localhost/replica:0/task:0/device:CUSTOM:0". -// -// The custom device defines copy operations for moving TensorHandles on and -// off, and an an execution operation for named operations. Often execution will -// simply wrap op execution on one or more physical devices. -// -// device_info is an opaque caller-defined type stored with the custom device -// which is passed to the functions referenced in the TFE_CustomDevice struct -// `device` (execute, delete_device, etc.). It can for example contain the -// names of wrapped devices. -// -// There are currently no graph semantics implemented for registered custom -// devices, so executing tf.functions which contain operations placed on custom -// devices will fail. -// -// `device_name` must not name an existing physical or custom device. It must -// follow the format: -// -// /job:/replica:/task:/device:: -// -// If the device is successfully registered, `status` is set to TF_OK. Otherwise -// the device is not usable. In case of a bad status, `device.delete_device` is -// still called on `device_info` (i.e. the caller does not retain ownership). -// -// This API is highly experimental, and in particular is expected to change when -// it starts supporting operations with attributes and when tf.function support -// is added. -TF_CAPI_EXPORT extern void TFE_RegisterCustomDevice(TFE_Context* ctx, - TFE_CustomDevice device, - const char* device_name, - void* device_info, - TF_Status* status); - -TF_CAPI_EXPORT extern void TFE_ContextGetFunctionDef(TFE_Context* ctx, - const char* function_name, - TF_Buffer* buf, - TF_Status* status); - -// Allocate and return a new Tensor on the host. -// -// The caller must set the Tensor values by writing them to the pointer returned -// by TF_TensorData with length TF_TensorByteSize. -TF_CAPI_EXPORT extern TF_Tensor* TFE_AllocateHostTensor(TFE_Context* ctx, - TF_DataType dtype, - const int64_t* dims, - int num_dims, - TF_Status* status); - -// Given a Tensor, wrap it with a TensorHandle -// -// Similar to TFE_NewTensorHandle, but includes a pointer to the TFE_Context. -// The context should be identical to that of the Tensor. -TF_CAPI_EXPORT TFE_TensorHandle* TFE_NewTensorHandleFromTensor( - TFE_Context* ctx, TF_Tensor* t, TF_Status* status); - -// Create a packed TensorHandle with the given list of TensorHandles. -// If `handles` are on the same device, assign the same device to the packed -// handle; if `handles` are on different deivces, assign a CompositeDevice to -// it. -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_CreatePackedTensorHandle( - TFE_Context* ctx, TFE_TensorHandle** handles, int* num_handles, - TF_Status* status); - -// Configure soft device placement policy for the eager executor. Note this -// policy is applied to any subsequent op executions. -TF_CAPI_EXPORT void TFE_ContextSetSoftDevicePlacement(TFE_Context* ctx, - unsigned char enable, - TF_Status* status); - -// Configure device placement policy logging for the eager executor. Note this -// policy is applied to any subsequent op executions. -TF_CAPI_EXPORT void TFE_ContextSetLogDevicePlacement(TFE_Context* ctx, - unsigned char enable, - TF_Status* status); - -// Returns the device type of the operation that produced `h`. -TF_CAPI_EXPORT extern const char* TFE_TensorHandleDeviceType( - TFE_TensorHandle* h, TF_Status* status); - -// Returns the device ID of the operation that produced `h`. -TF_CAPI_EXPORT extern int TFE_TensorHandleDeviceID(TFE_TensorHandle* h, - TF_Status* status); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif // TENSORFLOW_C_EAGER_C_API_EXPERIMENTAL_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/dlpack.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/dlpack.h deleted file mode 100755 index 8c85dee62..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/eager/dlpack.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_EAGER_DLPACK_H_ -#define TENSORFLOW_C_EAGER_DLPACK_H_ - -#include "tensorflow/c/eager/c_api.h" - -namespace tensorflow { - -// PyCapsule name for DLPack Tensor -const char* const kDlTensorCapsuleName = "dltensor"; - -// Converts eager tensor handle to DLPack (DLManagedTensor*), and return the -// void* for further PyCapsule construction. -TF_CAPI_EXPORT extern void* TFE_HandleToDLPack(TFE_TensorHandle* h, - TF_Status* status); - -// Converts DLPack (DLManagedTensor*) to eager tensor handle. -TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_HandleFromDLPack(void* dlm, - TF_Status* status, - TFE_Context* ctx); - -// Calls the destructor of DLManagedTensor, used in the destructor of PyCapsule. -TF_CAPI_EXPORT extern void TFE_CallDLManagedTensorDeleter(void* dlm_ptr); -} // namespace tensorflow - -#endif // TENSORFLOW_C_EAGER_DLPACK_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tensor_interface.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tensor_interface.h deleted file mode 100755 index d165c8498..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tensor_interface.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_TENSOR_INTERFACE_H_ -#define TENSORFLOW_C_TENSOR_INTERFACE_H_ - -#include "tensorflow/core/framework/types.pb.h" -#include "tensorflow/core/platform/status.h" - -namespace tensorflow { - -// Abstract interface to a Tensor. -// -// This allows us to hide concrete implementations of Tensor from header -// files. The interface lists the common functionality that must be provided by -// any concrete implementation. However, in cases where the true concrete class -// is needed a static_cast can be applied. -class AbstractTensorInterface { - public: - // Release any underlying resources, including the interface object. - virtual void Release() = 0; - - // Returns tensor dtype. - virtual DataType Type() const = 0; - // Returns number of dimensions. - virtual int NumDims() const = 0; - // Returns size of specified dimension - virtual int64_t Dim(int dim_index) const = 0; - // Returns number of elements across all dimensions. - virtual int64_t NumElements() const = 0; - // Return size in bytes of the Tensor - virtual size_t ByteSize() const = 0; - // Returns a pointer to tensor data - virtual void* Data() const = 0; - - // Returns if the tensor is aligned - virtual bool IsAligned() const = 0; - // Returns if their is sole ownership of this Tensor and thus it can be moved. - virtual bool CanMove() const = 0; - - protected: - virtual ~AbstractTensorInterface() {} -}; - -namespace internal { -struct AbstractTensorInterfaceDeleter { - void operator()(AbstractTensorInterface* p) const { - if (p != nullptr) { - p->Release(); - } - } -}; -} // namespace internal - -using AbstractTensorPtr = - std::unique_ptr; - -} // namespace tensorflow - -#endif // TENSORFLOW_C_TENSOR_INTERFACE_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_attrtype.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_attrtype.h deleted file mode 100755 index 0c1545db2..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_attrtype.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ -#ifndef TENSORFLOW_C_TF_ATTRTYPE_H_ -#define TENSORFLOW_C_TF_ATTRTYPE_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -// TF_AttrType describes the type of the value of an attribute on an operation. -typedef enum TF_AttrType { - TF_ATTR_STRING = 0, - TF_ATTR_INT = 1, - TF_ATTR_FLOAT = 2, - TF_ATTR_BOOL = 3, - TF_ATTR_TYPE = 4, - TF_ATTR_SHAPE = 5, - TF_ATTR_TENSOR = 6, - TF_ATTR_PLACEHOLDER = 7, - TF_ATTR_FUNC = 8, -} TF_AttrType; - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif // TENSORFLOW_C_TF_ATTRTYPE_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_datatype.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_datatype.h deleted file mode 100755 index 3e6121bf9..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_datatype.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_TF_DATATYPE_H_ -#define TENSORFLOW_C_TF_DATATYPE_H_ - -#include - -// Macro to control visibility of exported symbols in the shared library (.so, -// .dylib, .dll). -// This duplicates the TF_EXPORT macro definition in -// tensorflow/core/platform/macros.h in order to keep this .h file independent -// of any other includes. -#ifdef SWIG -#define TF_CAPI_EXPORT -#else -#if defined(_WIN32) -#ifdef TF_COMPILE_LIBRARY -#define TF_CAPI_EXPORT __declspec(dllexport) -#else -#define TF_CAPI_EXPORT __declspec(dllimport) -#endif // TF_COMPILE_LIBRARY -#else -#define TF_CAPI_EXPORT __attribute__((visibility("default"))) -#endif // _WIN32 -#endif // SWIG - -#ifdef __cplusplus -extern "C" { -#endif - -// -------------------------------------------------------------------------- -// TF_DataType holds the type for a scalar value. E.g., one slot in a tensor. -// The enum values here are identical to corresponding values in types.proto. -typedef enum TF_DataType { - TF_FLOAT = 1, - TF_DOUBLE = 2, - TF_INT32 = 3, // Int32 tensors are always in 'host' memory. - TF_UINT8 = 4, - TF_INT16 = 5, - TF_INT8 = 6, - TF_STRING = 7, - TF_COMPLEX64 = 8, // Single-precision complex - TF_COMPLEX = 8, // Old identifier kept for API backwards compatibility - TF_INT64 = 9, - TF_BOOL = 10, - TF_QINT8 = 11, // Quantized int8 - TF_QUINT8 = 12, // Quantized uint8 - TF_QINT32 = 13, // Quantized int32 - TF_BFLOAT16 = 14, // Float32 truncated to 16 bits. Only for cast ops. - TF_QINT16 = 15, // Quantized int16 - TF_QUINT16 = 16, // Quantized uint16 - TF_UINT16 = 17, - TF_COMPLEX128 = 18, // Double-precision complex - TF_HALF = 19, - TF_RESOURCE = 20, - TF_VARIANT = 21, - TF_UINT32 = 22, - TF_UINT64 = 23, -} TF_DataType; - -// TF_DataTypeSize returns the sizeof() for the underlying type corresponding -// to the given TF_DataType enum value. Returns 0 for variable length types -// (eg. TF_STRING) or on failure. -TF_CAPI_EXPORT extern size_t TF_DataTypeSize(TF_DataType dt); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif // TENSORFLOW_C_TF_DATATYPE_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_file_statistics.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_file_statistics.h deleted file mode 100755 index bbf23831f..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_file_statistics.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_TF_FILE_STATISTICS_H_ -#define TENSORFLOW_C_TF_FILE_STATISTICS_H_ - -#include - -typedef struct TF_FileStatistics { - // The length of the file in bytes. - int64_t length; - // The last modified time in nanoseconds. - int64_t mtime_nsec; - // Whether the name refers to a directory. - bool is_directory; -} TF_FileStatistics; - -// TODO(mihaimaruseac): `tensorflow::FileStatistics` from -// `core/platform/file_statistics.h` is a duplicate of this so maybe try to -// remove duplication later? - -#endif // TENSORFLOW_C_TF_FILE_STATISTICS_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_status.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_status.h deleted file mode 100755 index 614f660ea..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_status.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_TF_STATUS_H_ -#define TENSORFLOW_C_TF_STATUS_H_ - -#ifdef SWIG -#define TF_CAPI_EXPORT -#else -#if defined(_WIN32) -#ifdef TF_COMPILE_LIBRARY -#define TF_CAPI_EXPORT __declspec(dllexport) -#else -#define TF_CAPI_EXPORT __declspec(dllimport) -#endif // TF_COMPILE_LIBRARY -#else -#define TF_CAPI_EXPORT __attribute__((visibility("default"))) -#endif // _WIN32 -#endif // SWIG - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct TF_Status TF_Status; - -// -------------------------------------------------------------------------- -// TF_Code holds an error code. The enum values here are identical to -// corresponding values in error_codes.proto. -typedef enum TF_Code { - TF_OK = 0, - TF_CANCELLED = 1, - TF_UNKNOWN = 2, - TF_INVALID_ARGUMENT = 3, - TF_DEADLINE_EXCEEDED = 4, - TF_NOT_FOUND = 5, - TF_ALREADY_EXISTS = 6, - TF_PERMISSION_DENIED = 7, - TF_UNAUTHENTICATED = 16, - TF_RESOURCE_EXHAUSTED = 8, - TF_FAILED_PRECONDITION = 9, - TF_ABORTED = 10, - TF_OUT_OF_RANGE = 11, - TF_UNIMPLEMENTED = 12, - TF_INTERNAL = 13, - TF_UNAVAILABLE = 14, - TF_DATA_LOSS = 15, -} TF_Code; - -// -------------------------------------------------------------------------- - -// Return a new status object. -TF_CAPI_EXPORT extern TF_Status* TF_NewStatus(void); - -// Delete a previously created status object. -TF_CAPI_EXPORT extern void TF_DeleteStatus(TF_Status*); - -// Record in *s. Any previous information is lost. -// A common use is to clear a status: TF_SetStatus(s, TF_OK, ""); -TF_CAPI_EXPORT extern void TF_SetStatus(TF_Status* s, TF_Code code, - const char* msg); - -// Convert from an I/O error code (e.g., errno) to a TF_Status value. -// Any previous information is lost. Prefer to use this instead of TF_SetStatus -// when the error comes from I/O operations. -TF_CAPI_EXPORT extern void TF_SetStatusFromIOError(TF_Status* s, int error_code, - const char* context); - -// Return the code record in *s. -TF_CAPI_EXPORT extern TF_Code TF_GetCode(const TF_Status* s); - -// Return a pointer to the (null-terminated) error message in *s. The -// return value points to memory that is only usable until the next -// mutation to *s. Always returns an empty string if TF_GetCode(s) is -// TF_OK. -TF_CAPI_EXPORT extern const char* TF_Message(const TF_Status* s); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif // TENSORFLOW_C_TF_STATUS_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tensor.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tensor.h deleted file mode 100755 index e0a026f98..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tensor.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_C_TF_TENSOR_H_ -#define TENSORFLOW_C_TF_TENSOR_H_ - -#include -#include - -#include "tensorflow/c/c_api_macros.h" -#include "tensorflow/c/tf_datatype.h" -#include "tensorflow/c/tf_status.h" - -// Macro to control visibility of exported symbols in the shared library (.so, -// .dylib, .dll). -// This duplicates the TF_EXPORT macro definition in -// tensorflow/core/platform/macros.h in order to keep this .h file independent -// of any other includes. -#ifdef SWIG -#define TF_CAPI_EXPORT -#else -#if defined(_WIN32) -#ifdef TF_COMPILE_LIBRARY -#define TF_CAPI_EXPORT __declspec(dllexport) -#else -#define TF_CAPI_EXPORT __declspec(dllimport) -#endif // TF_COMPILE_LIBRARY -#else -#define TF_CAPI_EXPORT __attribute__((visibility("default"))) -#endif // _WIN32 -#endif // SWIG - -#ifdef __cplusplus -extern "C" { -#endif - -// Allocator Attributes used for tensor allocation. -typedef struct TF_AllocatorAttributes { - size_t struct_size; - // Set boolean to 1 for CPU allocation, else 0. - TF_Bool on_host; -} TF_AllocatorAttributes; - -#define TF_ALLOCATOR_ATTRIBUTES_STRUCT_SIZE \ - TF_OFFSET_OF_END(TF_AllocatorAttributes, on_host) - -// -------------------------------------------------------------------------- -// TF_Tensor holds a multi-dimensional array of elements of a single data type. -// For all types other than TF_STRING, the data buffer stores elements -// in row major order. E.g. if data is treated as a vector of TF_DataType: -// -// element 0: index (0, ..., 0) -// element 1: index (0, ..., 1) -// ... -// -// The format for TF_STRING tensors is: -// start_offset: array[uint64] -// data: byte[...] -// -// The string length (as a varint, start_offset[i + 1] - start_offset[i]), -// followed by the contents of the string is encoded at data[start_offset[i]]. -// TF_StringEncode and TF_StringDecode facilitate this encoding. - -typedef struct TF_Tensor TF_Tensor; - -// Return a new tensor that holds the bytes data[0,len-1]. -// -// The data will be deallocated by a subsequent call to TF_DeleteTensor via: -// (*deallocator)(data, len, deallocator_arg) -// Clients must provide a custom deallocator function so they can pass in -// memory managed by something like numpy. -// -// May return NULL (and invoke the deallocator) if the provided data buffer -// (data, len) is inconsistent with a tensor of the given TF_DataType -// and the shape specified by (dima, num_dims). -TF_CAPI_EXPORT extern TF_Tensor* TF_NewTensor( - TF_DataType, const int64_t* dims, int num_dims, void* data, size_t len, - void (*deallocator)(void* data, size_t len, void* arg), - void* deallocator_arg); - -// Allocate and return a new Tensor. -// -// This function is an alternative to TF_NewTensor and should be used when -// memory is allocated to pass the Tensor to the C API. The allocated memory -// satisfies TensorFlow's memory alignment preferences and should be preferred -// over calling malloc and free. -// -// The caller must set the Tensor values by writing them to the pointer returned -// by TF_TensorData with length TF_TensorByteSize. -TF_CAPI_EXPORT extern TF_Tensor* TF_AllocateTensor(TF_DataType, - const int64_t* dims, - int num_dims, size_t len); - -// Deletes `tensor` and returns a new TF_Tensor with the same content if -// possible. Returns nullptr and leaves `tensor` untouched if not. -TF_CAPI_EXPORT extern TF_Tensor* TF_TensorMaybeMove(TF_Tensor* tensor); - -// Destroy a tensor. -TF_CAPI_EXPORT extern void TF_DeleteTensor(TF_Tensor*); - -// Return the type of a tensor element. -TF_CAPI_EXPORT extern TF_DataType TF_TensorType(const TF_Tensor*); - -// Return the number of dimensions that the tensor has. -TF_CAPI_EXPORT extern int TF_NumDims(const TF_Tensor*); - -// Return the length of the tensor in the "dim_index" dimension. -// REQUIRES: 0 <= dim_index < TF_NumDims(tensor) -TF_CAPI_EXPORT extern int64_t TF_Dim(const TF_Tensor* tensor, int dim_index); - -// Return the size of the underlying data in bytes. -TF_CAPI_EXPORT extern size_t TF_TensorByteSize(const TF_Tensor*); - -// Return a pointer to the underlying data buffer. -TF_CAPI_EXPORT extern void* TF_TensorData(const TF_Tensor*); - -// Returns the number of elements in the tensor. -TF_CAPI_EXPORT extern int64_t TF_TensorElementCount(const TF_Tensor* tensor); - -// Copy the internal data representation of `from` to `to`. `new_dims` and -// `num_new_dims` specify the new shape of the `to` tensor, `type` specifies its -// data type. On success, *status is set to TF_OK and the two tensors share the -// same data buffer. -// -// This call requires that the `from` tensor and the given type and shape (dims -// and num_dims) are "compatible" (i.e. they occupy the same number of bytes). -// Specifically, given from_type_size = TF_DataTypeSize(TF_TensorType(from)): -// -// ShapeElementCount(dims, num_dims) * TF_DataTypeSize(type) -// -// must equal -// -// TF_TensorElementCount(from) * from_type_size -// -// where TF_ShapeElementCount would be the number of elements in a tensor with -// the given shape. -// -// In addition, this function requires: -// * TF_DataTypeSize(TF_TensorType(from)) != 0 -// * TF_DataTypeSize(type) != 0 -// -// If any of the requirements are not met, *status is set to -// TF_INVALID_ARGUMENT. -TF_CAPI_EXPORT extern void TF_TensorBitcastFrom(const TF_Tensor* from, - TF_DataType type, TF_Tensor* to, - const int64_t* new_dims, - int num_new_dims, - TF_Status* status); - -// Returns bool iff this tensor is aligned. -TF_CAPI_EXPORT extern bool TF_TensorIsAligned(const TF_Tensor*); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif // TENSORFLOW_C_TF_TENSOR_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tstring.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tstring.h deleted file mode 100755 index 8b576ff81..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/tf_tstring.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ -#ifndef TENSORFLOW_C_TF_TSTRING_H_ -#define TENSORFLOW_C_TF_TSTRING_H_ - -#include "tensorflow/core/platform/ctstring.h" - -#endif // THIRD_PARTY_TENSORFLOW_C_TF_TSTRING_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring.h deleted file mode 100755 index 3209a8e73..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring.h +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_CORE_PLATFORM_CTSTRING_H_ -#define TENSORFLOW_CORE_PLATFORM_CTSTRING_H_ - -#include -#include - -#include "tensorflow/core/platform/ctstring_internal.h" - -// Initialize a new tstring. This must be called before using any function -// below. -inline void TF_TString_Init(TF_TString *str); -// Deallocate a tstring. -inline void TF_TString_Dealloc(TF_TString *str); - -// Resizes `str' to `new_size'. This function will appropriately grow or shrink -// the string buffer to fit a `new_size' string. Grown regions of the string -// will be initialized with `c'. -inline char *TF_TString_Resize(TF_TString *str, size_t new_size, char c); -// Similar to TF_TString_Resize, except the newly allocated regions will remain -// uninitialized. This is useful if you plan on overwriting the newly grown -// regions immediately after allocation; doing so will elide a superfluous -// initialization of the new buffer. -inline char *TF_TString_ResizeUninitialized(TF_TString *str, size_t new_size); -// Reserves a string buffer with a capacity of at least `new_cap'. -// ResizeUninitialized will not change the size, or the contents of the existing -// string. This is useful if you have a rough idea of `str's upperbound in -// size, and want to avoid allocations as you append to `str'. It should not be -// considered safe to write in the region between size and capacity; explicitly -// resize before doing so. -inline void TF_TString_Reserve(TF_TString *str, size_t new_cap); - -// Returns the size of the string. -inline size_t TF_TString_GetSize(const TF_TString *str); -// Returns the capacity of the string buffer. It should not be considered safe -// to write in the region between size and capacity---call Resize or -// ResizeUninitialized before doing so. -inline size_t TF_TString_GetCapacity(const TF_TString *str); -// Returns the underlying type of the tstring: -// TF_TSTR_SMALL: -// Small string optimization; the contents of strings -// less than 22-bytes are stored in the TF_TString struct. This avoids any -// heap allocations. -// TF_TSTR_LARGE: -// Heap allocated string. -// TF_TSTR_OFFSET: (currently unused) -// An offset defined string. The string buffer begins at an internally -// defined little-endian offset from `str'; i.e. GetDataPointer() = str + -// offset. This type is useful for memory mapping or reading string tensors -// directly from file, without the need to deserialize the data. For -// security reasons, it is imperative that OFFSET based string tensors are -// validated before use, or are from a trusted source. -// TF_TSTR_VIEW: -// A view into an unowned character string. -// -// NOTE: -// VIEW and OFFSET types are immutable, so any modifcation via Append, -// AppendN, or GetMutableDataPointer of a VIEW/OFFSET based tstring will -// result in a conversion to an owned type (SMALL/LARGE). -inline TF_TString_Type TF_TString_GetType(const TF_TString *str); - -// Returns a const char pointer to the start of the underlying string. The -// underlying character buffer may not be null-terminated. -inline const char *TF_TString_GetDataPointer(const TF_TString *str); -// Returns a char pointer to a mutable representation of the underlying string. -// In the case of VIEW and OFFSET types, `src' is converted to an owned type -// (SMALL/LARGE). The underlying character buffer may not be null-terminated. -inline char *TF_TString_GetMutableDataPointer(TF_TString *str); - -// Sets `dst' as a VIEW type to `src'. `dst' will not take ownership of `src'. -// It is the user's responsibility to ensure that the lifetime of `src' exceeds -// `dst'. Any mutations to `dst' via Append, AppendN, or GetMutableDataPointer, -// will result in a copy into an owned SMALL or LARGE type, and will not modify -// `src'. -inline void TF_TString_AssignView(TF_TString *dst, const char *src, - size_t size); - -// Appends `src' onto `dst'. If `dst' is a VIEW or OFFSET type, it will first -// be converted to an owned LARGE or SMALL type. `dst' should not point to -// memory owned by `src'. -inline void TF_TString_Append(TF_TString *dst, const TF_TString *src); -inline void TF_TString_AppendN(TF_TString *dst, const char *src, size_t size); - -// Copy/Move/Assign semantics -// -// | src | dst | complexity -// Copy | * | SMALL/LARGE | fixed/O(size) -// Assign | SMALL | SMALL | fixed -// Assign | OFFSET | VIEW | fixed -// Assign | VIEW | VIEW | fixed -// Assign | LARGE | LARGE | O(size) -// Move | * | same as src | fixed - -// Copies `src' to `dst'. `dst' will be an owned type (SMALL/LARGE). `src' -// should not point to memory owned by `dst'. -inline void TF_TString_Copy(TF_TString *dst, const char *src, size_t size); -// Assigns a `src' tstring to `dst'. An OFFSET `src' type will yield a `VIEW' -// `dst'. LARGE `src' types will be copied to a new buffer; all other `src' -// types will incur a fixed cost. -inline void TF_TString_Assign(TF_TString *dst, const TF_TString *src); -// Moves a `src' tstring to `dst'. Moving a LARGE `src' to `dst' will result in -// a valid but unspecified `src'. This function incurs a fixed cost for all -// inputs. -inline void TF_TString_Move(TF_TString *dst, TF_TString *src); - -#endif // TENSORFLOW_CORE_PLATFORM_CTSTRING_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring_internal.h b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring_internal.h deleted file mode 100755 index 952426717..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/core/platform/ctstring_internal.h +++ /dev/null @@ -1,449 +0,0 @@ -/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TENSORFLOW_CORE_PLATFORM_CTSTRING_INTERNAL_H_ -#define TENSORFLOW_CORE_PLATFORM_CTSTRING_INTERNAL_H_ - -#include -#include -#include -#include - -#if (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ - __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || \ - defined(_WIN32) -#define TF_TSTRING_LITTLE_ENDIAN 1 -#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \ - __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -#define TF_TSTRING_LITTLE_ENDIAN 0 -#else -#error "Unable to detect endianness." -#endif - -#if defined(__clang__) || \ - (defined(__GNUC__) && \ - ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ >= 5)) -static inline uint32_t TF_swap32(uint32_t host_int) { - return __builtin_bswap32(host_int); -} - -#elif defined(_MSC_VER) -static inline uint32_t TF_swap32(uint32_t host_int) { - return _byteswap_ulong(host_int); -} - -#elif defined(__APPLE__) -static inline uint32_t TF_swap32(uint32_t host_int) { - return OSSwapInt32(host_int); -} - -#else -static inline uint32_t TF_swap32(uint32_t host_int) { -#if defined(__GLIBC__) - return bswap_32(host_int); -#else // defined(__GLIBC__) - return (((host_int & uint32_t{0xFF}) << 24) | - ((host_int & uint32_t{0xFF00}) << 8) | - ((host_int & uint32_t{0xFF0000}) >> 8) | - ((host_int & uint32_t{0xFF000000}) >> 24)); -#endif // defined(__GLIBC__) -} -#endif - -#if TF_TSTRING_LITTLE_ENDIAN -#define TF_le32toh(x) TF_swap32(x) -#else // TF_TSTRING_LITTLE_ENDIAN -#define TF_le32toh(x) x -#endif // TF_TSTRING_LITTLE_ENDIAN - -static inline size_t TF_align16(size_t i) { return (i + 0xF) & ~0xF; } - -static inline size_t TF_max(size_t a, size_t b) { return a > b ? a : b; } -static inline size_t TF_min(size_t a, size_t b) { return a < b ? a : b; } - -typedef enum TF_TString_Type { // NOLINT - TF_TSTR_SMALL = 0x00, - TF_TSTR_LARGE = 0x01, - TF_TSTR_OFFSET = 0x02, - TF_TSTR_VIEW = 0x03, - TF_TSTR_TYPE_MASK = 0x03 -} TF_TString_Type; - -typedef struct TF_TString_Large { // NOLINT - size_t size; - size_t cap; - char *ptr; -} TF_TString_Large; - -typedef struct TF_TString_Offset { // NOLINT - uint32_t size; - uint32_t offset; - uint32_t count; -} TF_TString_Offset; - -typedef struct TF_TString_View { // NOLINT - size_t size; - const char *ptr; -} TF_TString_View; - -typedef struct TF_TString_Raw { // NOLINT - uint8_t raw[24]; -} TF_TString_Raw; - -typedef union TF_TString_Union { // NOLINT - TF_TString_Large large; - TF_TString_Offset offset; - TF_TString_View view; - TF_TString_Raw raw; -} TF_TString_Union; - -enum { - TF_TString_SmallCapacity = - (sizeof(TF_TString_Union) - sizeof(/* null delim */ char) - - sizeof(/* uint8_t size */ uint8_t)), -}; - -typedef struct TF_TString_Small { // NOLINT - uint8_t size; - char str[TF_TString_SmallCapacity + sizeof(/* null delim */ char)]; -} TF_TString_Small; - -typedef struct TF_TString { // NOLINT - union { - // small conflicts with '#define small char' in RpcNdr.h for MSVC, so we use - // smll instead. - TF_TString_Small smll; - TF_TString_Large large; - TF_TString_Offset offset; - TF_TString_View view; - TF_TString_Raw raw; - } u; -} TF_TString; - -// TODO(dero): Fix for OSS, and add C only build test. -// _Static_assert(CHAR_BIT == 8); -// _Static_assert(sizeof(TF_TString) == 24); - -static inline TF_TString_Type TF_TString_GetType(const TF_TString *str) { - return (TF_TString_Type)(str->u.raw.raw[0] & TF_TSTR_TYPE_MASK); // NOLINT -} - -// XXX(dero): For the big-endian case, this function could potentially be more -// performant and readable by always storing the string size as little-endian -// and always byte-swapping on big endian, resulting in a simple 'bswap'+'shr' -// (for architectures that have a bswap op). -static inline size_t TF_TString_ToActualSizeT(size_t size) { -#if TF_TSTRING_LITTLE_ENDIAN - return size >> 2; -#else // TF_TSTRING_LITTLE_ENDIAN - // 0xFF000000 or 0xFF00000000000000 depending on platform - static const size_t mask = ~((~(size_t)0) >> 8); - - return (((mask << 2) & size) >> 2) | (~mask & size); -#endif // TF_TSTRING_LITTLE_ENDIAN -} - -static inline size_t TF_TString_ToInternalSizeT(size_t size, - TF_TString_Type type) { -#if TF_TSTRING_LITTLE_ENDIAN - return (size << 2) | type; -#else // TF_TSTRING_LITTLE_ENDIAN - // 0xFF000000 or 0xFF00000000000000 depending on platform - static const size_t mask = ~((~(size_t)0) >> 8); - - return (mask & (size << 2)) | (~mask & size) | - ((size_t)type << ((sizeof(size_t) - 1) * 8)); // NOLINT -#endif // TF_TSTRING_LITTLE_ENDIAN -} - -static inline void TF_TString_Init(TF_TString *str) { - memset(str->u.raw.raw, 0, sizeof(TF_TString_Raw)); -} - -static inline void TF_TString_Dealloc(TF_TString *str) { - if (TF_TString_GetType(str) == TF_TSTR_LARGE && - str->u.large.ptr != NULL) { // NOLINT - free(str->u.large.ptr); - TF_TString_Init(str); - } -} - -static inline size_t TF_TString_GetSize(const TF_TString *str) { - switch (TF_TString_GetType(str)) { - case TF_TSTR_SMALL: - return str->u.smll.size >> 2; - case TF_TSTR_LARGE: - return TF_TString_ToActualSizeT(str->u.large.size); - case TF_TSTR_OFFSET: - return TF_le32toh(str->u.offset.size) >> 2; - case TF_TSTR_VIEW: - return TF_TString_ToActualSizeT(str->u.view.size); - default: - return 0; // Unreachable. - } -} - -static inline size_t TF_TString_GetCapacity(const TF_TString *str) { - switch (TF_TString_GetType(str)) { - case TF_TSTR_SMALL: - return TF_TString_SmallCapacity; - case TF_TSTR_LARGE: - return str->u.large.cap; - case TF_TSTR_OFFSET: - case TF_TSTR_VIEW: - default: - return 0; - } -} - -static inline const char *TF_TString_GetDataPointer(const TF_TString *str) { - switch (TF_TString_GetType(str)) { - case TF_TSTR_SMALL: - return str->u.smll.str; - case TF_TSTR_LARGE: - return str->u.large.ptr; - case TF_TSTR_OFFSET: - return (const char *)str + str->u.offset.offset; // NOLINT - case TF_TSTR_VIEW: - return str->u.view.ptr; - default: - // Unreachable. - return NULL; // NOLINT - } -} - -static inline char *TF_TString_ResizeUninitialized(TF_TString *str, - size_t new_size) { - size_t curr_size = TF_TString_GetSize(str); - size_t copy_size = TF_min(new_size, curr_size); - - TF_TString_Type curr_type = TF_TString_GetType(str); - const char *curr_ptr = TF_TString_GetDataPointer(str); - - // Case: SMALL/LARGE/VIEW/OFFSET -> SMALL - if (new_size <= TF_TString_SmallCapacity) { - str->u.smll.size = (uint8_t)((new_size << 2) | TF_TSTR_SMALL); // NOLINT - str->u.smll.str[new_size] = '\0'; - - if (curr_type != TF_TSTR_SMALL && copy_size) { - memcpy(str->u.smll.str, curr_ptr, copy_size); - } - - if (curr_type == TF_TSTR_LARGE) { - free((void *)curr_ptr); // NOLINT - } - - // We do not clear out the newly excluded region. - - return str->u.smll.str; - } - - // Case: SMALL/LARGE/VIEW/OFFSET -> LARGE - size_t new_cap; - size_t curr_cap = TF_TString_GetCapacity(str); - // We assume SIZE_MAX % 16 == 0. - size_t curr_cap_x2 = curr_cap >= SIZE_MAX / 2 ? SIZE_MAX - 1 : curr_cap * 2; - - if (new_size < curr_size && new_size < curr_cap / 2) { - // TODO(dero): Replace with shrink_to_fit flag. - new_cap = TF_align16(curr_cap / 2 + 1) - 1; - } else if (new_size > curr_cap_x2) { - new_cap = TF_align16(new_size + 1) - 1; - } else if (new_size > curr_cap) { - new_cap = TF_align16(curr_cap_x2 + 1) - 1; - } else { - new_cap = curr_cap; - } - - char *new_ptr; - if (new_cap == curr_cap) { - new_ptr = str->u.large.ptr; - } else if (curr_type == TF_TSTR_LARGE) { - new_ptr = (char *)realloc(str->u.large.ptr, new_cap + 1); // NOLINT - } else { - new_ptr = (char *)malloc(new_cap + 1); // NOLINT - if (copy_size) { - memcpy(new_ptr, curr_ptr, copy_size); - } - } - - str->u.large.size = TF_TString_ToInternalSizeT(new_size, TF_TSTR_LARGE); - str->u.large.ptr = new_ptr; - str->u.large.ptr[new_size] = '\0'; - str->u.large.cap = new_cap; - - return str->u.large.ptr; -} - -static inline char *TF_TString_GetMutableDataPointer(TF_TString *str) { - switch (TF_TString_GetType(str)) { - case TF_TSTR_SMALL: - return str->u.smll.str; - case TF_TSTR_OFFSET: - case TF_TSTR_VIEW: - // Convert OFFSET/VIEW to SMALL/LARGE - TF_TString_ResizeUninitialized(str, TF_TString_GetSize(str)); - return (TF_TString_GetType(str) == TF_TSTR_SMALL) ? str->u.smll.str - : str->u.large.ptr; - case TF_TSTR_LARGE: - return str->u.large.ptr; - default: - // Unreachable. - return NULL; // NOLINT - } -} - -static inline void TF_TString_Reserve(TF_TString *str, size_t new_cap) { - TF_TString_Type curr_type = TF_TString_GetType(str); - - if (new_cap <= TF_TString_SmallCapacity) { - // We do nothing, we let Resize/GetMutableDataPointer handle the - // conversion to SMALL from VIEW/OFFSET when the need arises. - // In the degenerate case, where new_cap <= TF_TString_SmallCapacity, - // curr_size > TF_TString_SmallCapacity, and the type is VIEW/OFFSET, we - // defer the malloc to Resize/GetMutableDataPointer. - return; - } - - if (curr_type == TF_TSTR_LARGE && new_cap <= str->u.large.cap) { - // We handle reduced cap in resize. - return; - } - - // Case: VIEW/OFFSET -> LARGE or grow an existing LARGE type - size_t curr_size = TF_TString_GetSize(str); - const char *curr_ptr = TF_TString_GetDataPointer(str); - - // Since VIEW and OFFSET types are read-only, their capacity is effectively 0. - // So we make sure we have enough room in the VIEW and OFFSET cases. - new_cap = TF_align16(TF_max(new_cap, curr_size) + 1) - 1; - - if (curr_type == TF_TSTR_LARGE) { - str->u.large.ptr = - (char *)realloc(str->u.large.ptr, new_cap + 1); // NOLINT - } else { - // Convert to Large - char *new_ptr = (char *)malloc(new_cap + 1); // NOLINT - memcpy(new_ptr, curr_ptr, curr_size); - - str->u.large.size = TF_TString_ToInternalSizeT(curr_size, TF_TSTR_LARGE); - str->u.large.ptr = new_ptr; - str->u.large.ptr[curr_size] = '\0'; - } - - str->u.large.cap = new_cap; -} - -static inline char *TF_TString_Resize(TF_TString *str, size_t new_size, - char c) { - size_t curr_size = TF_TString_GetSize(str); - char *cstr = TF_TString_ResizeUninitialized(str, new_size); - - if (new_size > curr_size) { - memset(cstr + curr_size, c, new_size - curr_size); - } - - return cstr; -} - -static inline void TF_TString_AssignView(TF_TString *dst, const char *src, - size_t size) { - TF_TString_Dealloc(dst); - - dst->u.view.size = TF_TString_ToInternalSizeT(size, TF_TSTR_VIEW); - dst->u.view.ptr = src; -} - -static inline void TF_TString_AppendN(TF_TString *dst, const char *src, - size_t src_size) { - if (!src_size) return; - - size_t dst_size = TF_TString_GetSize(dst); - - char *dst_c = TF_TString_ResizeUninitialized(dst, dst_size + src_size); - - memcpy(dst_c + dst_size, src, src_size); -} - -static inline void TF_TString_Append(TF_TString *dst, const TF_TString *src) { - const char *src_c = TF_TString_GetDataPointer(src); - size_t size = TF_TString_GetSize(src); - - TF_TString_AppendN(dst, src_c, size); -} - -static inline void TF_TString_Copy(TF_TString *dst, const char *src, - size_t size) { - char *dst_c = TF_TString_ResizeUninitialized(dst, size); - - if (size) memcpy(dst_c, src, size); -} - -static inline void TF_TString_Assign(TF_TString *dst, const TF_TString *src) { - if (dst == src) return; - - TF_TString_Dealloc(dst); - - switch (TF_TString_GetType(src)) { - case TF_TSTR_SMALL: - case TF_TSTR_VIEW: - *dst = *src; - return; - case TF_TSTR_LARGE: { - const char *src_c = TF_TString_GetDataPointer(src); - size_t size = TF_TString_GetSize(src); - - TF_TString_Copy(dst, src_c, size); - } - return; - case TF_TSTR_OFFSET: { - const char *src_c = TF_TString_GetDataPointer(src); - size_t size = TF_TString_GetSize(src); - - TF_TString_AssignView(dst, src_c, size); - } - return; - default: - return; // Unreachable. - } -} - -static inline void TF_TString_Move(TF_TString *dst, TF_TString *src) { - if (dst == src) return; - - TF_TString_Dealloc(dst); - - switch (TF_TString_GetType(src)) { - case TF_TSTR_SMALL: - case TF_TSTR_VIEW: - *dst = *src; - return; - case TF_TSTR_LARGE: - *dst = *src; - TF_TString_Init(src); - return; - case TF_TSTR_OFFSET: { - const char *src_c = TF_TString_GetDataPointer(src); - size_t size = TF_TString_GetSize(src); - - TF_TString_AssignView(dst, src_c, size); - } - return; - default: - return; // Unreachable. - } -} - -#endif // TENSORFLOW_CORE_PLATFORM_CTSTRING_INTERNAL_H_ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so deleted file mode 120000 index 31179a187..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so +++ /dev/null @@ -1 +0,0 @@ -libtensorflow.so.2 \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so.2 b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so.2 deleted file mode 120000 index 626706ff5..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow.so.2 +++ /dev/null @@ -1 +0,0 @@ -libtensorflow.so.2.4.1 \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so deleted file mode 120000 index 8af1a9d6f..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so +++ /dev/null @@ -1 +0,0 @@ -libtensorflow_framework.so.2 \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so.2 b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so.2 deleted file mode 120000 index c055156b9..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so.2 +++ /dev/null @@ -1 +0,0 @@ -libtensorflow_framework.so.2.4.1 \ No newline at end of file diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so.2.4.1 b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so.2.4.1 deleted file mode 100755 index 3b1413255..000000000 Binary files a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/deps/lib/libtensorflow_framework.so.2.4.1 and /dev/null differ diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks.d.ts deleted file mode 100644 index b3dde449b..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { CustomCallback } from '@tensorflow/tfjs'; -export declare const progressBarHelper: { - ProgressBar: any; - log: Function; -}; -/** - * Terminal-based progress bar callback for tf.Model.fit(). - */ -export declare class ProgbarLogger extends CustomCallback { - private numTrainBatchesPerEpoch; - private progressBar; - private currentEpochBegin; - private epochDurationMillis; - private usPerStep; - private batchesInLatestEpoch; - private terminalWidth; - private readonly RENDER_THROTTLE_MS; - /** - * Construtor of LoggingCallback. - */ - constructor(); - private formatLogsAsMetricsContent; - private isFieldRelevant; -} -/** - * Get a succint string representation of a number. - * - * Uses decimal notation if the number isn't too small. - * Otherwise, use engineering notation. - * - * @param x Input number. - * @return Succinct string representing `x`. - */ -export declare function getSuccinctNumberDisplay(x: number): string; -/** - * Determine the number of decimal places to display. - * - * @param x Number to display. - * @return Number of decimal places to display for `x`. - */ -export declare function getDisplayDecimalPlaces(x: number): number; -export interface TensorBoardCallbackArgs { - /** - * The frequency at which loss and metric values are written to logs. - * - * Currently supported options are: - * - * - 'batch': Write logs at the end of every batch of training, in addition - * to the end of every epoch of training. - * - 'epoch': Write logs at the end of every epoch of training. - * - * Note that writing logs too often slows down the training. - * - * Default: 'epoch'. - */ - updateFreq?: 'batch' | 'epoch'; -} -/** - * Callback for logging to TensorBoard during training. - * - * Users are expected to access this class through the `tensorBoardCallback()` - * factory method instead. - */ -export declare class TensorBoardCallback extends CustomCallback { - readonly logdir: string; - private trainWriter; - private valWriter; - private batchesSeen; - private readonly args; - constructor(logdir?: string, args?: TensorBoardCallbackArgs); - private logMetrics; - private ensureTrainWriterCreated; - private ensureValWriterCreated; -} -/** - * Callback for logging to TensorBoard during training. - * - * Writes the loss and metric values (if any) to the specified log directory - * (`logdir`) which can be ingested and visualized by TensorBoard. - * This callback is usually passed as a callback to `tf.Model.fit()` or - * `tf.Model.fitDataset()` calls during model training. The frequency at which - * the values are logged can be controlled with the `updateFreq` field of the - * configuration object (2nd argument). - * - * Usage example: - * ```js - * // Constructor a toy multilayer-perceptron regressor for demo purpose. - * const model = tf.sequential(); - * model.add( - * tf.layers.dense({units: 100, activation: 'relu', inputShape: [200]})); - * model.add(tf.layers.dense({units: 1})); - * model.compile({ - * loss: 'meanSquaredError', - * optimizer: 'sgd', - * metrics: ['MAE'] - * }); - * - * // Generate some random fake data for demo purpose. - * const xs = tf.randomUniform([10000, 200]); - * const ys = tf.randomUniform([10000, 1]); - * const valXs = tf.randomUniform([1000, 200]); - * const valYs = tf.randomUniform([1000, 1]); - * - * // Start model training process. - * await model.fit(xs, ys, { - * epochs: 100, - * validationData: [valXs, valYs], - * // Add the tensorBoard callback here. - * callbacks: tf.node.tensorBoard('/tmp/fit_logs_1') - * }); - * ``` - * - * Then you can use the following commands to point tensorboard - * to the logdir: - * - * ```sh - * pip install tensorboard # Unless you've already installed it. - * tensorboard --logdir /tmp/fit_logs_1 - * ``` - * - * @param logdir Directory to which the logs will be written. - * @param args Optional configuration arguments. - * @returns An instance of `TensorBoardCallback`, which is a subclass of - * `tf.CustomCallback`. - * - * @doc {heading: 'TensorBoard', namespace: 'node'} - */ -export declare function tensorBoard(logdir?: string, args?: TensorBoardCallbackArgs): TensorBoardCallback; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks.js deleted file mode 100644 index d638be721..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks.js +++ /dev/null @@ -1,371 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var path = require("path"); -var ProgressBar = require("progress"); -var tensorboard_1 = require("./tensorboard"); -// A helper class created for testing with the jasmine `spyOn` method, which -// operates only on member methods of objects. -// tslint:disable-next-line:no-any -exports.progressBarHelper = { - ProgressBar: ProgressBar, - log: console.log -}; -/** - * Terminal-based progress bar callback for tf.Model.fit(). - */ -var ProgbarLogger = /** @class */ (function (_super) { - __extends(ProgbarLogger, _super); - /** - * Construtor of LoggingCallback. - */ - function ProgbarLogger() { - var _this = _super.call(this, { - onTrainBegin: function (logs) { return __awaiter(_this, void 0, void 0, function () { - var samples, batchSize, steps; - return __generator(this, function (_a) { - samples = this.params.samples; - batchSize = this.params.batchSize; - steps = this.params.steps; - if (samples != null || steps != null) { - this.numTrainBatchesPerEpoch = - samples != null ? Math.ceil(samples / batchSize) : steps; - } - else { - // Undetermined number of batches per epoch, e.g., due to - // `fitDataset()` without `batchesPerEpoch`. - this.numTrainBatchesPerEpoch = 0; - } - return [2 /*return*/]; - }); - }); }, - onEpochBegin: function (epoch, logs) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - exports.progressBarHelper.log("Epoch " + (epoch + 1) + " / " + this.params.epochs); - this.currentEpochBegin = tfjs_1.util.now(); - this.epochDurationMillis = null; - this.usPerStep = null; - this.batchesInLatestEpoch = 0; - this.terminalWidth = process.stderr.columns; - return [2 /*return*/]; - }); - }); }, - onBatchEnd: function (batch, logs) { return __awaiter(_this, void 0, void 0, function () { - var maxMetricsStringLength, tickTokens; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - this.batchesInLatestEpoch++; - if (batch === 0) { - this.progressBar = new exports.progressBarHelper.ProgressBar('eta=:eta :bar :placeholderForLossesAndMetrics', { - width: Math.floor(0.5 * this.terminalWidth), - total: this.numTrainBatchesPerEpoch + 1, - head: ">", - renderThrottle: this.RENDER_THROTTLE_MS - }); - } - maxMetricsStringLength = Math.floor(this.terminalWidth * 0.5 - 12); - tickTokens = { - placeholderForLossesAndMetrics: this.formatLogsAsMetricsContent(logs, maxMetricsStringLength) - }; - if (this.numTrainBatchesPerEpoch === 0) { - // Undetermined number of batches per epoch. - this.progressBar.tick(0, tickTokens); - } - else { - this.progressBar.tick(tickTokens); - } - return [4 /*yield*/, tfjs_1.nextFrame()]; - case 1: - _a.sent(); - if (batch === this.numTrainBatchesPerEpoch - 1) { - this.epochDurationMillis = tfjs_1.util.now() - this.currentEpochBegin; - this.usPerStep = this.params.samples != null ? - this.epochDurationMillis / this.params.samples * 1e3 : - this.epochDurationMillis / this.batchesInLatestEpoch * 1e3; - } - return [2 /*return*/]; - } - }); - }); }, - onEpochEnd: function (epoch, logs) { return __awaiter(_this, void 0, void 0, function () { - var lossesAndMetricsString; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (this.epochDurationMillis == null) { - // In cases where the number of batches per epoch is not determined, - // the calculation of the per-step duration is done at the end of the - // epoch. N.B., this includes the time spent on validation. - this.epochDurationMillis = tfjs_1.util.now() - this.currentEpochBegin; - this.usPerStep = - this.epochDurationMillis / this.batchesInLatestEpoch * 1e3; - } - this.progressBar.tick({ placeholderForLossesAndMetrics: '' }); - lossesAndMetricsString = this.formatLogsAsMetricsContent(logs); - exports.progressBarHelper.log(this.epochDurationMillis.toFixed(0) + "ms " + - (this.usPerStep.toFixed(0) + "us/step - ") + - ("" + lossesAndMetricsString)); - return [4 /*yield*/, tfjs_1.nextFrame()]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }, - }) || this; - _this.RENDER_THROTTLE_MS = 50; - return _this; - } - ProgbarLogger.prototype.formatLogsAsMetricsContent = function (logs, maxMetricsLength) { - var metricsContent = ''; - var keys = Object.keys(logs).sort(); - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - if (this.isFieldRelevant(key)) { - var value = logs[key]; - metricsContent += key + "=" + getSuccinctNumberDisplay(value) + " "; - } - } - if (maxMetricsLength != null && metricsContent.length > maxMetricsLength) { - // Cut off metrics strings that are too long to avoid new lines being - // constantly created. - metricsContent = metricsContent.slice(0, maxMetricsLength - 3) + '...'; - } - return metricsContent; - }; - ProgbarLogger.prototype.isFieldRelevant = function (key) { - return key !== 'batch' && key !== 'size'; - }; - return ProgbarLogger; -}(tfjs_1.CustomCallback)); -exports.ProgbarLogger = ProgbarLogger; -var BASE_NUM_DIGITS = 2; -var MAX_NUM_DECIMAL_PLACES = 4; -/** - * Get a succint string representation of a number. - * - * Uses decimal notation if the number isn't too small. - * Otherwise, use engineering notation. - * - * @param x Input number. - * @return Succinct string representing `x`. - */ -function getSuccinctNumberDisplay(x) { - var decimalPlaces = getDisplayDecimalPlaces(x); - return decimalPlaces > MAX_NUM_DECIMAL_PLACES ? - x.toExponential(BASE_NUM_DIGITS) : - x.toFixed(decimalPlaces); -} -exports.getSuccinctNumberDisplay = getSuccinctNumberDisplay; -/** - * Determine the number of decimal places to display. - * - * @param x Number to display. - * @return Number of decimal places to display for `x`. - */ -function getDisplayDecimalPlaces(x) { - if (!Number.isFinite(x) || x === 0 || x > 1 || x < -1) { - return BASE_NUM_DIGITS; - } - else { - return BASE_NUM_DIGITS - Math.floor(Math.log10(Math.abs(x))); - } -} -exports.getDisplayDecimalPlaces = getDisplayDecimalPlaces; -/** - * Callback for logging to TensorBoard during training. - * - * Users are expected to access this class through the `tensorBoardCallback()` - * factory method instead. - */ -var TensorBoardCallback = /** @class */ (function (_super) { - __extends(TensorBoardCallback, _super); - function TensorBoardCallback(logdir, args) { - if (logdir === void 0) { logdir = './logs'; } - var _this = _super.call(this, { - onBatchEnd: function (batch, logs) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - this.batchesSeen++; - if (this.args.updateFreq !== 'epoch') { - this.logMetrics(logs, 'batch_', this.batchesSeen); - } - return [2 /*return*/]; - }); - }); }, - onEpochEnd: function (epoch, logs) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - this.logMetrics(logs, 'epoch_', epoch + 1); - return [2 /*return*/]; - }); - }); }, - onTrainEnd: function (logs) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (this.trainWriter != null) { - this.trainWriter.flush(); - } - if (this.valWriter != null) { - this.valWriter.flush(); - } - return [2 /*return*/]; - }); - }); } - }) || this; - _this.logdir = logdir; - _this.args = args == null ? {} : args; - if (_this.args.updateFreq == null) { - _this.args.updateFreq = 'epoch'; - } - tfjs_1.util.assert(['batch', 'epoch'].indexOf(_this.args.updateFreq) !== -1, function () { return "Expected updateFreq to be 'batch' or 'epoch', but got " + - ("" + _this.args.updateFreq); }); - _this.batchesSeen = 0; - return _this; - } - TensorBoardCallback.prototype.logMetrics = function (logs, prefix, step) { - for (var key in logs) { - if (key === 'batch' || key === 'size' || key === 'num_steps') { - continue; - } - var VAL_PREFIX = 'val_'; - if (key.startsWith(VAL_PREFIX)) { - this.ensureValWriterCreated(); - var scalarName = prefix + key.slice(VAL_PREFIX.length); - this.valWriter.scalar(scalarName, logs[key], step); - } - else { - this.ensureTrainWriterCreated(); - this.trainWriter.scalar("" + prefix + key, logs[key], step); - } - } - }; - TensorBoardCallback.prototype.ensureTrainWriterCreated = function () { - this.trainWriter = tensorboard_1.summaryFileWriter(path.join(this.logdir, 'train')); - }; - TensorBoardCallback.prototype.ensureValWriterCreated = function () { - this.valWriter = tensorboard_1.summaryFileWriter(path.join(this.logdir, 'val')); - }; - return TensorBoardCallback; -}(tfjs_1.CustomCallback)); -exports.TensorBoardCallback = TensorBoardCallback; -/** - * Callback for logging to TensorBoard during training. - * - * Writes the loss and metric values (if any) to the specified log directory - * (`logdir`) which can be ingested and visualized by TensorBoard. - * This callback is usually passed as a callback to `tf.Model.fit()` or - * `tf.Model.fitDataset()` calls during model training. The frequency at which - * the values are logged can be controlled with the `updateFreq` field of the - * configuration object (2nd argument). - * - * Usage example: - * ```js - * // Constructor a toy multilayer-perceptron regressor for demo purpose. - * const model = tf.sequential(); - * model.add( - * tf.layers.dense({units: 100, activation: 'relu', inputShape: [200]})); - * model.add(tf.layers.dense({units: 1})); - * model.compile({ - * loss: 'meanSquaredError', - * optimizer: 'sgd', - * metrics: ['MAE'] - * }); - * - * // Generate some random fake data for demo purpose. - * const xs = tf.randomUniform([10000, 200]); - * const ys = tf.randomUniform([10000, 1]); - * const valXs = tf.randomUniform([1000, 200]); - * const valYs = tf.randomUniform([1000, 1]); - * - * // Start model training process. - * await model.fit(xs, ys, { - * epochs: 100, - * validationData: [valXs, valYs], - * // Add the tensorBoard callback here. - * callbacks: tf.node.tensorBoard('/tmp/fit_logs_1') - * }); - * ``` - * - * Then you can use the following commands to point tensorboard - * to the logdir: - * - * ```sh - * pip install tensorboard # Unless you've already installed it. - * tensorboard --logdir /tmp/fit_logs_1 - * ``` - * - * @param logdir Directory to which the logs will be written. - * @param args Optional configuration arguments. - * @returns An instance of `TensorBoardCallback`, which is a subclass of - * `tf.CustomCallback`. - * - * @doc {heading: 'TensorBoard', namespace: 'node'} - */ -function tensorBoard(logdir, args) { - if (logdir === void 0) { logdir = './logs'; } - return new TensorBoardCallback(logdir, args); -} -exports.tensorBoard = tensorBoard; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks_test.d.ts deleted file mode 100644 index 4a6d69728..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks_test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks_test.js deleted file mode 100644 index 9f16ac447..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/callbacks_test.js +++ /dev/null @@ -1,391 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var _this = this; -Object.defineProperty(exports, "__esModule", { value: true }); -var tf = require("@tensorflow/tfjs"); -var callbacks_1 = require("./callbacks"); -describe('progbarLogger', function () { - // Fake progbar class written for testing. - var FakeProgbar = /** @class */ (function () { - function FakeProgbar(specs, config) { - this.specs = specs; - this.config = config; - this.tickConfigs = []; - } - FakeProgbar.prototype.tick = function (tickConfig) { - this.tickConfigs.push(tickConfig); - }; - return FakeProgbar; - }()); - var originalStderrColumns; - beforeEach(function () { - // In some CI environments, process.stderr.columns has a null value. - originalStderrColumns = process.stderr.columns; - process.stderr.columns = 100; - }); - afterEach(function () { - process.stderr.columns = originalStderrColumns; - }); - it('Model.fit with loss, no metric, no validation, verobse = 1', function () { return __awaiter(_this, void 0, void 0, function () { - var fakeProgbars, consoleMessages, model, numSamples, epochs, batchSize, xs, ys, _i, fakeProgbars_1, fakeProgbar, tickConfigs, i; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fakeProgbars = []; - spyOn(callbacks_1.progressBarHelper, 'ProgressBar') - .and.callFake(function (specs, config) { - var fakeProgbar = new FakeProgbar(specs, config); - fakeProgbars.push(fakeProgbar); - return fakeProgbar; - }); - consoleMessages = []; - spyOn(callbacks_1.progressBarHelper, 'log').and.callFake(function (message) { - consoleMessages.push(message); - }); - model = tf.sequential(); - model.add(tf.layers.dense({ units: 10, inputShape: [8], activation: 'relu' })); - model.add(tf.layers.dense({ units: 1 })); - model.compile({ loss: 'meanSquaredError', optimizer: 'sgd' }); - numSamples = 14; - epochs = 3; - batchSize = 8; - xs = tf.randomNormal([numSamples, 8]); - ys = tf.randomNormal([numSamples, 1]); - return [4 /*yield*/, model.fit(xs, ys, { epochs: epochs, batchSize: batchSize, verbose: 1 })]; - case 1: - _a.sent(); - // A progbar object is created for each epoch. - expect(fakeProgbars.length).toEqual(3); - for (_i = 0, fakeProgbars_1 = fakeProgbars; _i < fakeProgbars_1.length; _i++) { - fakeProgbar = fakeProgbars_1[_i]; - tickConfigs = fakeProgbar.tickConfigs; - // There are ceil(14 / 8) = 2 batchs per epoch. There should be 1 tick - // for epoch batch, plus a tick at the end of the epoch. - expect(tickConfigs.length).toEqual(3); - for (i = 0; i < 2; ++i) { - expect(Object.keys(tickConfigs[i])).toEqual([ - 'placeholderForLossesAndMetrics' - ]); - expect(tickConfigs[i]['placeholderForLossesAndMetrics']) - .toMatch(/^loss=.*/); - } - expect(tickConfigs[2]).toEqual({ placeholderForLossesAndMetrics: '' }); - } - expect(consoleMessages.length).toEqual(6); - expect(consoleMessages[0]).toEqual('Epoch 1 / 3'); - expect(consoleMessages[1]).toMatch(/.*ms .*us\/step - loss=.*/); - expect(consoleMessages[2]).toEqual('Epoch 2 / 3'); - expect(consoleMessages[3]).toMatch(/.*ms .*us\/step - loss=.*/); - expect(consoleMessages[4]).toEqual('Epoch 3 / 3'); - expect(consoleMessages[5]).toMatch(/.*ms .*us\/step - loss=.*/); - return [2 /*return*/]; - } - }); - }); }); - it('Model.fit with loss, metric and validation, verbose = 2', function () { return __awaiter(_this, void 0, void 0, function () { - var fakeProgbars, consoleMessages, model, numSamples, epochs, batchSize, validationSplit, xs, ys, _i, fakeProgbars_2, fakeProgbar, tickConfigs, i; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fakeProgbars = []; - spyOn(callbacks_1.progressBarHelper, 'ProgressBar') - .and.callFake(function (specs, config) { - var fakeProgbar = new FakeProgbar(specs, config); - fakeProgbars.push(fakeProgbar); - return fakeProgbar; - }); - consoleMessages = []; - spyOn(callbacks_1.progressBarHelper, 'log').and.callFake(function (message) { - consoleMessages.push(message); - }); - model = tf.sequential(); - model.add(tf.layers.dense({ units: 10, inputShape: [8], activation: 'relu' })); - model.add(tf.layers.dense({ units: 1 })); - model.compile({ loss: 'meanSquaredError', optimizer: 'sgd', metrics: ['acc'] }); - numSamples = 40; - epochs = 2; - batchSize = 8; - validationSplit = 0.15; - xs = tf.randomNormal([numSamples, 8]); - ys = tf.randomNormal([numSamples, 1]); - return [4 /*yield*/, model.fit(xs, ys, { epochs: epochs, batchSize: batchSize, validationSplit: validationSplit, verbose: 2 })]; - case 1: - _a.sent(); - // A progbar object is created for each epoch. - expect(fakeProgbars.length).toEqual(2); - for (_i = 0, fakeProgbars_2 = fakeProgbars; _i < fakeProgbars_2.length; _i++) { - fakeProgbar = fakeProgbars_2[_i]; - tickConfigs = fakeProgbar.tickConfigs; - // There are 5 batchs per epoch. There should be 1 tick for epoch batch, - // plus a tick at the end of the epoch. - expect(tickConfigs.length).toEqual(6); - for (i = 0; i < 5; ++i) { - expect(Object.keys(tickConfigs[i])).toEqual([ - 'placeholderForLossesAndMetrics' - ]); - expect(tickConfigs[i]['placeholderForLossesAndMetrics']) - .toMatch(/^acc=.* loss=.*/); - } - expect(tickConfigs[5]).toEqual({ placeholderForLossesAndMetrics: '' }); - } - expect(consoleMessages.length).toEqual(4); - expect(consoleMessages[0]).toEqual('Epoch 1 / 2'); - expect(consoleMessages[1]) - .toMatch(/.*ms .*us\/step - acc=.* loss=.* val_acc=.* val_loss=.*/); - expect(consoleMessages[2]).toEqual('Epoch 2 / 2'); - expect(consoleMessages[3]) - .toMatch(/.*ms .*us\/step - acc=.* loss=.* val_acc=.* val_loss=.*/); - return [2 /*return*/]; - } - }); - }); }); - it('Model.fit does not create ProgbarLogger if verbose is 0', function () { return __awaiter(_this, void 0, void 0, function () { - var fakeProgbars, consoleMessages, model, numSamples, epochs, batchSize, validationSplit, xs, ys; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fakeProgbars = []; - spyOn(callbacks_1.progressBarHelper, 'ProgressBar') - .and.callFake(function (specs, config) { - var fakeProgbar = new FakeProgbar(specs, config); - fakeProgbars.push(fakeProgbar); - return fakeProgbar; - }); - consoleMessages = []; - spyOn(callbacks_1.progressBarHelper, 'log').and.callFake(function (message) { - consoleMessages.push(message); - }); - model = tf.sequential(); - model.add(tf.layers.dense({ units: 10, inputShape: [8], activation: 'relu' })); - model.add(tf.layers.dense({ units: 1 })); - model.compile({ loss: 'meanSquaredError', optimizer: 'sgd', metrics: ['acc'] }); - numSamples = 40; - epochs = 2; - batchSize = 8; - validationSplit = 0.15; - xs = tf.randomNormal([numSamples, 8]); - ys = tf.randomNormal([numSamples, 1]); - return [4 /*yield*/, model.fit(xs, ys, { epochs: epochs, batchSize: batchSize, validationSplit: validationSplit, verbose: 0 })]; - case 1: - _a.sent(); - expect(fakeProgbars.length).toEqual(0); - return [2 /*return*/]; - } - }); - }); }); - it('Model.fitDataset: batchesPerEpoch specified, verbose = 1', function () { return __awaiter(_this, void 0, void 0, function () { - var fakeProgbars, consoleMessages, epochs, xDataset, yDataset, dataset, model; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fakeProgbars = []; - spyOn(callbacks_1.progressBarHelper, 'ProgressBar') - .and.callFake(function (specs, config) { - var fakeProgbar = new FakeProgbar(specs, config); - fakeProgbars.push(fakeProgbar); - return fakeProgbar; - }); - consoleMessages = []; - spyOn(callbacks_1.progressBarHelper, 'log').and.callFake(function (message) { - consoleMessages.push(message); - }); - epochs = 2; - xDataset = tf.data.array([[1, 2], [3, 4], [5, 6], [7, 8]]) - .map(function (x) { return tf.tensor2d(x, [1, 2]); }); - yDataset = tf.data.array([[1], [2], [3], [4]]).map(function (y) { return tf.tensor2d(y, [1, 1]); }); - dataset = tf.data.zip({ xs: xDataset, ys: yDataset }).repeat(epochs); - model = tf.sequential(); - model.add(tf.layers.dense({ units: 1, inputShape: [2] })); - model.compile({ loss: 'meanSquaredError', optimizer: 'sgd' }); - return [4 /*yield*/, model.fitDataset(dataset, { batchesPerEpoch: 4, epochs: epochs, verbose: 1 })]; - case 1: - _a.sent(); - expect(consoleMessages.length).toEqual(4); - expect(consoleMessages[0]).toEqual('Epoch 1 / 2'); - expect(consoleMessages[1]).toMatch(/.*ms .*us\/step - loss=.*/); - expect(consoleMessages[2]).toEqual('Epoch 2 / 2'); - expect(consoleMessages[3]).toMatch(/.*ms .*us\/step - loss=.*/); - return [2 /*return*/]; - } - }); - }); }); - it('Model.fitDataset: batchesPerEpoch unavailable, verbose = 1', function () { return __awaiter(_this, void 0, void 0, function () { - var fakeProgbars, consoleMessages, epochs, xDataset, yDataset, dataset, model; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fakeProgbars = []; - spyOn(callbacks_1.progressBarHelper, 'ProgressBar') - .and.callFake(function (specs, config) { - var fakeProgbar = new FakeProgbar(specs, config); - fakeProgbars.push(fakeProgbar); - return fakeProgbar; - }); - consoleMessages = []; - spyOn(callbacks_1.progressBarHelper, 'log').and.callFake(function (message) { - consoleMessages.push(message); - }); - epochs = 2; - xDataset = tf.data.array([[1, 2], [3, 4], [5, 6], [7, 8]]) - .map(function (x) { return tf.tensor2d(x, [1, 2]); }); - yDataset = tf.data.array([[1], [2], [3], [4]]).map(function (y) { return tf.tensor2d(y, [1, 1]); }); - dataset = tf.data.zip({ xs: xDataset, ys: yDataset }).repeat(epochs); - model = tf.sequential(); - model.add(tf.layers.dense({ units: 1, inputShape: [2] })); - model.compile({ loss: 'meanSquaredError', optimizer: 'sgd' }); - // `batchesPerEpoch` is not specified. Instead, `fitDataset()` relies on - // the `done` field being `true` to terminate the epoch(s). - return [4 /*yield*/, model.fitDataset(dataset, { epochs: epochs, verbose: 1 })]; - case 1: - // `batchesPerEpoch` is not specified. Instead, `fitDataset()` relies on - // the `done` field being `true` to terminate the epoch(s). - _a.sent(); - expect(consoleMessages.length).toEqual(4); - expect(consoleMessages[0]).toEqual('Epoch 1 / 2'); - expect(consoleMessages[1]).toMatch(/.*ms .*us\/step - loss=.*/); - expect(consoleMessages[2]).toEqual('Epoch 2 / 2'); - expect(consoleMessages[3]).toMatch(/.*ms .*us\/step - loss=.*/); - return [2 /*return*/]; - } - }); - }); }); - it('Model.fitDataset: verbose = 0 leads to no logging', function () { return __awaiter(_this, void 0, void 0, function () { - var fakeProgbars, consoleMessages, xDataset, yDataset, dataset, model, history; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fakeProgbars = []; - spyOn(callbacks_1.progressBarHelper, 'ProgressBar') - .and.callFake(function (specs, config) { - var fakeProgbar = new FakeProgbar(specs, config); - fakeProgbars.push(fakeProgbar); - return fakeProgbar; - }); - consoleMessages = []; - spyOn(callbacks_1.progressBarHelper, 'log').and.callFake(function (message) { - consoleMessages.push(message); - }); - xDataset = tf.data.array([[1, 2], [3, 4], [5, 6], [7, 8]]) - .map(function (x) { return tf.tensor2d(x, [1, 2]); }); - yDataset = tf.data.array([[1], [2], [3], [4]]).map(function (y) { return tf.tensor2d(y, [1, 1]); }); - dataset = tf.data.zip({ xs: xDataset, ys: yDataset }); - model = tf.sequential(); - model.add(tf.layers.dense({ units: 1, inputShape: [2] })); - model.compile({ loss: 'meanSquaredError', optimizer: 'sgd' }); - return [4 /*yield*/, model.fitDataset(dataset, { epochs: 1, verbose: 0 })]; - case 1: - history = _a.sent(); - expect(history.history.loss.length).toEqual(1); - expect(consoleMessages.length) - .toEqual(0); // No logging should have happened. - return [2 /*return*/]; - } - }); - }); }); -}); -describe('getSuccinctNumberDisplay', function () { - it('Not finite', function () { - expect(callbacks_1.getSuccinctNumberDisplay(Infinity)).toEqual('Infinity'); - expect(callbacks_1.getSuccinctNumberDisplay(-Infinity)).toEqual('-Infinity'); - expect(callbacks_1.getSuccinctNumberDisplay(NaN)).toEqual('NaN'); - }); - it('zero', function () { - expect(callbacks_1.getSuccinctNumberDisplay(0)).toEqual('0.00'); - }); - it('Finite and positive', function () { - expect(callbacks_1.getSuccinctNumberDisplay(300)).toEqual('300.00'); - expect(callbacks_1.getSuccinctNumberDisplay(30)).toEqual('30.00'); - expect(callbacks_1.getSuccinctNumberDisplay(1)).toEqual('1.00'); - expect(callbacks_1.getSuccinctNumberDisplay(1e-2)).toEqual('0.0100'); - expect(callbacks_1.getSuccinctNumberDisplay(1e-3)).toEqual('1.00e-3'); - expect(callbacks_1.getSuccinctNumberDisplay(4e-3)).toEqual('4.00e-3'); - expect(callbacks_1.getSuccinctNumberDisplay(1e-6)).toEqual('1.00e-6'); - }); - it('Finite and negative', function () { - expect(callbacks_1.getSuccinctNumberDisplay(-300)).toEqual('-300.00'); - expect(callbacks_1.getSuccinctNumberDisplay(-30)).toEqual('-30.00'); - expect(callbacks_1.getSuccinctNumberDisplay(-1)).toEqual('-1.00'); - expect(callbacks_1.getSuccinctNumberDisplay(-1e-2)).toEqual('-0.0100'); - expect(callbacks_1.getSuccinctNumberDisplay(-1e-3)).toEqual('-1.00e-3'); - expect(callbacks_1.getSuccinctNumberDisplay(-4e-3)).toEqual('-4.00e-3'); - expect(callbacks_1.getSuccinctNumberDisplay(-1e-6)).toEqual('-1.00e-6'); - }); -}); -describe('getDisplayDecimalPlaces', function () { - it('Not finite', function () { - expect(callbacks_1.getDisplayDecimalPlaces(Infinity)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(-Infinity)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(NaN)).toEqual(2); - }); - it('zero', function () { - expect(callbacks_1.getDisplayDecimalPlaces(0)).toEqual(2); - }); - it('Finite and positive', function () { - expect(callbacks_1.getDisplayDecimalPlaces(300)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(30)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(1)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(1e-2)).toEqual(4); - expect(callbacks_1.getDisplayDecimalPlaces(1e-3)).toEqual(5); - expect(callbacks_1.getDisplayDecimalPlaces(4e-3)).toEqual(5); - expect(callbacks_1.getDisplayDecimalPlaces(1e-6)).toEqual(8); - }); - it('Finite and negative', function () { - expect(callbacks_1.getDisplayDecimalPlaces(-300)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(-30)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(-1)).toEqual(2); - expect(callbacks_1.getDisplayDecimalPlaces(-1e-2)).toEqual(4); - expect(callbacks_1.getDisplayDecimalPlaces(-1e-3)).toEqual(5); - expect(callbacks_1.getDisplayDecimalPlaces(-4e-3)).toEqual(5); - expect(callbacks_1.getDisplayDecimalPlaces(-1e-6)).toEqual(8); - }); -}); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/canvas_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/canvas_test.d.ts deleted file mode 100644 index 4a6d69728..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/canvas_test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/canvas_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/canvas_test.js deleted file mode 100644 index ad63b4dbd..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/canvas_test.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var _this = this; -Object.defineProperty(exports, "__esModule", { value: true }); -var tf = require("@tensorflow/tfjs"); -var MockContext = /** @class */ (function () { - function MockContext() { - } - MockContext.prototype.getImageData = function (x, y, width, height) { - var data = new Uint8ClampedArray(width * height * 4); - for (var i = 0; i < data.length; ++i) { - data[i] = i + 1; - } - return { data: data }; - }; - return MockContext; -}()); -var MockCanvas = /** @class */ (function () { - function MockCanvas(width, height) { - this.width = width; - this.height = height; - } - MockCanvas.prototype.getContext = function (type) { - return new MockContext(); - }; - return MockCanvas; -}()); -describe('tf.browser.fromPixels with polyfills', function () { - it('accepts a canvas-like element', function () { return __awaiter(_this, void 0, void 0, function () { - var c, t, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - c = new MockCanvas(2, 2); - t = tf.browser.fromPixels(c); - expect(t.dtype).toBe('int32'); - expect(t.shape).toEqual([2, 2, 3]); - _b = (_a = tf.test_util).expectArraysEqual; - return [4 /*yield*/, t.data()]; - case 1: - _b.apply(_a, [_c.sent(), [1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15]]); - return [2 /*return*/]; - } - }); - }); }); - it('accepts a canvas-like element, numChannels=4', function () { return __awaiter(_this, void 0, void 0, function () { - var c, t, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - c = new MockCanvas(2, 2); - t = tf.browser.fromPixels(c, 4); - expect(t.dtype).toBe('int32'); - expect(t.shape).toEqual([2, 2, 4]); - _b = (_a = tf.test_util).expectArraysEqual; - return [4 /*yield*/, t.data()]; - case 1: - _b.apply(_a, [_c.sent(), - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]]); - return [2 /*return*/]; - } - }); - }); }); - it('errors when passed a non-canvas object', function () { - var c = 5; - // tslint:disable-next-line:no-any - expect(function () { return tf.browser.fromPixels(c); }) - .toThrowError(/pixels passed to tf\.browser\.fromPixels\(\) must be either an/); - }); -}); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image.d.ts deleted file mode 100644 index f7658977d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image.d.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { Tensor3D, Tensor4D } from '@tensorflow/tfjs'; -export declare enum ImageType { - JPEG = "jpeg", - PNG = "png", - GIF = "gif", - BMP = "BMP" -} -/** - * Decode a JPEG-encoded image to a 3D Tensor of dtype `int32`. - * - * @param contents The JPEG-encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0. Accepted values are - * 0: use the number of channels in the JPEG-encoded image. - * 1: output a grayscale image. - * 3: output an RGB image. - * @param ratio An optional int. Defaults to 1. Downscaling ratio. It is used - * when image is type Jpeg. - * @param fancyUpscaling An optional bool. Defaults to True. If true use a - * slower but nicer upscaling of the chroma planes. It is used when image is - * type Jpeg. - * @param tryRecoverTruncated An optional bool. Defaults to False. If true try - * to recover an image from truncated input. It is used when image is type - * Jpeg. - * @param acceptableFraction An optional float. Defaults to 1. The minimum - * required fraction of lines before a truncated input is accepted. It is - * used when image is type Jpeg. - * @param dctMethod An optional string. Defaults to "". string specifying a hint - * about the algorithm used for decompression. Defaults to "" which maps to - * a system-specific default. Currently valid values are ["INTEGER_FAST", - * "INTEGER_ACCURATE"]. The hint may be ignored (e.g., the internal jpeg - * library changes to a version that does not have that specific option.) It - * is used when image is type Jpeg. - * @returns A 3D Tensor of dtype `int32` with shape [height, width, 1/3]. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -export declare function decodeJpeg(contents: Uint8Array, channels?: number, ratio?: number, fancyUpscaling?: boolean, tryRecoverTruncated?: boolean, acceptableFraction?: number, dctMethod?: string): Tensor3D; -/** - * Decode a PNG-encoded image to a 3D Tensor of dtype `int32`. - * - * @param contents The PNG-encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0. Accepted values are - * 0: use the number of channels in the PNG-encoded image. - * 1: output a grayscale image. - * 3: output an RGB image. - * 4: output an RGBA image. - * @param dtype The data type of the result. Only `int32` is supported at this - * time. - * @returns A 3D Tensor of dtype `int32` with shape [height, width, 1/3/4]. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -export declare function decodePng(contents: Uint8Array, channels?: number, dtype?: string): Tensor3D; -/** - * Decode the first frame of a BMP-encoded image to a 3D Tensor of dtype - * `int32`. - * - * @param contents The BMP-encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0. Accepted values are - * 0: use the number of channels in the BMP-encoded image. - * 3: output an RGB image. - * 4: output an RGBA image. - * @returns A 3D Tensor of dtype `int32` with shape [height, width, 3/4]. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -export declare function decodeBmp(contents: Uint8Array, channels?: number): Tensor3D; -/** - * Decode the frame(s) of a GIF-encoded image to a 4D Tensor of dtype `int32`. - * - * @param contents The GIF-encoded image in an Uint8Array. - * @returns A 4D Tensor of dtype `int32` with shape [num_frames, height, width, - * 3]. RGB channel order. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -export declare function decodeGif(contents: Uint8Array): Tensor4D; -/** - * Given the encoded bytes of an image, it returns a 3D or 4D tensor of the - * decoded image. Supports BMP, GIF, JPEG and PNG formats. - * - * @param content The encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0, use the number of channels in - * the image. Number of color channels for the decoded image. It is used - * when image is type Png, Bmp, or Jpeg. - * @param dtype The data type of the result. Only `int32` is supported at this - * time. - * @param expandAnimations A boolean which controls the shape of the returned - * op's output. If True, the returned op will produce a 3-D tensor for PNG, - * JPEG, and BMP files; and a 4-D tensor for all GIFs, whether animated or - * not. If, False, the returned op will produce a 3-D tensor for all file - * types and will truncate animated GIFs to the first frame. - * @returns A Tensor with dtype `int32` and a 3- or 4-dimensional shape, - * depending on the file type. For gif file the returned Tensor shape is - * [num_frames, height, width, 3], and for jpeg/png/bmp the returned Tensor - * shape is [height, width, channels] - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -export declare function decodeImage(content: Uint8Array, channels?: number, dtype?: string, expandAnimations?: boolean): Tensor3D | Tensor4D; -/** - * Encodes an image tensor to JPEG. - * - * @param image A 3-D uint8 Tensor of shape [height, width, channels]. - * @param format An optional string from: "", "grayscale", "rgb". - * Defaults to "". Per pixel image format. - * - '': Use a default format based on the number of channels in the image. - * - grayscale: Output a grayscale JPEG image. The channels dimension of - * image must be 1. - * - rgb: Output an RGB JPEG image. The channels dimension of image must - * be 3. - * @param quality An optional int. Defaults to 95. Quality of the compression - * from 0 to 100 (higher is better and slower). - * @param progressive An optional bool. Defaults to False. If True, create a - * JPEG that loads progressively (coarse to fine). - * @param optimizeSize An optional bool. Defaults to False. If True, spend - * CPU/RAM to reduce size with no quality change. - * @param chromaDownsampling An optional bool. Defaults to True. - * See http://en.wikipedia.org/wiki/Chroma_subsampling. - * @param densityUnit An optional string from: "in", "cm". Defaults to "in". - * Unit used to specify x_density and y_density: pixels per inch ('in') or - * centimeter ('cm'). - * @param xDensity An optional int. Defaults to 300. Horizontal pixels per - * density unit. - * @param yDensity An optional int. Defaults to 300. Vertical pixels per - * density unit. - * @param xmpMetadata An optional string. Defaults to "". If not empty, embed - * this XMP metadata in the image header. - * @returns The JPEG encoded data as an Uint8Array. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -export declare function encodeJpeg(image: Tensor3D, format?: '' | 'grayscale' | 'rgb', quality?: number, progressive?: boolean, optimizeSize?: boolean, chromaDownsampling?: boolean, densityUnit?: 'in' | 'cm', xDensity?: number, yDensity?: number, xmpMetadata?: string): Promise; -/** - * Encodes an image tensor to PNG. - * - * @param image A 3-D uint8 Tensor of shape [height, width, channels]. - * @param compression An optional int. Defaults to 1. Compression level. - * @returns The PNG encoded data as an Uint8Array. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -export declare function encodePng(image: Tensor3D, compression?: number): Promise; -/** - * Helper function to get image type based on starting bytes of the image file. - */ -export declare function getImageType(content: Uint8Array): string; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image.js deleted file mode 100644 index ab153f23e..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image.js +++ /dev/null @@ -1,355 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("./nodejs_kernel_backend"); -var ImageType; -(function (ImageType) { - ImageType["JPEG"] = "jpeg"; - ImageType["PNG"] = "png"; - ImageType["GIF"] = "gif"; - ImageType["BMP"] = "BMP"; -})(ImageType = exports.ImageType || (exports.ImageType = {})); -/** - * Decode a JPEG-encoded image to a 3D Tensor of dtype `int32`. - * - * @param contents The JPEG-encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0. Accepted values are - * 0: use the number of channels in the JPEG-encoded image. - * 1: output a grayscale image. - * 3: output an RGB image. - * @param ratio An optional int. Defaults to 1. Downscaling ratio. It is used - * when image is type Jpeg. - * @param fancyUpscaling An optional bool. Defaults to True. If true use a - * slower but nicer upscaling of the chroma planes. It is used when image is - * type Jpeg. - * @param tryRecoverTruncated An optional bool. Defaults to False. If true try - * to recover an image from truncated input. It is used when image is type - * Jpeg. - * @param acceptableFraction An optional float. Defaults to 1. The minimum - * required fraction of lines before a truncated input is accepted. It is - * used when image is type Jpeg. - * @param dctMethod An optional string. Defaults to "". string specifying a hint - * about the algorithm used for decompression. Defaults to "" which maps to - * a system-specific default. Currently valid values are ["INTEGER_FAST", - * "INTEGER_ACCURATE"]. The hint may be ignored (e.g., the internal jpeg - * library changes to a version that does not have that specific option.) It - * is used when image is type Jpeg. - * @returns A 3D Tensor of dtype `int32` with shape [height, width, 1/3]. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -function decodeJpeg(contents, channels, ratio, fancyUpscaling, tryRecoverTruncated, acceptableFraction, dctMethod) { - if (channels === void 0) { channels = 0; } - if (ratio === void 0) { ratio = 1; } - if (fancyUpscaling === void 0) { fancyUpscaling = true; } - if (tryRecoverTruncated === void 0) { tryRecoverTruncated = false; } - if (acceptableFraction === void 0) { acceptableFraction = 1; } - if (dctMethod === void 0) { dctMethod = ''; } - nodejs_kernel_backend_1.ensureTensorflowBackend(); - return tfjs_1.tidy(function () { - return nodejs_kernel_backend_1.nodeBackend() - .decodeJpeg(contents, channels, ratio, fancyUpscaling, tryRecoverTruncated, acceptableFraction, dctMethod) - .toInt(); - }); -} -exports.decodeJpeg = decodeJpeg; -/** - * Decode a PNG-encoded image to a 3D Tensor of dtype `int32`. - * - * @param contents The PNG-encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0. Accepted values are - * 0: use the number of channels in the PNG-encoded image. - * 1: output a grayscale image. - * 3: output an RGB image. - * 4: output an RGBA image. - * @param dtype The data type of the result. Only `int32` is supported at this - * time. - * @returns A 3D Tensor of dtype `int32` with shape [height, width, 1/3/4]. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -function decodePng(contents, channels, dtype) { - if (channels === void 0) { channels = 0; } - if (dtype === void 0) { dtype = 'int32'; } - tfjs_1.util.assert(dtype === 'int32', function () { return 'decodeImage could only return Tensor of type `int32` for now.'; }); - nodejs_kernel_backend_1.ensureTensorflowBackend(); - return tfjs_1.tidy(function () { - return nodejs_kernel_backend_1.nodeBackend().decodePng(contents, channels).toInt(); - }); -} -exports.decodePng = decodePng; -/** - * Decode the first frame of a BMP-encoded image to a 3D Tensor of dtype - * `int32`. - * - * @param contents The BMP-encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0. Accepted values are - * 0: use the number of channels in the BMP-encoded image. - * 3: output an RGB image. - * 4: output an RGBA image. - * @returns A 3D Tensor of dtype `int32` with shape [height, width, 3/4]. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -function decodeBmp(contents, channels) { - if (channels === void 0) { channels = 0; } - nodejs_kernel_backend_1.ensureTensorflowBackend(); - return tfjs_1.tidy(function () { - return nodejs_kernel_backend_1.nodeBackend().decodeBmp(contents, channels).toInt(); - }); -} -exports.decodeBmp = decodeBmp; -/** - * Decode the frame(s) of a GIF-encoded image to a 4D Tensor of dtype `int32`. - * - * @param contents The GIF-encoded image in an Uint8Array. - * @returns A 4D Tensor of dtype `int32` with shape [num_frames, height, width, - * 3]. RGB channel order. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -function decodeGif(contents) { - nodejs_kernel_backend_1.ensureTensorflowBackend(); - return tfjs_1.tidy(function () { - return nodejs_kernel_backend_1.nodeBackend().decodeGif(contents).toInt(); - }); -} -exports.decodeGif = decodeGif; -/** - * Given the encoded bytes of an image, it returns a 3D or 4D tensor of the - * decoded image. Supports BMP, GIF, JPEG and PNG formats. - * - * @param content The encoded image in an Uint8Array. - * @param channels An optional int. Defaults to 0, use the number of channels in - * the image. Number of color channels for the decoded image. It is used - * when image is type Png, Bmp, or Jpeg. - * @param dtype The data type of the result. Only `int32` is supported at this - * time. - * @param expandAnimations A boolean which controls the shape of the returned - * op's output. If True, the returned op will produce a 3-D tensor for PNG, - * JPEG, and BMP files; and a 4-D tensor for all GIFs, whether animated or - * not. If, False, the returned op will produce a 3-D tensor for all file - * types and will truncate animated GIFs to the first frame. - * @returns A Tensor with dtype `int32` and a 3- or 4-dimensional shape, - * depending on the file type. For gif file the returned Tensor shape is - * [num_frames, height, width, 3], and for jpeg/png/bmp the returned Tensor - * shape is [height, width, channels] - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -function decodeImage(content, channels, dtype, expandAnimations) { - if (channels === void 0) { channels = 0; } - if (dtype === void 0) { dtype = 'int32'; } - if (expandAnimations === void 0) { expandAnimations = true; } - tfjs_1.util.assert(dtype === 'int32', function () { return 'decodeImage could only return Tensor of type `int32` for now.'; }); - var imageType = getImageType(content); - // The return tensor has dtype uint8, which is not supported in - // TensorFlow.js, casting it to int32 which is the default dtype for image - // tensor. If the image is BMP, JPEG or PNG type, expanding the tensors - // shape so it becomes Tensor4D, which is the default tensor shape for image - // ([batch,imageHeight,imageWidth, depth]). - switch (imageType) { - case ImageType.JPEG: - return decodeJpeg(content, channels); - case ImageType.PNG: - return decodePng(content, channels); - case ImageType.GIF: - // If not to expand animations, take first frame of the gif and return - // as a 3D tensor. - return tfjs_1.tidy(function () { - var img = decodeGif(content); - return expandAnimations ? img : img.slice(0, 1).squeeze([0]); - }); - case ImageType.BMP: - return decodeBmp(content, channels); - default: - return null; - } -} -exports.decodeImage = decodeImage; -/** - * Encodes an image tensor to JPEG. - * - * @param image A 3-D uint8 Tensor of shape [height, width, channels]. - * @param format An optional string from: "", "grayscale", "rgb". - * Defaults to "". Per pixel image format. - * - '': Use a default format based on the number of channels in the image. - * - grayscale: Output a grayscale JPEG image. The channels dimension of - * image must be 1. - * - rgb: Output an RGB JPEG image. The channels dimension of image must - * be 3. - * @param quality An optional int. Defaults to 95. Quality of the compression - * from 0 to 100 (higher is better and slower). - * @param progressive An optional bool. Defaults to False. If True, create a - * JPEG that loads progressively (coarse to fine). - * @param optimizeSize An optional bool. Defaults to False. If True, spend - * CPU/RAM to reduce size with no quality change. - * @param chromaDownsampling An optional bool. Defaults to True. - * See http://en.wikipedia.org/wiki/Chroma_subsampling. - * @param densityUnit An optional string from: "in", "cm". Defaults to "in". - * Unit used to specify x_density and y_density: pixels per inch ('in') or - * centimeter ('cm'). - * @param xDensity An optional int. Defaults to 300. Horizontal pixels per - * density unit. - * @param yDensity An optional int. Defaults to 300. Vertical pixels per - * density unit. - * @param xmpMetadata An optional string. Defaults to "". If not empty, embed - * this XMP metadata in the image header. - * @returns The JPEG encoded data as an Uint8Array. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -function encodeJpeg(image, format, quality, progressive, optimizeSize, chromaDownsampling, densityUnit, xDensity, yDensity, xmpMetadata) { - if (format === void 0) { format = ''; } - if (quality === void 0) { quality = 95; } - if (progressive === void 0) { progressive = false; } - if (optimizeSize === void 0) { optimizeSize = false; } - if (chromaDownsampling === void 0) { chromaDownsampling = true; } - if (densityUnit === void 0) { densityUnit = 'in'; } - if (xDensity === void 0) { xDensity = 300; } - if (yDensity === void 0) { yDensity = 300; } - if (xmpMetadata === void 0) { xmpMetadata = ''; } - return __awaiter(this, void 0, void 0, function () { - var backendEncodeImage; - return __generator(this, function (_a) { - nodejs_kernel_backend_1.ensureTensorflowBackend(); - backendEncodeImage = function (imageData) { - return nodejs_kernel_backend_1.nodeBackend().encodeJpeg(imageData, image.shape, format, quality, progressive, optimizeSize, chromaDownsampling, densityUnit, xDensity, yDensity, xmpMetadata); - }; - return [2 /*return*/, encodeImage(image, backendEncodeImage)]; - }); - }); -} -exports.encodeJpeg = encodeJpeg; -/** - * Encodes an image tensor to PNG. - * - * @param image A 3-D uint8 Tensor of shape [height, width, channels]. - * @param compression An optional int. Defaults to 1. Compression level. - * @returns The PNG encoded data as an Uint8Array. - * - * @doc {heading: 'Operations', subheading: 'Images', namespace: 'node'} - */ -function encodePng(image, compression) { - if (compression === void 0) { compression = 1; } - return __awaiter(this, void 0, void 0, function () { - var backendEncodeImage; - return __generator(this, function (_a) { - nodejs_kernel_backend_1.ensureTensorflowBackend(); - backendEncodeImage = function (imageData) { - return nodejs_kernel_backend_1.nodeBackend().encodePng(imageData, image.shape, compression); - }; - return [2 /*return*/, encodeImage(image, backendEncodeImage)]; - }); - }); -} -exports.encodePng = encodePng; -function encodeImage(image, backendEncodeImage) { - return __awaiter(this, void 0, void 0, function () { - var encodedDataTensor, _a, _b, encodedPngData; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - _a = backendEncodeImage; - _b = Uint8Array.bind; - return [4 /*yield*/, image.data()]; - case 1: - encodedDataTensor = _a.apply(void 0, [new (_b.apply(Uint8Array, [void 0, _c.sent()]))()]); - // tslint:disable-next-line:no-any - return [4 /*yield*/, encodedDataTensor.data()]; - case 2: - encodedPngData = ( - // tslint:disable-next-line:no-any - _c.sent())[0]; - encodedDataTensor.dispose(); - return [2 /*return*/, encodedPngData]; - } - }); - }); -} -/** - * Helper function to get image type based on starting bytes of the image file. - */ -function getImageType(content) { - // Classify the contents of a file based on starting bytes (aka magic number: - // https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) - // This aligns with TensorFlow Core code: - // https://github.com/tensorflow/tensorflow/blob/4213d5c1bd921f8d5b7b2dc4bbf1eea78d0b5258/tensorflow/core/kernels/decode_image_op.cc#L44 - if (content.length > 3 && content[0] === 255 && content[1] === 216 && - content[2] === 255) { - // JPEG byte chunk starts with `ff d8 ff` - return ImageType.JPEG; - } - else if (content.length > 4 && content[0] === 71 && content[1] === 73 && - content[2] === 70 && content[3] === 56) { - // GIF byte chunk starts with `47 49 46 38` - return ImageType.GIF; - } - else if (content.length > 8 && content[0] === 137 && content[1] === 80 && - content[2] === 78 && content[3] === 71 && content[4] === 13 && - content[5] === 10 && content[6] === 26 && content[7] === 10) { - // PNG byte chunk starts with `\211 P N G \r \n \032 \n (89 50 4E 47 0D 0A - // 1A 0A)` - return ImageType.PNG; - } - else if (content.length > 3 && content[0] === 66 && content[1] === 77) { - // BMP byte chunk starts with `42 4d` - return ImageType.BMP; - } - else { - throw new Error('Expected image (BMP, JPEG, PNG, or GIF), but got unsupported ' + - 'image type'); - } -} -exports.getImageType = getImageType; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image_test.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image_test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image_test.js deleted file mode 100644 index 0c8320b8c..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/image_test.js +++ /dev/null @@ -1,560 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var _this = this; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var tfjs_1 = require("@tensorflow/tfjs"); -// tslint:disable-next-line: no-imports-from-dist -var jasmine_util_1 = require("@tensorflow/tfjs-core/dist/jasmine_util"); -var fs = require("fs"); -var util_1 = require("util"); -var image_1 = require("./image"); -var tf = require("./index"); -var readFile = util_1.promisify(fs.readFile); -describe('decode images', function () { - it('decode png', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_png_test.png')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodePng(uint8array); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [238, 101, 0, 50, 50, 50, 100, 50, 0, 200, 100, 50]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode png 1 channels', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_png_test.png')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array, 1); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 1]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), [130, 50, 59, 124]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode png 3 channels', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_png_test.png')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [238, 101, 0, 50, 50, 50, 100, 50, 0, 200, 100, 50]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode png 4 channels', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_png_4_channel_test.png')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array, 4); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 4]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), [ - 238, 101, 0, 255, 50, 50, 50, 255, 100, 50, 0, 255, 200, 100, 50, 255 - ]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode bmp', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_bmp_test.bmp')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeBmp(uint8array); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [238, 101, 0, 50, 50, 50, 100, 50, 0, 200, 100, 50]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode bmp through decodeImage', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_bmp_test.bmp')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [238, 101, 0, 50, 50, 50, 100, 50, 0, 200, 100, 50]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode jpg', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_jpeg_test.jpeg')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeJpeg(uint8array); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [239, 100, 0, 46, 48, 47, 92, 49, 0, 194, 98, 47]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode jpg 1 channel', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_jpeg_test.jpeg')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array, 1); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 1]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), [130, 47, 56, 121]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode jpg 3 channels', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_jpeg_test.jpeg')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array, 3); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [239, 100, 0, 46, 48, 47, 92, 49, 0, 194, 98, 47]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode jpg with 0 channels, use the number of channels in the ' + - 'JPEG-encoded image', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_jpeg_test.jpeg')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [239, 100, 0, 46, 48, 47, 92, 49, 0, 194, 98, 47]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode jpg with downscale', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_jpeg_test.jpeg')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeJpeg(uint8array, 0, 2); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([1, 1, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), [147, 75, 25]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode gif', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/gif_test.gif')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), [ - 238, 101, 0, 50, 50, 50, 100, 50, 0, 200, 100, 50, - 200, 100, 50, 34, 68, 102, 170, 0, 102, 255, 255, 255 - ]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('decode gif with no expandAnimation', function () { return __awaiter(_this, void 0, void 0, function () { - var beforeNumTensors, uint8array, imageTensor, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/gif_test.gif')]; - case 1: - uint8array = _c.sent(); - imageTensor = tf.node.decodeImage(uint8array, 3, 'int32', false); - expect(imageTensor.dtype).toBe('int32'); - expect(imageTensor.shape).toEqual([2, 2, 3]); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 2: - _b.apply(_a, [_c.sent(), - [238, 101, 0, 50, 50, 50, 100, 50, 0, 200, 100, 50]]); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors + 1); - return [2 /*return*/]; - } - }); - }); }); - it('throw error if request non int32 dtype', function (done) { return __awaiter(_this, void 0, void 0, function () { - var uint8array, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_png_test.png')]; - case 1: - uint8array = _a.sent(); - tf.node.decodeImage(uint8array, 0, 'uint8'); - done.fail(); - return [3 /*break*/, 3]; - case 2: - error_1 = _a.sent(); - expect(error_1.message) - .toBe('decodeImage could only return Tensor of type `int32` for now.'); - done(); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it('throw error if decode invalid image type', function (done) { return __awaiter(_this, void 0, void 0, function () { - var uint8array, error_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, getUint8ArrayFromImage('package.json')]; - case 1: - uint8array = _a.sent(); - tf.node.decodeImage(uint8array); - done.fail(); - return [3 /*break*/, 3]; - case 2: - error_2 = _a.sent(); - expect(error_2.message) - .toBe('Expected image (BMP, JPEG, PNG, or GIF), ' + - 'but got unsupported image type'); - done(); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it('throw error if backend is not tensorflow', function (done) { return __awaiter(_this, void 0, void 0, function () { - var testBackend_1, uint8array, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - testBackend_1 = new jasmine_util_1.TestKernelBackend(); - tfjs_1.registerBackend('fake', function () { return testBackend_1; }); - tfjs_1.setBackend('fake'); - return [4 /*yield*/, getUint8ArrayFromImage('test_objects/images/image_png_test.png')]; - case 1: - uint8array = _a.sent(); - tf.node.decodeImage(uint8array); - done.fail(); - return [3 /*break*/, 3]; - case 2: - err_1 = _a.sent(); - expect(err_1.message) - .toBe('Expect the current backend to be "tensorflow", but got "fake"'); - tfjs_1.setBackend('tensorflow'); - done(); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); -}); -describe('encode images', function () { - it('encodeJpeg', function () { return __awaiter(_this, void 0, void 0, function () { - var imageTensor, beforeNumTensors, jpegEncodedData; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - imageTensor = tf.tensor3d(new Uint8Array([239, 100, 0, 46, 48, 47, 92, 49, 0, 194, 98, 47]), [2, 2, 3]); - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, tf.node.encodeJpeg(imageTensor)]; - case 1: - jpegEncodedData = _a.sent(); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors); - expect(image_1.getImageType(jpegEncodedData)).toEqual(image_1.ImageType.JPEG); - imageTensor.dispose(); - return [2 /*return*/]; - } - }); - }); }); - it('encodeJpeg grayscale', function () { return __awaiter(_this, void 0, void 0, function () { - var imageTensor, beforeNumTensors, jpegEncodedData; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - imageTensor = tf.tensor3d(new Uint8Array([239, 0, 47, 0]), [2, 2, 1]); - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, tf.node.encodeJpeg(imageTensor, 'grayscale')]; - case 1: - jpegEncodedData = _a.sent(); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors); - expect(image_1.getImageType(jpegEncodedData)).toEqual(image_1.ImageType.JPEG); - imageTensor.dispose(); - return [2 /*return*/]; - } - }); - }); }); - it('encodeJpeg with parameters', function () { return __awaiter(_this, void 0, void 0, function () { - var imageTensor, format, quality, progressive, optimizeSize, chromaDownsampling, densityUnit, xDensity, yDensity, beforeNumTensors, jpegEncodedData; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - imageTensor = tf.tensor3d(new Uint8Array([239, 100, 0, 46, 48, 47, 92, 49, 0, 194, 98, 47]), [2, 2, 3]); - format = 'rgb'; - quality = 50; - progressive = true; - optimizeSize = true; - chromaDownsampling = false; - densityUnit = 'cm'; - xDensity = 500; - yDensity = 500; - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, tf.node.encodeJpeg(imageTensor, format, quality, progressive, optimizeSize, chromaDownsampling, densityUnit, xDensity, yDensity)]; - case 1: - jpegEncodedData = _a.sent(); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors); - expect(image_1.getImageType(jpegEncodedData)).toEqual(image_1.ImageType.JPEG); - imageTensor.dispose(); - return [2 /*return*/]; - } - }); - }); }); - it('encodePng', function () { return __awaiter(_this, void 0, void 0, function () { - var imageTensor, beforeNumTensors, pngEncodedData, pngDecodedTensor, pngDecodedData, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - imageTensor = tf.tensor3d(new Uint8Array([239, 100, 0, 46, 48, 47, 92, 49, 0, 194, 98, 47]), [2, 2, 3]); - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, tf.node.encodePng(imageTensor)]; - case 1: - pngEncodedData = _c.sent(); - return [4 /*yield*/, tf.node.decodePng(pngEncodedData)]; - case 2: - pngDecodedTensor = _c.sent(); - return [4 /*yield*/, pngDecodedTensor.data()]; - case 3: - pngDecodedData = _c.sent(); - pngDecodedTensor.dispose(); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors); - expect(image_1.getImageType(pngEncodedData)).toEqual(image_1.ImageType.PNG); - _b = (_a = tfjs_1.test_util).expectArraysEqual; - return [4 /*yield*/, imageTensor.data()]; - case 4: - _b.apply(_a, [_c.sent(), pngDecodedData]); - imageTensor.dispose(); - return [2 /*return*/]; - } - }); - }); }); - it('encodePng grayscale', function () { return __awaiter(_this, void 0, void 0, function () { - var imageTensor, beforeNumTensors, pngEncodedData; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - imageTensor = tf.tensor3d(new Uint8Array([239, 0, 47, 0]), [2, 2, 1]); - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, tf.node.encodePng(imageTensor)]; - case 1: - pngEncodedData = _a.sent(); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors); - expect(image_1.getImageType(pngEncodedData)).toEqual(image_1.ImageType.PNG); - imageTensor.dispose(); - return [2 /*return*/]; - } - }); - }); }); - it('encodePng with parameters', function () { return __awaiter(_this, void 0, void 0, function () { - var imageTensor, compression, beforeNumTensors, pngEncodedData; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - imageTensor = tf.tensor3d(new Uint8Array([239, 100, 0, 46, 48, 47, 92, 49, 0, 194, 98, 47]), [2, 2, 3]); - compression = 4; - beforeNumTensors = tfjs_1.memory().numTensors; - return [4 /*yield*/, tf.node.encodePng(imageTensor, compression)]; - case 1: - pngEncodedData = _a.sent(); - expect(tfjs_1.memory().numTensors).toBe(beforeNumTensors); - expect(image_1.getImageType(pngEncodedData)).toEqual(image_1.ImageType.PNG); - imageTensor.dispose(); - return [2 /*return*/]; - } - }); - }); }); -}); -function getUint8ArrayFromImage(path) { - return __awaiter(this, void 0, void 0, function () { - var image, buf; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, readFile(path)]; - case 1: - image = _a.sent(); - buf = Buffer.from(image); - return [2 /*return*/, new Uint8Array(buf)]; - } - }); - }); -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index.d.ts deleted file mode 100644 index c180dd4e3..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import './register_all_kernels'; -import * as tf from '@tensorflow/tfjs'; -import * as nodeIo from './io/index'; -export declare const version: { - 'tfjs-node': string; - 'tfjs-core': string; - 'tfjs-backend-cpu': string; - 'tfjs-backend-webgl': string; - 'tfjs-data': string; - 'tfjs-layers': string; - 'tfjs-converter': string; - 'tfjs': string; -}; -export declare const io: { - fileSystem: typeof nodeIo.fileSystem; - nodeHTTPRequest: typeof nodeIo.nodeHTTPRequest; - copyModel: typeof import("@tensorflow/tfjs-core/dist/io/model_management").copyModel; - listModels: typeof import("@tensorflow/tfjs-core/dist/io/model_management").listModels; - moveModel: typeof import("@tensorflow/tfjs-core/dist/io/model_management").moveModel; - removeModel: typeof import("@tensorflow/tfjs-core/dist/io/model_management").removeModel; - browserFiles: typeof import("@tensorflow/tfjs-core/dist/io/browser_files").browserFiles; - browserHTTPRequest: typeof import("@tensorflow/tfjs-core/dist/io/http").browserHTTPRequest; - concatenateArrayBuffers: typeof import("@tensorflow/tfjs-core/dist/io/io_utils").concatenateArrayBuffers; - decodeWeights: typeof import("@tensorflow/tfjs-core/dist/io/io_utils").decodeWeights; - encodeWeights: typeof import("@tensorflow/tfjs-core/dist/io/io_utils").encodeWeights; - fromMemory: typeof import("@tensorflow/tfjs-core/dist/io/passthrough").fromMemory; - getLoadHandlers: (url: string | string[], loadOptions?: tf.io.LoadOptions) => tf.io.IOHandler[]; - getModelArtifactsInfoForJSON: typeof import("@tensorflow/tfjs-core/dist/io/io_utils").getModelArtifactsInfoForJSON; - getSaveHandlers: (url: string | string[]) => tf.io.IOHandler[]; - http: typeof import("@tensorflow/tfjs-core/dist/io/http").http; - isHTTPScheme: typeof import("@tensorflow/tfjs-core/dist/io/http").isHTTPScheme; - loadWeights: typeof import("@tensorflow/tfjs-core/dist/io/weights_loader").loadWeights; - registerLoadRouter: (loudRouter: import("@tensorflow/tfjs-core/dist/io/router_registry").IORouter) => void; - registerSaveRouter: (loudRouter: import("@tensorflow/tfjs-core/dist/io/router_registry").IORouter) => void; - weightsLoaderFactory: typeof import("@tensorflow/tfjs-core/dist/io/weights_loader").weightsLoaderFactory; - withSaveHandler: typeof import("@tensorflow/tfjs-core/dist/io/passthrough").withSaveHandler; -}; -export * from '@tensorflow/tfjs'; -export * from './node'; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index.js deleted file mode 100644 index 8c8ec0dd5..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -// Register all kernels. -require("./register_all_kernels"); -var tf = require("@tensorflow/tfjs"); -var path = require("path"); -var callbacks_1 = require("./callbacks"); -var file_system_1 = require("./io/file_system"); -var nodeIo = require("./io/index"); -var nodejs_kernel_backend_1 = require("./nodejs_kernel_backend"); -var nodeVersion = require("./version"); -// tslint:disable-next-line:no-require-imports -var binary = require('node-pre-gyp'); -var bindingPath = binary.find(path.resolve(path.join(__dirname, '/../package.json'))); -// Check if the node native addon module exists. -// tslint:disable-next-line:no-require-imports -var fs = require('fs'); -if (!fs.existsSync(bindingPath)) { - throw new Error("The Node.js native addon module (tfjs_binding.node) can not " + - "be found at path: " + String(bindingPath) + ". \nPlease run command " + - "'npm rebuild @tensorflow/tfjs-node" + - (String(bindingPath).indexOf('tfjs-node-gpu') > 0 ? "-gpu" : "") + - " --build-addon-from-source' to " + - "rebuild the native addon module. \nIf you have problem with building " + - "the addon module, please check " + - "https://github.com/tensorflow/tfjs/blob/master/tfjs-node/" + - "WINDOWS_TROUBLESHOOTING.md or file an issue."); -} -// tslint:disable-next-line:no-require-imports -var bindings = require(bindingPath); -// Merge version and io namespaces. -exports.version = __assign({}, tf.version, { 'tfjs-node': nodeVersion.version }); -exports.io = __assign({}, tf.io, nodeIo); -// Export all union package symbols -__export(require("@tensorflow/tfjs")); -__export(require("./node")); -// tslint:disable-next-line:no-require-imports -var pjson = require('../package.json'); -// Side effects for default initialization of Node backend. -tf.registerBackend('tensorflow', function () { - return new nodejs_kernel_backend_1.NodeJSKernelBackend(bindings, pjson.name); -}, 3 /* priority */); -var success = tf.setBackend('tensorflow'); -if (!success) { - throw new Error("Could not initialize TensorFlow backend."); -} -// Register the model saving and loading handlers for the 'file://' URL scheme. -tf.io.registerLoadRouter(file_system_1.nodeFileSystemRouter); -tf.io.registerSaveRouter(file_system_1.nodeFileSystemRouter); -// Register the ProgbarLogger for Model.fit() at verbosity level 1. -tf.registerCallbackConstructor(1, callbacks_1.ProgbarLogger); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index_test.d.ts deleted file mode 100644 index 4a6d69728..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index_test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index_test.js deleted file mode 100644 index ab1bacda4..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/index_test.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var _this = this; -Object.defineProperty(exports, "__esModule", { value: true }); -var tf = require("./index"); -describe('Ops are exported from index and work', function () { - it('tf.mul works', function () { return __awaiter(_this, void 0, void 0, function () { - var a, b, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - a = tf.tensor1d([1, 2, 3]); - b = tf.tensor1d([3, 4, 5]); - _b = (_a = tf.test_util).expectArraysClose; - return [4 /*yield*/, a.mul(b).data()]; - case 1: - _b.apply(_a, [_c.sent(), [3, 8, 15]]); - return [2 /*return*/]; - } - }); - }); }); -}); -describe('packages merge', function () { - it('versions', function () { - expect(tf.version['tfjs']).toBeDefined(); - expect(tf.version['tfjs-core']).toBeDefined(); - var expectedNodeVersion = - // tslint:disable-next-line:no-require-imports - require('../package.json').version; - expect(tf.version['tfjs-node']).toBe(expectedNodeVersion); - }); - it('symbols merge', function () { - expect(tf.mul).toBeDefined(); - expect(tf.layers.dense).toBeDefined(); - expect(tf.io.listModels).toBeDefined(); - expect(tf.io.nodeHTTPRequest).toBeDefined(); - }); -}); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors.d.ts deleted file mode 100644 index 4929310b8..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { Shape } from '@tensorflow/tfjs'; -/** - * Node.js-specific tensor type: int64-type scalar. - * - * This class is created for a specific purpose: to support - * writing `step`s to TensorBoard via op-kernel bindings. - * `step` is required to have an int64 dtype, but TensorFlow.js - * (tfjs-core) doesn't have a built-in int64 dtype. This is - * related to a lack of `Int64Array` or `Uint64Array` typed - * array in basic JavaScript. - * - * This class is introduced as a workaround. - */ -export declare class Int64Scalar { - readonly value: number; - readonly dtype: string; - readonly rank: number; - private valueArray_; - private static endiannessOkay_; - constructor(value: number); - readonly shape: Shape; - /** Get the Int32Array that represents the int64 value. */ - readonly valueArray: Int32Array; -} -/** - * This method encodes a Int32Array as Int64 layout in order to create TF_INT64 - * tensor through binding. - */ -export declare function encodeInt32ArrayAsInt64(value: Int32Array): Int32Array; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors.js deleted file mode 100644 index 3cccb15ff..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var os_1 = require("os"); -var INT32_MAX = 2147483648; -/** - * Node.js-specific tensor type: int64-type scalar. - * - * This class is created for a specific purpose: to support - * writing `step`s to TensorBoard via op-kernel bindings. - * `step` is required to have an int64 dtype, but TensorFlow.js - * (tfjs-core) doesn't have a built-in int64 dtype. This is - * related to a lack of `Int64Array` or `Uint64Array` typed - * array in basic JavaScript. - * - * This class is introduced as a workaround. - */ -var Int64Scalar = /** @class */ (function () { - function Int64Scalar(value) { - this.value = value; - this.dtype = 'int64'; - this.rank = 1; - // The reason why we need to check endianness of the machine here is - // negative int64 values and the way in which we represent them - // using Int32Arrays in JavaScript. We represent each int64 value with - // two consecutive elements of an Int32Array. For positive values, - // the high part is simply zero; for negative values, the high part - // should be -1. The ordering of the low and high parts assumes - // little endian (i.e., least significant digits appear first). - // This assumption is checked by the lines below. - if (Int64Scalar.endiannessOkay_ == null) { - if (os_1.endianness() !== 'LE') { - throw new Error("Int64Scalar does not support endianness of this machine: " + - ("" + os_1.endianness())); - } - Int64Scalar.endiannessOkay_ = true; - } - tfjs_1.util.assert(value > -INT32_MAX && value < INT32_MAX - 1, function () { - return "Got a value outside of the bound of values supported for int64 " + - ("dtype ([-" + INT32_MAX + ", " + (INT32_MAX - 1) + "]): " + value); - }); - tfjs_1.util.assert(Number.isInteger(value), function () { return "Expected value to be an integer, but got " + value; }); - // We use two int32 elements to represent a int64 value. This assumes - // little endian, which is checked above. - var highPart = value >= 0 ? 0 : -1; - var lowPart = value % INT32_MAX; - this.valueArray_ = new Int32Array([lowPart, highPart]); - } - Object.defineProperty(Int64Scalar.prototype, "shape", { - get: function () { - return []; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Int64Scalar.prototype, "valueArray", { - /** Get the Int32Array that represents the int64 value. */ - get: function () { - return this.valueArray_; - }, - enumerable: true, - configurable: true - }); - return Int64Scalar; -}()); -exports.Int64Scalar = Int64Scalar; -/** - * This method encodes a Int32Array as Int64 layout in order to create TF_INT64 - * tensor through binding. - */ -function encodeInt32ArrayAsInt64(value) { - if (os_1.endianness() !== 'LE') { - throw new Error("Int64Scalar does not support endianness of this machine: " + - ("" + os_1.endianness())); - } - var buffer = new Int32Array(value.length * 2); - for (var i = 0; i < value.length; i++) { - buffer[i * 2] = value[i]; - } - return buffer; -} -exports.encodeInt32ArrayAsInt64 = encodeInt32ArrayAsInt64; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors_test.d.ts deleted file mode 100644 index 4a6d69728..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors_test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors_test.js deleted file mode 100644 index 2f3e904a6..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/int64_tensors_test.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var int64_tensors_1 = require("./int64_tensors"); -describe('int64 tensors', function () { - it('positive value', function () { - var x = new int64_tensors_1.Int64Scalar(42); - expect(x.dtype).toEqual('int64'); - var valueArray = x.valueArray; - expect(valueArray.constructor.name).toEqual('Int32Array'); - expect(valueArray.length).toEqual(2); - expect(valueArray[0]).toEqual(42); - expect(valueArray[1]).toEqual(0); - }); - it('zero value', function () { - var x = new int64_tensors_1.Int64Scalar(0); - expect(x.dtype).toEqual('int64'); - var valueArray = x.valueArray; - expect(valueArray.constructor.name).toEqual('Int32Array'); - expect(valueArray.length).toEqual(2); - expect(valueArray[0]).toEqual(0); - expect(valueArray[1]).toEqual(0); - }); - it('negative value', function () { - var x = new int64_tensors_1.Int64Scalar(-3); - expect(x.dtype).toEqual('int64'); - var valueArray = x.valueArray; - expect(valueArray.constructor.name).toEqual('Int32Array'); - expect(valueArray.length).toEqual(2); - expect(valueArray[0]).toEqual(-3); - expect(valueArray[1]).toEqual(-1); - }); - it('Non-integer value leads to error', function () { - expect(function () { return new int64_tensors_1.Int64Scalar(0.4); }).toThrowError(/integer/); - expect(function () { return new int64_tensors_1.Int64Scalar(-3.2); }).toThrowError(/integer/); - }); - it('Out-of-bound value leads to error', function () { - expect(function () { return new int64_tensors_1.Int64Scalar(2147483648); }).toThrowError(/bound/); - expect(function () { return new int64_tensors_1.Int64Scalar(2147483648 * 2); }).toThrowError(/bound/); - expect(function () { return new int64_tensors_1.Int64Scalar(-2147483648 - 1); }).toThrowError(/bound/); - }); - it('encode int32array as int64 layout', function () { - var input = Int32Array.from([2, 10]); - var valueArray = int64_tensors_1.encodeInt32ArrayAsInt64(input); - expect(valueArray.length).toEqual(4); - expect(valueArray[0]).toEqual(2); - expect(valueArray[1]).toEqual(0); - expect(valueArray[2]).toEqual(10); - expect(valueArray[3]).toEqual(0); - }); -}); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system.d.ts deleted file mode 100644 index 46058af46..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import * as tf from '@tensorflow/tfjs'; -export declare class NodeFileSystem implements tf.io.IOHandler { - static readonly URL_SCHEME = "file://"; - protected readonly path: string | string[]; - readonly MODEL_JSON_FILENAME = "model.json"; - readonly WEIGHTS_BINARY_FILENAME = "weights.bin"; - readonly MODEL_BINARY_FILENAME = "tensorflowjs.pb"; - /** - * Constructor of the NodeFileSystem IOHandler. - * @param path A single path or an Array of paths. - * For saving: expects a single path pointing to an existing or nonexistent - * directory. If the directory does not exist, it will be - * created. - * For loading: - * - If the model has JSON topology (e.g., `tf.Model`), a single path - * pointing to the JSON file (usually named `model.json`) is expected. - * The JSON file is expected to contain `modelTopology` and/or - * `weightsManifest`. If `weightManifest` exists, the values of the - * weights will be loaded from relative paths (relative to the directory - * of `model.json`) as contained in `weightManifest`. - * - If the model has binary (protocol buffer GraphDef) topology, - * an Array of two paths is expected: the first path should point to the - * .pb file and the second path should point to the weight manifest - * JSON file. - */ - constructor(path: string | string[]); - save(modelArtifacts: tf.io.ModelArtifacts): Promise; - load(): Promise; - protected loadBinaryModel(): Promise; - protected loadJSONModel(): Promise; - private loadWeights; - /** - * For each item in `this.path`, creates a directory at the path or verify - * that the path exists as a directory. - */ - protected createOrVerifyDirectory(): Promise; -} -export declare const nodeFileSystemRouter: (url: string | string[]) => NodeFileSystem; -/** - * Factory function for Node.js native file system IO Handler. - * - * @param path A single path or an Array of paths. - * For saving: expects a single path pointing to an existing or nonexistent - * directory. If the directory does not exist, it will be - * created. - * For loading: - * - If the model has JSON topology (e.g., `tf.Model`), a single path - * pointing to the JSON file (usually named `model.json`) is expected. - * The JSON file is expected to contain `modelTopology` and/or - * `weightsManifest`. If `weightManifest` exists, the values of the - * weights will be loaded from relative paths (relative to the directory - * of `model.json`) as contained in `weightManifest`. - * - If the model has binary (protocol buffer GraphDef) topology, - * an Array of two paths is expected: the first path should point to the - * .pb file and the second path should point to the weight manifest - * JSON file. - */ -export declare function fileSystem(path: string | string[]): NodeFileSystem; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system.js deleted file mode 100644 index ab00112e9..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system.js +++ /dev/null @@ -1,383 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var tf = require("@tensorflow/tfjs"); -var fs = require("fs"); -var path_1 = require("path"); -var util_1 = require("util"); -var io_utils_1 = require("./io_utils"); -var stat = util_1.promisify(fs.stat); -var writeFile = util_1.promisify(fs.writeFile); -var readFile = util_1.promisify(fs.readFile); -var mkdir = util_1.promisify(fs.mkdir); -function doesNotExistHandler(name) { - return function (e) { - switch (e.code) { - case 'ENOENT': - throw new Error(name + " " + e.path + " does not exist: loading failed"); - default: - throw e; - } - }; -} -var NodeFileSystem = /** @class */ (function () { - /** - * Constructor of the NodeFileSystem IOHandler. - * @param path A single path or an Array of paths. - * For saving: expects a single path pointing to an existing or nonexistent - * directory. If the directory does not exist, it will be - * created. - * For loading: - * - If the model has JSON topology (e.g., `tf.Model`), a single path - * pointing to the JSON file (usually named `model.json`) is expected. - * The JSON file is expected to contain `modelTopology` and/or - * `weightsManifest`. If `weightManifest` exists, the values of the - * weights will be loaded from relative paths (relative to the directory - * of `model.json`) as contained in `weightManifest`. - * - If the model has binary (protocol buffer GraphDef) topology, - * an Array of two paths is expected: the first path should point to the - * .pb file and the second path should point to the weight manifest - * JSON file. - */ - function NodeFileSystem(path) { - this.MODEL_JSON_FILENAME = 'model.json'; - this.WEIGHTS_BINARY_FILENAME = 'weights.bin'; - this.MODEL_BINARY_FILENAME = 'tensorflowjs.pb'; - if (Array.isArray(path)) { - tf.util.assert(path.length === 2, function () { return 'file paths must have a length of 2, ' + - ("(actual length is " + path.length + ")."); }); - this.path = path.map(function (p) { return path_1.resolve(p); }); - } - else { - this.path = path_1.resolve(path); - } - } - NodeFileSystem.prototype.save = function (modelArtifacts) { - return __awaiter(this, void 0, void 0, function () { - var weightsBinPath, weightsManifest, modelJSON, modelJSONPath; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (Array.isArray(this.path)) { - throw new Error('Cannot perform saving to multiple paths.'); - } - return [4 /*yield*/, this.createOrVerifyDirectory()]; - case 1: - _a.sent(); - if (!(modelArtifacts.modelTopology instanceof ArrayBuffer)) return [3 /*break*/, 2]; - throw new Error('NodeFileSystem.save() does not support saving model topology ' + - 'in binary format yet.'); - case 2: - weightsBinPath = path_1.join(this.path, this.WEIGHTS_BINARY_FILENAME); - weightsManifest = [{ - paths: [this.WEIGHTS_BINARY_FILENAME], - weights: modelArtifacts.weightSpecs - }]; - modelJSON = { - modelTopology: modelArtifacts.modelTopology, - weightsManifest: weightsManifest, - format: modelArtifacts.format, - generatedBy: modelArtifacts.generatedBy, - convertedBy: modelArtifacts.convertedBy - }; - if (modelArtifacts.trainingConfig != null) { - modelJSON.trainingConfig = modelArtifacts.trainingConfig; - } - if (modelArtifacts.signature != null) { - modelJSON.signature = modelArtifacts.signature; - } - if (modelArtifacts.userDefinedMetadata != null) { - modelJSON.userDefinedMetadata = modelArtifacts.userDefinedMetadata; - } - modelJSONPath = path_1.join(this.path, this.MODEL_JSON_FILENAME); - return [4 /*yield*/, writeFile(modelJSONPath, JSON.stringify(modelJSON), 'utf8')]; - case 3: - _a.sent(); - return [4 /*yield*/, writeFile(weightsBinPath, Buffer.from(modelArtifacts.weightData), 'binary')]; - case 4: - _a.sent(); - return [2 /*return*/, { - // TODO(cais): Use explicit tf.io.ModelArtifactsInfo type below once it - // is available. - // tslint:disable-next-line:no-any - modelArtifactsInfo: io_utils_1.getModelArtifactsInfoForJSON(modelArtifacts) - }]; - } - }); - }); - }; - NodeFileSystem.prototype.load = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, Array.isArray(this.path) ? this.loadBinaryModel() : - this.loadJSONModel()]; - }); - }); - }; - NodeFileSystem.prototype.loadBinaryModel = function () { - return __awaiter(this, void 0, void 0, function () { - var topologyPath, weightManifestPath, topology, weightManifest, modelTopology, weightsManifest, _a, _b, modelArtifacts, _c, weightSpecs, weightData; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - topologyPath = this.path[0]; - weightManifestPath = this.path[1]; - return [4 /*yield*/, stat(topologyPath).catch(doesNotExistHandler('Topology Path'))]; - case 1: - topology = _d.sent(); - return [4 /*yield*/, stat(weightManifestPath) - .catch(doesNotExistHandler('Weight Manifest Path'))]; - case 2: - weightManifest = _d.sent(); - // `this.path` can be either a directory or a file. If it is a file, assume - // it is model.json file. - if (!topology.isFile()) { - throw new Error('File specified for topology is not a file!'); - } - if (!weightManifest.isFile()) { - throw new Error('File specified for the weight manifest is not a file!'); - } - return [4 /*yield*/, readFile(this.path[0])]; - case 3: - modelTopology = _d.sent(); - _b = (_a = JSON).parse; - return [4 /*yield*/, readFile(this.path[1], 'utf8')]; - case 4: - weightsManifest = _b.apply(_a, [_d.sent()]); - modelArtifacts = { - modelTopology: modelTopology, - }; - return [4 /*yield*/, this.loadWeights(weightsManifest, this.path[1])]; - case 5: - _c = _d.sent(), weightSpecs = _c[0], weightData = _c[1]; - modelArtifacts.weightSpecs = weightSpecs; - modelArtifacts.weightData = weightData; - return [2 /*return*/, modelArtifacts]; - } - }); - }); - }; - NodeFileSystem.prototype.loadJSONModel = function () { - return __awaiter(this, void 0, void 0, function () { - var path, info, modelJSON, _a, _b, modelArtifacts, _c, weightSpecs, weightData; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - path = this.path; - return [4 /*yield*/, stat(path).catch(doesNotExistHandler('Path'))]; - case 1: - info = _d.sent(); - if (!info.isFile()) return [3 /*break*/, 5]; - _b = (_a = JSON).parse; - return [4 /*yield*/, readFile(path, 'utf8')]; - case 2: - modelJSON = _b.apply(_a, [_d.sent()]); - modelArtifacts = { - modelTopology: modelJSON.modelTopology, - format: modelJSON.format, - generatedBy: modelJSON.generatedBy, - convertedBy: modelJSON.convertedBy - }; - if (!(modelJSON.weightsManifest != null)) return [3 /*break*/, 4]; - return [4 /*yield*/, this.loadWeights(modelJSON.weightsManifest, path)]; - case 3: - _c = _d.sent(), weightSpecs = _c[0], weightData = _c[1]; - modelArtifacts.weightSpecs = weightSpecs; - modelArtifacts.weightData = weightData; - _d.label = 4; - case 4: - if (modelJSON.trainingConfig != null) { - modelArtifacts.trainingConfig = modelJSON.trainingConfig; - } - if (modelJSON.signature != null) { - modelArtifacts.signature = modelJSON.signature; - } - if (modelJSON.userDefinedMetadata != null) { - modelArtifacts.userDefinedMetadata = modelJSON.userDefinedMetadata; - } - return [2 /*return*/, modelArtifacts]; - case 5: throw new Error('The path to load from must be a file. Loading from a directory ' + - 'is not supported.'); - } - }); - }); - }; - NodeFileSystem.prototype.loadWeights = function (weightsManifest, path) { - return __awaiter(this, void 0, void 0, function () { - var dirName, buffers, weightSpecs, _i, weightsManifest_1, group, _a, _b, path_2, weightFilePath, buffer; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - dirName = path_1.dirname(path); - buffers = []; - weightSpecs = []; - _i = 0, weightsManifest_1 = weightsManifest; - _c.label = 1; - case 1: - if (!(_i < weightsManifest_1.length)) return [3 /*break*/, 7]; - group = weightsManifest_1[_i]; - _a = 0, _b = group.paths; - _c.label = 2; - case 2: - if (!(_a < _b.length)) return [3 /*break*/, 5]; - path_2 = _b[_a]; - weightFilePath = path_1.join(dirName, path_2); - return [4 /*yield*/, readFile(weightFilePath) - .catch(doesNotExistHandler('Weight file'))]; - case 3: - buffer = _c.sent(); - buffers.push(buffer); - _c.label = 4; - case 4: - _a++; - return [3 /*break*/, 2]; - case 5: - weightSpecs.push.apply(weightSpecs, group.weights); - _c.label = 6; - case 6: - _i++; - return [3 /*break*/, 1]; - case 7: return [2 /*return*/, [weightSpecs, io_utils_1.toArrayBuffer(buffers)]]; - } - }); - }); - }; - /** - * For each item in `this.path`, creates a directory at the path or verify - * that the path exists as a directory. - */ - NodeFileSystem.prototype.createOrVerifyDirectory = function () { - return __awaiter(this, void 0, void 0, function () { - var paths, _i, paths_1, path, e_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - paths = Array.isArray(this.path) ? this.path : [this.path]; - _i = 0, paths_1 = paths; - _a.label = 1; - case 1: - if (!(_i < paths_1.length)) return [3 /*break*/, 9]; - path = paths_1[_i]; - _a.label = 2; - case 2: - _a.trys.push([2, 4, , 8]); - return [4 /*yield*/, mkdir(path)]; - case 3: - _a.sent(); - return [3 /*break*/, 8]; - case 4: - e_1 = _a.sent(); - if (!(e_1.code === 'EEXIST')) return [3 /*break*/, 6]; - return [4 /*yield*/, stat(path)]; - case 5: - if ((_a.sent()).isFile()) { - throw new Error("Path " + path + " exists as a file. The path must be " + - "nonexistent or point to a directory."); - } - return [3 /*break*/, 7]; - case 6: throw e_1; - case 7: return [3 /*break*/, 8]; - case 8: - _i++; - return [3 /*break*/, 1]; - case 9: return [2 /*return*/]; - } - }); - }); - }; - NodeFileSystem.URL_SCHEME = 'file://'; - return NodeFileSystem; -}()); -exports.NodeFileSystem = NodeFileSystem; -exports.nodeFileSystemRouter = function (url) { - if (Array.isArray(url)) { - if (url.every(function (urlElement) { return urlElement.startsWith(NodeFileSystem.URL_SCHEME); })) { - return new NodeFileSystem(url.map(function (urlElement) { return urlElement.slice(NodeFileSystem.URL_SCHEME.length); })); - } - else { - return null; - } - } - else { - if (url.startsWith(NodeFileSystem.URL_SCHEME)) { - return new NodeFileSystem(url.slice(NodeFileSystem.URL_SCHEME.length)); - } - else { - return null; - } - } -}; -// Registration of `nodeFileSystemRouter` is done in index.ts. -/** - * Factory function for Node.js native file system IO Handler. - * - * @param path A single path or an Array of paths. - * For saving: expects a single path pointing to an existing or nonexistent - * directory. If the directory does not exist, it will be - * created. - * For loading: - * - If the model has JSON topology (e.g., `tf.Model`), a single path - * pointing to the JSON file (usually named `model.json`) is expected. - * The JSON file is expected to contain `modelTopology` and/or - * `weightsManifest`. If `weightManifest` exists, the values of the - * weights will be loaded from relative paths (relative to the directory - * of `model.json`) as contained in `weightManifest`. - * - If the model has binary (protocol buffer GraphDef) topology, - * an Array of two paths is expected: the first path should point to the - * .pb file and the second path should point to the weight manifest - * JSON file. - */ -function fileSystem(path) { - return new NodeFileSystem(path); -} -exports.fileSystem = fileSystem; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system_test.d.ts deleted file mode 100644 index 4a6d69728..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system_test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system_test.js deleted file mode 100644 index b3b5656fd..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/file_system_test.js +++ /dev/null @@ -1,578 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var _this = this; -Object.defineProperty(exports, "__esModule", { value: true }); -var tf = require("@tensorflow/tfjs"); -var fs = require("fs"); -var path = require("path"); -var rimraf = require("rimraf"); -var util_1 = require("util"); -var tfn = require("../index"); -var file_system_1 = require("./file_system"); -describe('File system IOHandler', function () { - var mkdtemp = util_1.promisify(fs.mkdtemp); - var readFile = util_1.promisify(fs.readFile); - var writeFile = util_1.promisify(fs.writeFile); - var rimrafPromise = util_1.promisify(rimraf); - var modelTopology1 = { - 'class_name': 'Sequential', - 'keras_version': '2.1.6', - 'config': [{ - 'class_name': 'Dense', - 'config': { - 'kernel_initializer': { - 'class_name': 'VarianceScaling', - 'config': { - 'distribution': 'uniform', - 'scale': 1.0, - 'seed': null, - 'mode': 'fan_avg' - } - }, - 'name': 'dense', - 'kernel_constraint': null, - 'bias_regularizer': null, - 'bias_constraint': null, - 'dtype': 'float32', - 'activation': 'linear', - 'trainable': true, - 'kernel_regularizer': null, - 'bias_initializer': { 'class_name': 'Zeros', 'config': {} }, - 'units': 1, - 'batch_input_shape': [null, 3], - 'use_bias': true, - 'activity_regularizer': null - } - }], - 'backend': 'tensorflow' - }; - var weightSpecs1 = [ - { - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }, - { - name: 'dense/bias', - shape: [1], - dtype: 'float32', - } - ]; - var weightData1 = new ArrayBuffer(16); - var testDir; - beforeEach(function (done) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, mkdtemp('tfjs_node_fs_test')]; - case 1: - testDir = _a.sent(); - done(); - return [2 /*return*/]; - } - }); - }); }); - afterEach(function (done) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, rimrafPromise(testDir)]; - case 1: - _a.sent(); - done(); - return [2 /*return*/]; - } - }); - }); }); - it('save succeeds with newly created directory', function (done) { return __awaiter(_this, void 0, void 0, function () { - var t0, dir, handler; - var _this = this; - return __generator(this, function (_a) { - t0 = new Date(); - dir = path.join(testDir, 'save-destination'); - handler = tf.io.getSaveHandlers("file://" + dir)[0]; - handler - .save({ - modelTopology: modelTopology1, - weightSpecs: weightSpecs1, - weightData: weightData1, - }) - .then(function (saveResult) { return __awaiter(_this, void 0, void 0, function () { - var modelJSONPath, weightsBinPath, modelJSON, _a, _b, weightData, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - expect(saveResult.modelArtifactsInfo.dateSaved.getTime()) - .toBeGreaterThanOrEqual(t0.getTime()); - expect(saveResult.modelArtifactsInfo.modelTopologyType) - .toEqual('JSON'); - modelJSONPath = path.join(dir, 'model.json'); - weightsBinPath = path.join(dir, 'weights.bin'); - _b = (_a = JSON).parse; - return [4 /*yield*/, readFile(modelJSONPath, 'utf8')]; - case 1: - modelJSON = _b.apply(_a, [_d.sent()]); - expect(modelJSON.modelTopology).toEqual(modelTopology1); - expect(modelJSON.weightsManifest.length).toEqual(1); - expect(modelJSON.weightsManifest[0].paths).toEqual(['weights.bin']); - expect(modelJSON.weightsManifest[0].weights).toEqual(weightSpecs1); - _c = Uint8Array.bind; - return [4 /*yield*/, readFile(weightsBinPath)]; - case 2: - weightData = new (_c.apply(Uint8Array, [void 0, _d.sent()]))(); - expect(weightData.length).toEqual(16); - weightData.forEach(function (value) { return expect(value).toEqual(0); }); - // Verify the content of the files. - done(); - return [2 /*return*/]; - } - }); - }); }) - .catch(function (err) { return done.fail(err.stack); }); - return [2 /*return*/]; - }); - }); }); - it('save fails if path exists as a file', function (done) { return __awaiter(_this, void 0, void 0, function () { - var dir, handler; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - dir = path.join(testDir, 'save-destination'); - // Create a file at the locatin. - return [4 /*yield*/, writeFile(dir, 'foo')]; - case 1: - // Create a file at the locatin. - _a.sent(); - handler = tf.io.getSaveHandlers("file://" + dir)[0]; - handler - .save({ - modelTopology: modelTopology1, - weightSpecs: weightSpecs1, - weightData: weightData1, - }) - .then(function (saveResult) { - done.fail('Saving to path of existing file succeeded unexpectedly.'); - }) - .catch(function (err) { - expect(err.message).toMatch(/.*exists as a file.*directory.*/); - done(); - }); - return [2 /*return*/]; - } - }); - }); }); - it('save-load round trip: one weight file', function (done) { - var handler1 = tf.io.getSaveHandlers("file://" + testDir)[0]; - handler1 - .save({ - modelTopology: modelTopology1, - weightSpecs: weightSpecs1, - weightData: weightData1, - }) - .then(function (saveResult) { - var modelJSONPath = path.join(testDir, 'model.json'); - var handler2 = tf.io.getLoadHandlers("file://" + modelJSONPath)[0]; - handler2.load() - .then(function (modelArtifacts) { - expect(modelArtifacts.modelTopology).toEqual(modelTopology1); - expect(modelArtifacts.weightSpecs).toEqual(weightSpecs1); - expect(new Float32Array(modelArtifacts.weightData)) - .toEqual(new Float32Array([0, 0, 0, 0])); - done(); - }) - .catch(function (err) { return done.fail(err.stack); }); - }) - .catch(function (err) { return done.fail(err.stack); }); - }); - describe('load json model', function () { - it('load: two weight files', function (done) { return __awaiter(_this, void 0, void 0, function () { - var weightsManifest, modelJSON, modelJSONPath, weightsData1, weightsData2, handler; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - weightsManifest = [ - { - paths: ['weights.1.bin'], - weights: [{ - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }], - }, - { - paths: ['weights.2.bin'], - weights: [{ - name: 'dense/bias', - shape: [1], - dtype: 'float32', - }] - } - ]; - modelJSON = { - modelTopology: modelTopology1, - weightsManifest: weightsManifest, - }; - modelJSONPath = path.join(testDir, 'model.json'); - return [4 /*yield*/, writeFile(modelJSONPath, JSON.stringify(modelJSON), 'utf8')]; - case 1: - _a.sent(); - weightsData1 = Buffer.from(new Float32Array([-1.1, -3.3, -3.3]).buffer); - return [4 /*yield*/, writeFile(path.join(testDir, 'weights.1.bin'), weightsData1, 'binary')]; - case 2: - _a.sent(); - weightsData2 = Buffer.from(new Float32Array([-7.7]).buffer); - return [4 /*yield*/, writeFile(path.join(testDir, 'weights.2.bin'), weightsData2, 'binary')]; - case 3: - _a.sent(); - handler = tf.io.getLoadHandlers("file://" + modelJSONPath)[0]; - handler.load() - .then(function (modelArtifacts) { - expect(modelArtifacts.modelTopology).toEqual(modelTopology1); - expect(modelArtifacts.weightSpecs).toEqual([ - { - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }, - { - name: 'dense/bias', - shape: [1], - dtype: 'float32', - } - ]); - tf.test_util.expectArraysClose(new Float32Array(modelArtifacts.weightData), new Float32Array([-1.1, -3.3, -3.3, -7.7])); - done(); - }) - .catch(function (err) { return done.fail(err.stack); }); - return [2 /*return*/]; - } - }); - }); }); - it('loading from nonexistent model.json path fails', function (done) { - var handler = tf.io.getLoadHandlers("file://" + testDir + "/foo/model.json")[0]; - handler.load() - .then(function (getModelArtifactsInfoForJSON) { - done.fail('Loading from nonexisting model.json path succeeded ' + - 'unexpectedly.'); - }) - .catch(function (err) { - expect(err.message) - .toMatch(/model\.json.*does not exist.*loading failed/); - done(); - }); - }); - it('loading from missing weights path fails', function (done) { return __awaiter(_this, void 0, void 0, function () { - var weightsManifest, modelJSON, modelJSONPath, weightsData1, handler; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - weightsManifest = [ - { - paths: ['weights.1.bin'], - weights: [{ - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }], - }, - { - paths: ['weights.2.bin'], - weights: [{ - name: 'dense/bias', - shape: [1], - dtype: 'float32', - }] - } - ]; - modelJSON = { - modelTopology: modelTopology1, - weightsManifest: weightsManifest, - }; - modelJSONPath = path.join(testDir, 'model.json'); - return [4 /*yield*/, writeFile(modelJSONPath, JSON.stringify(modelJSON), 'utf8')]; - case 1: - _a.sent(); - weightsData1 = Buffer.from(new Float32Array([-1.1, -3.3, -3.3]).buffer); - return [4 /*yield*/, writeFile(path.join(testDir, 'weights.1.bin'), weightsData1, 'binary')]; - case 2: - _a.sent(); - handler = tf.io.getLoadHandlers("file://" + modelJSONPath)[0]; - handler.load() - .then(function (modelArtifacts) { - done.fail('Loading with missing weights file succeeded ' + - 'unexpectedly.'); - }) - .catch(function (err) { - expect(err.message) - .toMatch(/Weight file .*weights\.2\.bin does not exist/); - done(); - }); - return [2 /*return*/]; - } - }); - }); }); - }); - describe('load binary model', function () { - it('load: two weight files', function (done) { return __awaiter(_this, void 0, void 0, function () { - var weightsManifest, modelPath, modelData, modelManifestJSONPath, weightsData1, weightsData2, handler; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - weightsManifest = [ - { - paths: ['weights.1.bin'], - weights: [{ - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }], - }, - { - paths: ['weights.2.bin'], - weights: [{ - name: 'dense/bias', - shape: [1], - dtype: 'float32', - }] - } - ]; - modelPath = path.join(testDir, 'model.pb'); - modelData = Buffer.from(new Uint8Array([1, 2, 3]).buffer); - return [4 /*yield*/, writeFile(modelPath, modelData, 'binary')]; - case 1: - _a.sent(); - modelManifestJSONPath = path.join(testDir, 'manifest.json'); - return [4 /*yield*/, writeFile(modelManifestJSONPath, JSON.stringify(weightsManifest), 'utf8')]; - case 2: - _a.sent(); - weightsData1 = Buffer.from(new Float32Array([-1.1, -3.3, -3.3]).buffer); - return [4 /*yield*/, writeFile(path.join(testDir, 'weights.1.bin'), weightsData1, 'binary')]; - case 3: - _a.sent(); - weightsData2 = Buffer.from(new Float32Array([-7.7]).buffer); - return [4 /*yield*/, writeFile(path.join(testDir, 'weights.2.bin'), weightsData2, 'binary')]; - case 4: - _a.sent(); - handler = new file_system_1.NodeFileSystem(["" + modelPath, "" + modelManifestJSONPath]); - handler.load() - .then(function (modelArtifacts) { - tf.test_util.expectArraysClose(new Uint8Array(modelArtifacts.modelTopology), new Uint8Array(modelData)); - expect(modelArtifacts.weightSpecs).toEqual([ - { - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }, - { - name: 'dense/bias', - shape: [1], - dtype: 'float32', - } - ]); - tf.test_util.expectArraysClose(new Float32Array(modelArtifacts.weightData), new Float32Array([-1.1, -3.3, -3.3, -7.7])); - done(); - }) - .catch(function (err) { return done.fail(err.stack); }); - return [2 /*return*/]; - } - }); - }); }); - it('path length does not equal 2 fails', function () { - expect(function () { return new file_system_1.NodeFileSystem([testDir + "/foo/model.pb"]); }) - .toThrowError(/file paths must have a length of 2.*actual length is 1.*/); - }); - it('loading from nonexistent model.json path fails', function (done) { - var handler = new file_system_1.NodeFileSystem([testDir + "/foo/model.pb", testDir + "/foo/manifest.json"]); - handler.load() - .then(function (getModelArtifactsInfoForJSON) { - done.fail('Loading from nonexisting model.pb path succeeded ' + - 'unexpectedly.'); - }) - .catch(function (err) { - expect(err.message) - .toMatch(/model\.pb.*does not exist.*loading failed/); - done(); - }); - }); - it('loading from missing weights path fails', function (done) { return __awaiter(_this, void 0, void 0, function () { - var weightsManifest, modelPath, modelData, modelManifestJSONPath, weightsData1, handler; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - weightsManifest = [ - { - paths: ['weights.1.bin'], - weights: [{ - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }], - }, - { - paths: ['weights.2.bin'], - weights: [{ - name: 'dense/bias', - shape: [1], - dtype: 'float32', - }] - } - ]; - modelPath = path.join(testDir, 'model.pb'); - modelData = Buffer.from(new Uint8Array([1, 2, 3]).buffer); - return [4 /*yield*/, writeFile(modelPath, modelData, 'binary')]; - case 1: - _a.sent(); - modelManifestJSONPath = path.join(testDir, 'manifest.json'); - return [4 /*yield*/, writeFile(modelManifestJSONPath, JSON.stringify(weightsManifest), 'utf8')]; - case 2: - _a.sent(); - weightsData1 = Buffer.from(new Float32Array([-1.1, -3.3, -3.3]).buffer); - return [4 /*yield*/, writeFile(path.join(testDir, 'weights.1.bin'), weightsData1, 'binary')]; - case 3: - _a.sent(); - handler = new file_system_1.NodeFileSystem(["" + modelPath, "" + modelManifestJSONPath]); - handler.load() - .then(function (modelArtifacts) { - done.fail('Loading with missing weights file succeeded ' + - 'unexpectedly.'); - }) - .catch(function (err) { - expect(err.message) - .toMatch(/Weight file .*weights\.2\.bin does not exist/); - done(); - }); - return [2 /*return*/]; - } - }); - }); }); - }); - it('Exported file-system handler class exists', function () { - var handler = tfn.io.fileSystem(testDir); - expect(typeof handler.save).toEqual('function'); - expect(typeof handler.load).toEqual('function'); - }); - it('Save and load model with loss and optimizer', function () { return __awaiter(_this, void 0, void 0, function () { - var model, xs, ys, saveURL, loadURL, model2, optimizerConfig, history2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - model = tf.sequential(); - model.add(tf.layers.dense({ units: 1, kernelInitializer: 'zeros', inputShape: [1] })); - model.compile({ loss: 'meanSquaredError', optimizer: tf.train.adam(2.5e-2) }); - xs = tf.tensor2d([1, 2, 3, 4], [4, 1]); - ys = tf.tensor2d([-1, -3, -5, -7], [4, 1]); - return [4 /*yield*/, model.fit(xs, ys, { epochs: 2, shuffle: false, verbose: 0 })]; - case 1: - _a.sent(); - saveURL = "file://" + testDir; - loadURL = "file://" + testDir + "/model.json"; - return [4 /*yield*/, model.save(saveURL, { includeOptimizer: true })]; - case 2: - _a.sent(); - return [4 /*yield*/, tf.loadLayersModel(loadURL)]; - case 3: - model2 = _a.sent(); - optimizerConfig = model2.optimizer.getConfig(); - expect(model2.optimizer.getClassName()).toEqual('Adam'); - expect(optimizerConfig['learningRate']).toEqual(2.5e-2); - return [4 /*yield*/, model2.fit(xs, ys, { epochs: 2, shuffle: false, verbose: 0 })]; - case 4: - history2 = _a.sent(); - // The final loss value from training the model twice, 2 epochs - // at a time, should be equal to the final loss of trainig the - // model only once with 4 epochs. - expect(history2.history.loss[1]).toBeCloseTo(18.603); - return [2 /*return*/]; - } - }); - }); }); - it('Save and load model with user-defined metadata', function () { return __awaiter(_this, void 0, void 0, function () { - var model, saveURL, loadURL, model2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - model = tf.sequential(); - model.add(tf.layers.dense({ units: 3, inputShape: [4] })); - model.setUserDefinedMetadata({ 'outputLabels': ['Label1', 'Label2', 'Label3'] }); - saveURL = "file://" + testDir; - loadURL = "file://" + testDir + "/model.json"; - return [4 /*yield*/, model.save(saveURL)]; - case 1: - _a.sent(); - return [4 /*yield*/, tf.loadLayersModel(loadURL)]; - case 2: - model2 = _a.sent(); - expect(model2.getUserDefinedMetadata()).toEqual({ - 'outputLabels': ['Label1', 'Label2', 'Label3'] - }); - return [2 /*return*/]; - } - }); - }); }); - describe('nodeFileSystemRouter', function () { - it('should handle single path', function () { - expect(file_system_1.nodeFileSystemRouter('file://model.json')).toBeDefined(); - }); - it('should handle multiple paths', function () { - expect(file_system_1.nodeFileSystemRouter([ - 'file://model.json', 'file://weights.json' - ])).toBeDefined(); - }); - it('should return null for non file path', function () { - expect(file_system_1.nodeFileSystemRouter('http://model.json')).toBeNull(); - }); - it('should return null for multiple paths with mismatched scheme', function () { - expect(file_system_1.nodeFileSystemRouter([ - 'file://model.json', 'http://weights.json' - ])).toBeNull(); - }); - }); -}); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/index.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/index.d.ts deleted file mode 100644 index da4e47d7d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -/** - * Public exports from the `io` module. - */ -export { fileSystem } from './file_system'; -export { nodeHTTPRequest } from './node_http'; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/index.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/index.js deleted file mode 100644 index bd7d3867f..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/index.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Public exports from the `io` module. - */ -var file_system_1 = require("./file_system"); -exports.fileSystem = file_system_1.fileSystem; -var node_http_1 = require("./node_http"); -exports.nodeHTTPRequest = node_http_1.nodeHTTPRequest; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils.d.ts deleted file mode 100644 index 46904dede..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -/// -import * as tf from '@tensorflow/tfjs'; -/** - * Convert an ArrayBuffer to a Buffer. - */ -export declare function toBuffer(ab: ArrayBuffer): Buffer; -/** - * Convert a Buffer or an Array of Buffers to an ArrayBuffer. - * - * If the input is an Array of Buffers, they will be concatenated in the - * specified order to form the output ArrayBuffer. - */ -export declare function toArrayBuffer(buf: Buffer | Buffer[]): ArrayBuffer; -/** - * Populate ModelArtifactsInfo fields for a model with JSON topology. - * @param modelArtifacts - * @returns A ModelArtifactsInfo object. - */ -export declare function getModelArtifactsInfoForJSON(modelArtifacts: tf.io.ModelArtifacts): { - dateSaved: Date; - modelTopologyType: string; - modelTopologyBytes: number; - weightSpecsBytes: number; - weightDataBytes: number; -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils.js deleted file mode 100644 index 666a150c3..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Convert an ArrayBuffer to a Buffer. - */ -function toBuffer(ab) { - var view = new Uint8Array(ab); - return Buffer.from(view); // copies data -} -exports.toBuffer = toBuffer; -/** - * Convert a Buffer or an Array of Buffers to an ArrayBuffer. - * - * If the input is an Array of Buffers, they will be concatenated in the - * specified order to form the output ArrayBuffer. - */ -function toArrayBuffer(buf) { - if (Array.isArray(buf)) { - // An Array of Buffers. - var totalLength = 0; - for (var _i = 0, buf_1 = buf; _i < buf_1.length; _i++) { - var buffer = buf_1[_i]; - totalLength += buffer.length; - } - var ab = new ArrayBuffer(totalLength); - var view = new Uint8Array(ab); - var pos = 0; - for (var _a = 0, buf_2 = buf; _a < buf_2.length; _a++) { - var buffer = buf_2[_a]; - pos += buffer.copy(view, pos); - } - return ab; - } - else { - // A single Buffer. Return a copy of the underlying ArrayBuffer slice. - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - } -} -exports.toArrayBuffer = toArrayBuffer; -// TODO(cais): Use explicit tf.io.ModelArtifactsInfo return type below once it -// is available. -/** - * Populate ModelArtifactsInfo fields for a model with JSON topology. - * @param modelArtifacts - * @returns A ModelArtifactsInfo object. - */ -function getModelArtifactsInfoForJSON(modelArtifacts) { - if (modelArtifacts.modelTopology instanceof ArrayBuffer) { - throw new Error('Expected JSON model topology, received ArrayBuffer.'); - } - return { - dateSaved: new Date(), - modelTopologyType: 'JSON', - modelTopologyBytes: modelArtifacts.modelTopology == null ? - 0 : - Buffer.byteLength(JSON.stringify(modelArtifacts.modelTopology), 'utf8'), - weightSpecsBytes: modelArtifacts.weightSpecs == null ? - 0 : - Buffer.byteLength(JSON.stringify(modelArtifacts.weightSpecs), 'utf8'), - weightDataBytes: modelArtifacts.weightData == null ? - 0 : - modelArtifacts.weightData.byteLength, - }; -} -exports.getModelArtifactsInfoForJSON = getModelArtifactsInfoForJSON; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils_test.d.ts deleted file mode 100644 index 4a6d69728..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils_test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils_test.js deleted file mode 100644 index a03a44d58..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/io_utils_test.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var io_utils_1 = require("./io_utils"); -describe('toBuffer', function () { - it('Simple case', function () { - var ab = new Uint8Array([3, 2, 1]).buffer; - var buffer = io_utils_1.toBuffer(ab); - expect(new Uint8Array(buffer)).toEqual(new Uint8Array([3, 2, 1])); - }); -}); -describe('toArrayBuffer', function () { - it('Single Buffer', function () { - var buf = Buffer.from([10, 20, 30]); - var ab = io_utils_1.toArrayBuffer(buf); - expect(new Uint8Array(ab)).toEqual(new Uint8Array([10, 20, 30])); - }); - it('Two Buffers', function () { - var buf1 = Buffer.from([10, 20, 30]); - var buf2 = Buffer.from([40, 50, 60]); - var ab = io_utils_1.toArrayBuffer([buf1, buf2]); - expect(new Uint8Array(ab)).toEqual(new Uint8Array([ - 10, 20, 30, 40, 50, 60 - ])); - }); - it('Three Buffers', function () { - var buf1 = Buffer.from([10, 20, 30]); - var buf2 = Buffer.from([40, 50, 60]); - var buf3 = Buffer.from([3, 2, 1]); - var ab = io_utils_1.toArrayBuffer([buf1, buf2, buf3]); - expect(new Uint8Array(ab)).toEqual(new Uint8Array([ - 10, 20, 30, 40, 50, 60, 3, 2, 1 - ])); - }); - it('Zero buffers', function () { - var ab = io_utils_1.toArrayBuffer([]); - expect(new Uint8Array(ab)).toEqual(new Uint8Array([])); - }); -}); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http.d.ts deleted file mode 100644 index 4a38da0ce..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { io } from '@tensorflow/tfjs'; -/** - * Factory function for HTTP IO Handler in Node.js. - * - * @param path URL path or an array of them. - * @param requestInit Request init for the HTTP IOHandler. May include fields - * such as "credentials" and "cache". (Optional) - * @param weightPathPrefix A path prefix for weight loading . (Optional). - */ -export declare function nodeHTTPRequest(path: string, requestInit?: RequestInit, weightPathPrefix?: string): io.IOHandler; -export declare const nodeHTTPRequestRouter: (url: string) => io.IOHandler; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http.js deleted file mode 100644 index df1f2e8b5..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -/** - * Factory function for HTTP IO Handler in Node.js. - * - * @param path URL path or an array of them. - * @param requestInit Request init for the HTTP IOHandler. May include fields - * such as "credentials" and "cache". (Optional) - * @param weightPathPrefix A path prefix for weight loading . (Optional). - */ -function nodeHTTPRequest(path, requestInit, weightPathPrefix) { - return tfjs_1.io.browserHTTPRequest(path, { requestInit: requestInit, weightPathPrefix: weightPathPrefix }); -} -exports.nodeHTTPRequest = nodeHTTPRequest; -exports.nodeHTTPRequestRouter = function (url) { - var isHTTP = true; - if (Array.isArray(url)) { - isHTTP = url.every(function (urlItem) { return tfjs_1.io.isHTTPScheme(urlItem); }); - } - else { - isHTTP = tfjs_1.io.isHTTPScheme(url); - } - if (isHTTP) { - return nodeHTTPRequest(url); - } - return null; -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http_test.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http_test.d.ts deleted file mode 100644 index 4a6d69728..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http_test.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -export {}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http_test.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http_test.js deleted file mode 100644 index 273f1a9ec..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/io/node_http_test.js +++ /dev/null @@ -1,202 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2018 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var _this = this; -Object.defineProperty(exports, "__esModule", { value: true }); -var tf = require("@tensorflow/tfjs"); -var tfn = require("../index"); -// We still need node-fetch so that we can mock the core -// tf.env().platform.fetch call and return a valid response. -// tslint:disable-next-line:no-require-imports -var fetch = require('node-fetch'); -var OCTET_STREAM_TYPE = 'application/octet-stream'; -var JSON_TYPE = 'application/json'; -// Test data; -var modelTopology1 = { - 'class_name': 'Sequential', - 'keras_version': '2.1.4', - 'config': [{ - 'class_name': 'Dense', - 'config': { - 'kernel_initializer': { - 'class_name': 'VarianceScaling', - 'config': { - 'distribution': 'uniform', - 'scale': 1.0, - 'seed': null, - 'mode': 'fan_avg' - } - }, - 'name': 'dense', - 'kernel_constraint': null, - 'bias_regularizer': null, - 'bias_constraint': null, - 'dtype': 'float32', - 'activation': 'linear', - 'trainable': true, - 'kernel_regularizer': null, - 'bias_initializer': { 'class_name': 'Zeros', 'config': {} }, - 'units': 1, - 'batch_input_shape': [null, 3], - 'use_bias': true, - 'activity_regularizer': null - } - }], - 'backend': 'tensorflow' -}; -describe('nodeHTTPRequest-load', function () { - var requestInits; - var setupFakeWeightFiles = function (fileBufferMap) { - spyOn(tf.env().platform, 'fetch') - .and.callFake(function (path, init) { - return new Promise(function (resolve, reject) { - var contentType = ''; - if (path.endsWith('model.json')) { - contentType = JSON_TYPE; - } - else if (path.endsWith('weightfile0') || path.endsWith('weightfile1')) { - contentType = OCTET_STREAM_TYPE; - } - else { - reject(new Error("Invalid path: " + path)); - } - requestInits.push(init); - resolve(new fetch.Response(fileBufferMap[path], { 'headers': { 'Content-Type': contentType } })); - }); - }); - }; - beforeEach(function () { - requestInits = []; - }); - it('Constructor', function () { - var handler = tfn.io.nodeHTTPRequest('./foo_model.json'); - expect(handler == null).toEqual(false); - expect(typeof handler.load).toEqual('function'); - expect(typeof handler.save).toEqual('function'); - }); - it('Load through NodeHTTPRequest object', function () { return __awaiter(_this, void 0, void 0, function () { - var weightManifest1, floatData, handler, modelArtifacts; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - weightManifest1 = [{ - paths: ['weightfile0'], - weights: [ - { - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }, - { - name: 'dense/bias', - shape: [1], - dtype: 'float32', - } - ] - }]; - floatData = new Float32Array([1, 3, 3, 7]); - setupFakeWeightFiles({ - 'http://localhost/model.json': JSON.stringify({ modelTopology: modelTopology1, weightsManifest: weightManifest1 }), - 'http://localhost/weightfile0': floatData, - }); - handler = tfn.io.nodeHTTPRequest('http://localhost/model.json', { credentials: 'include', cache: 'no-cache' }); - return [4 /*yield*/, handler.load()]; - case 1: - modelArtifacts = _a.sent(); - expect(modelArtifacts.modelTopology).toEqual(modelTopology1); - expect(modelArtifacts.weightSpecs).toEqual(weightManifest1[0].weights); - expect(new Float32Array(modelArtifacts.weightData)).toEqual(floatData); - expect(requestInits).toEqual([ - { credentials: 'include', cache: 'no-cache' }, - { credentials: 'include', cache: 'no-cache' } - ]); - return [2 /*return*/]; - } - }); - }); }); - it('Load through registered handler', function () { return __awaiter(_this, void 0, void 0, function () { - var weightManifest1, floatData, model; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - weightManifest1 = [{ - paths: ['weightfile0'], - weights: [ - { - name: 'dense/kernel', - shape: [3, 1], - dtype: 'float32', - }, - { - name: 'dense/bias', - shape: [1], - dtype: 'float32', - } - ] - }]; - floatData = new Float32Array([1, 3, 3, 7]); - setupFakeWeightFiles({ - 'https://localhost/model.json': JSON.stringify({ modelTopology: modelTopology1, weightsManifest: weightManifest1 }), - 'https://localhost/weightfile0': floatData, - }); - return [4 /*yield*/, tf.loadLayersModel('https://localhost/model.json')]; - case 1: - model = _a.sent(); - expect(model.inputs.length).toEqual(1); - expect(model.inputs[0].shape).toEqual([null, 3]); - expect(model.outputs.length).toEqual(1); - expect(model.outputs[0].shape).toEqual([null, 1]); - return [2 /*return*/]; - } - }); - }); }); -}); diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Abs.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Abs.d.ts deleted file mode 100644 index b97998546..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Abs.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const absConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Abs.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Abs.js deleted file mode 100644 index 06abcd389..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Abs.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.absConfig = { - kernelName: tfjs_1.Abs, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - if (x.dtype === 'complex64') { - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tout', 'float32') - ]; - return backend.executeSingleOutput('ComplexAbs', opAttrs, [x]); - } - return backend.executeSingleInput(tfjs_1.Abs, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acos.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acos.d.ts deleted file mode 100644 index 673738cfb..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acos.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const acosConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acos.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acos.js deleted file mode 100644 index a408c5167..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acos.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.acosConfig = { - kernelName: tfjs_1.Acos, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Acos, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acosh.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acosh.d.ts deleted file mode 100644 index 4a0749689..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acosh.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const acoshConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acosh.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acosh.js deleted file mode 100644 index 05a645ce9..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Acosh.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.acoshConfig = { - kernelName: tfjs_1.Acosh, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Acosh, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Add.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Add.d.ts deleted file mode 100644 index 6206aa3fa..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Add.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const addConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Add.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Add.js deleted file mode 100644 index f42401c57..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Add.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.addConfig = { - kernelName: tfjs_1.Add, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, a = _a.a, b = _a.b; - var backend = args.backend; - var opAttrs = [nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', tfjs_1.backend_util.upcastType(a.dtype, b.dtype))]; - return backend.executeSingleOutput(tfjs_1.Add, opAttrs, [a, b]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AddN.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AddN.d.ts deleted file mode 100644 index 6e146fd9f..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AddN.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const addNConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AddN.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AddN.js deleted file mode 100644 index 0a9625ebe..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AddN.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.addNConfig = { - kernelName: tfjs_1.AddN, - backendName: 'tensorflow', - kernelFunc: function (args) { - var tensors = args.inputs; - var backend = args.backend; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', tensors[0].dtype), - { name: 'N', type: backend.binding.TF_ATTR_INT, value: tensors.length } - ]; - return backend.executeSingleOutput(tfjs_1.AddN, opAttrs, tensors); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/All.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/All.d.ts deleted file mode 100644 index 67abab515..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/All.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const allConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/All.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/All.js deleted file mode 100644 index 325992620..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/All.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.allConfig = { - kernelName: tfjs_1.All, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var _a = args.attrs, axis = _a.axis, keepDims = _a.keepDims; - var origAxes = tfjs_1.util.parseAxisParam(axis, x.shape); - var opAttrs = [ - { name: 'keep_dims', type: backend.binding.TF_ATTR_BOOL, value: keepDims }, - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tidx', 'int32') - ]; - var axesTensor = tfjs_1.tensor1d(origAxes, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.All, opAttrs, [x, axesTensor]); - axesTensor.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Any.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Any.d.ts deleted file mode 100644 index 22f046c6a..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Any.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const anyConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Any.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Any.js deleted file mode 100644 index c86e721fe..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Any.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.anyConfig = { - kernelName: tfjs_1.Any, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var _a = args.attrs, axis = _a.axis, keepDims = _a.keepDims; - var origAxes = tfjs_1.util.parseAxisParam(axis, x.shape); - var opAttrs = [ - { name: 'keep_dims', type: backend.binding.TF_ATTR_BOOL, value: keepDims }, - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tidx', 'int32') - ]; - var axesTensor = tfjs_1.tensor1d(origAxes, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.Any, opAttrs, [x, axesTensor]); - axesTensor.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMax.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMax.d.ts deleted file mode 100644 index 2639cde83..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMax.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const argMaxConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMax.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMax.js deleted file mode 100644 index f7f460bff..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMax.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.argMaxConfig = { - kernelName: tfjs_1.ArgMax, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var axis = args.attrs.axis; - var toDispose = []; - var xInput = x; - if (x.dtype === 'bool') { - xInput = x.toInt(); - toDispose.push(xInput); - } - var axisScalar = tfjs_1.scalar(axis, 'int32'); - toDispose.push(axisScalar); - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', xInput.dtype), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tidx', 'int32'), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('output_type', 'int32') - ]; - var res = backend.executeSingleOutput(tfjs_1.ArgMax, opAttrs, [xInput, axisScalar]); - toDispose.forEach(function (t) { return t.dispose(); }); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMin.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMin.d.ts deleted file mode 100644 index a6cd071ea..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMin.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const argMinConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMin.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMin.js deleted file mode 100644 index 89a1d3215..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ArgMin.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.argMinConfig = { - kernelName: tfjs_1.ArgMin, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var axis = args.attrs.axis; - var toDispose = []; - var xInput = x; - if (x.dtype === 'bool') { - xInput = x.toInt(); - toDispose.push(xInput); - } - var axisScalar = tfjs_1.scalar(axis, 'int32'); - toDispose.push(axisScalar); - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', xInput.dtype), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tidx', 'int32'), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('output_type', 'int32') - ]; - var res = backend.executeSingleOutput(tfjs_1.ArgMin, opAttrs, [xInput, axisScalar]); - toDispose.forEach(function (t) { return t.dispose(); }); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asin.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asin.d.ts deleted file mode 100644 index 016a3f37d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asin.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const asinConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asin.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asin.js deleted file mode 100644 index d23664e0c..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asin.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.asinConfig = { - kernelName: tfjs_1.Asin, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Asin, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asinh.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asinh.d.ts deleted file mode 100644 index a37a806db..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asinh.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const asinhConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asinh.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asinh.js deleted file mode 100644 index 1dd2a4adc..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Asinh.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.asinhConfig = { - kernelName: tfjs_1.Asinh, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Asinh, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan.d.ts deleted file mode 100644 index 0431ab768..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const atanConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan.js deleted file mode 100644 index b4b95e2e6..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.atanConfig = { - kernelName: tfjs_1.Atan, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Atan, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan2.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan2.d.ts deleted file mode 100644 index 4196923dd..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan2.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const atan2Config: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan2.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan2.js deleted file mode 100644 index b325de945..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atan2.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.atan2Config = { - kernelName: tfjs_1.Atan2, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, a = _a.a, b = _a.b; - var backend = args.backend; - var opAttrs = [nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', a.dtype)]; - return backend.executeSingleOutput(tfjs_1.Atan2, opAttrs, [a, b]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atanh.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atanh.d.ts deleted file mode 100644 index 6f233d787..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atanh.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const atanhConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atanh.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atanh.js deleted file mode 100644 index 7d8da12f5..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Atanh.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.atanhConfig = { - kernelName: tfjs_1.Atanh, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Atanh, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool.d.ts deleted file mode 100644 index 332432a46..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const avgPoolConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool.js deleted file mode 100644 index dbf9e092e..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.avgPoolConfig = { - kernelName: tfjs_1.AvgPool, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var _a = args.attrs, filterSize = _a.filterSize, strides = _a.strides, pad = _a.pad, dimRoundingMode = _a.dimRoundingMode; - var convInfo = tfjs_1.backend_util.computePool2DInfo(x.shape, filterSize, strides, 1 /* dilations */, pad, dimRoundingMode); - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding was " + convInfo.padInfo.type)); - } - var ksize = [1, convInfo.filterHeight, convInfo.filterWidth, 1]; - var $strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'ksize', type: backend.binding.TF_ATTR_INT, value: ksize }, - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: $strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, - { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - ]; - return backend.executeSingleOutput(tfjs_1.AvgPool, opAttrs, [x]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3D.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3D.d.ts deleted file mode 100644 index 237f78ab3..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3D.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const avgPool3DConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3D.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3D.js deleted file mode 100644 index ff95d1a4d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3D.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.avgPool3DConfig = { - kernelName: tfjs_1.AvgPool3D, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var _a = args.attrs, filterSize = _a.filterSize, strides = _a.strides, pad = _a.pad, dimRoundingMode = _a.dimRoundingMode, dataFormat = _a.dataFormat; - var convInfo = tfjs_1.backend_util.computePool3DInfo(x.shape, filterSize, strides, 1 /* dilations */, pad, dimRoundingMode, dataFormat); - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding was " + convInfo.padInfo.type)); - } - var ksize = [ - 1, convInfo.filterDepth, convInfo.filterHeight, convInfo.filterWidth, 1 - ]; - var $strides = [ - 1, convInfo.strideDepth, convInfo.strideHeight, convInfo.strideWidth, 1 - ]; - var padding = convInfo.padInfo.type; - var $dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NDHWC' : 'NCDHW'; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'ksize', type: backend.binding.TF_ATTR_INT, value: ksize }, - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: $strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, - { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: $dataFormat - }, - ]; - return backend.executeSingleOutput(tfjs_1.AvgPool3D, opAttrs, [x]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3DGrad.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3DGrad.d.ts deleted file mode 100644 index 52e2b6998..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3DGrad.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const avgPool3DGradConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3DGrad.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3DGrad.js deleted file mode 100644 index 527305618..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPool3DGrad.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.avgPool3DGradConfig = { - kernelName: tfjs_1.AvgPool3DGrad, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, dy = _a.dy, input = _a.input; - var backend = args.backend; - var _b = args.attrs, filterSize = _b.filterSize, strides = _b.strides, pad = _b.pad, dimRoundingMode = _b.dimRoundingMode; - var convInfo = tfjs_1.backend_util.computePool3DInfo(input.shape, filterSize, strides, 1 /* dilations */, pad, dimRoundingMode); - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding type was " + convInfo.padInfo.type)); - } - var ksize = [ - 1, convInfo.filterDepth, convInfo.filterHeight, convInfo.filterWidth, 1 - ]; - var $strides = [ - 1, convInfo.strideDepth, convInfo.strideHeight, convInfo.strideWidth, 1 - ]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NDHWC' : 'NCDHW'; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', input.dtype), - { name: 'ksize', type: backend.binding.TF_ATTR_INT, value: ksize }, - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: $strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, - { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - ]; - var origInputShape = tfjs_1.tensor1d(input.shape, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.AvgPool3DGrad, opAttrs, [origInputShape, dy]); - origInputShape.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPoolGrad.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPoolGrad.d.ts deleted file mode 100644 index 3a2a06021..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPoolGrad.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const avgPoolGradConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPoolGrad.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPoolGrad.js deleted file mode 100644 index bdccdb911..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/AvgPoolGrad.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.avgPoolGradConfig = { - kernelName: tfjs_1.AvgPoolGrad, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, dy = _a.dy, input = _a.input; - var backend = args.backend; - var _b = args.attrs, filterSize = _b.filterSize, strides = _b.strides, pad = _b.pad; - var convInfo = tfjs_1.backend_util.computePool2DInfo(input.shape, filterSize, strides, 1 /* dilations */, pad); - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding type was " + convInfo.padInfo.type)); - } - var ksize = [1, convInfo.filterHeight, convInfo.filterWidth, 1]; - var $strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', input.dtype), - { name: 'ksize', type: backend.binding.TF_ATTR_INT, value: ksize }, - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: $strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, - { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - ]; - var origInputShape = tfjs_1.tensor1d(input.shape, 'int32'); - var ret = backend.executeSingleOutput(tfjs_1.AvgPoolGrad, opAttrs, [origInputShape, dy]); - origInputShape.dispose(); - return ret; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchMatMul.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchMatMul.d.ts deleted file mode 100644 index d432a61f5..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchMatMul.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const batchMatMulConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchMatMul.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchMatMul.js deleted file mode 100644 index 5bd84da7e..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchMatMul.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.batchMatMulConfig = { - kernelName: tfjs_1.BatchMatMul, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, a = _a.a, b = _a.b; - var backend = args.backend; - var _b = args.attrs, transposeA = _b.transposeA, transposeB = _b.transposeB; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', a.dtype), - { name: 'adj_x', type: backend.binding.TF_ATTR_BOOL, value: transposeA }, - { name: 'adj_y', type: backend.binding.TF_ATTR_BOOL, value: transposeB } - ]; - return backend.executeSingleOutput(tfjs_1.BatchMatMul, opAttrs, [a, b]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchToSpaceND.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchToSpaceND.d.ts deleted file mode 100644 index 142ff6e21..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchToSpaceND.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const batchToSpaceNDConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchToSpaceND.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchToSpaceND.js deleted file mode 100644 index 5677f6f03..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/BatchToSpaceND.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.batchToSpaceNDConfig = { - kernelName: tfjs_1.BatchToSpaceND, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var _a = args.attrs, blockShape = _a.blockShape, crops = _a.crops; - var blockShapeTensor = tfjs_1.tensor1d(blockShape, 'int32'); - var cropsTensor = tfjs_1.tensor2d(crops, [crops.length, crops[0].length], 'int32'); - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tblock_shape', 'int32'), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tcrops', cropsTensor.dtype) - ]; - var res = backend.executeSingleOutput(tfjs_1.BatchToSpaceND, opAttrs, [x, blockShapeTensor, cropsTensor]); - cropsTensor.dispose(); - blockShapeTensor.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Bincount.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Bincount.d.ts deleted file mode 100644 index 4b122edc0..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Bincount.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const bincountConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Bincount.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Bincount.js deleted file mode 100644 index 96901b226..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Bincount.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.bincountConfig = { - kernelName: tfjs_1.Bincount, - backendName: 'tensorflow', - kernelFunc: function (_a) { - var inputs = _a.inputs, backend = _a.backend, attrs = _a.attrs; - var _b = inputs, x = _b.x, weights = _b.weights; - var size = attrs.size; - var nodeBackend = backend; - var $size = tfjs_1.scalar(size, 'int32'); - var opAttrs = [nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', weights.dtype)]; - var result = nodeBackend.executeSingleOutput(tfjs_1.Bincount, opAttrs, [x, $size, weights]); - $size.dispose(); - return result; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cast.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cast.d.ts deleted file mode 100644 index cc74c701f..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cast.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const castConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cast.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cast.js deleted file mode 100644 index d2cdbcf0d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cast.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.castConfig = { - kernelName: tfjs_1.Cast, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var dtype = args.attrs.dtype; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('SrcT', x.dtype), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('DstT', dtype), - { name: 'Truncate', type: backend.binding.TF_ATTR_BOOL, value: false } - ]; - return backend.executeSingleOutput(tfjs_1.Cast, opAttrs, [x]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Ceil.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Ceil.d.ts deleted file mode 100644 index c9a667b44..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Ceil.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const ceilConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Ceil.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Ceil.js deleted file mode 100644 index e5a4413ce..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Ceil.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.ceilConfig = { - kernelName: tfjs_1.Ceil, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Ceil, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ClipByValue.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ClipByValue.d.ts deleted file mode 100644 index 2e089d551..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ClipByValue.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const clipByValueConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ClipByValue.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ClipByValue.js deleted file mode 100644 index 95011c93e..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ClipByValue.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.clipByValueConfig = { - kernelName: tfjs_1.ClipByValue, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var _a = args.attrs, clipValueMin = _a.clipValueMin, clipValueMax = _a.clipValueMax; - return tfjs_1.tidy(function () { - var xMin = tfjs_1.minimum(x, tfjs_1.scalar(clipValueMax, x.dtype)); - return tfjs_1.maximum(xMin, tfjs_1.scalar(clipValueMin, x.dtype)); - }); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Complex.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Complex.d.ts deleted file mode 100644 index 1053003cf..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Complex.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const complexConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Complex.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Complex.js deleted file mode 100644 index 65e7b560d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Complex.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.complexConfig = { - kernelName: tfjs_1.Complex, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, real = _a.real, imag = _a.imag; - var backend = args.backend; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', real), - { - name: 'Tout', - type: backend.binding.TF_ATTR_TYPE, - value: backend.binding.TF_COMPLEX64 - }, - ]; - var inputs = [real, imag]; - return backend.executeSingleOutput(tfjs_1.Complex, opAttrs, inputs); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ComplexAbs.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ComplexAbs.d.ts deleted file mode 100644 index 7fcb06aad..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ComplexAbs.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const complexAbsConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ComplexAbs.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ComplexAbs.js deleted file mode 100644 index 091b2535a..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/ComplexAbs.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.complexAbsConfig = { - kernelName: tfjs_1.ComplexAbs, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tout', 'float32') - ]; - return backend.executeSingleOutput(tfjs_1.ComplexAbs, opAttrs, [x]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Concat.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Concat.d.ts deleted file mode 100644 index 4b9e87c0d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Concat.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const concatConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Concat.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Concat.js deleted file mode 100644 index c7c1b459a..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Concat.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.concatConfig = { - kernelName: tfjs_1.Concat, - backendName: 'tensorflow', - kernelFunc: function (args) { - var tensors = args.inputs; - var backend = args.backend; - var axis = args.attrs.axis; - var opAttrs = [ - { name: 'N', type: backend.binding.TF_ATTR_INT, value: tensors.length }, { - name: 'Tidx', - type: backend.binding.TF_ATTR_TYPE, - value: backend.binding.TF_INT32 - }, - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', tensors) - ]; - var inputs = Array.from(tensors); - var axisTensor = tfjs_1.scalar(axis, 'int32'); - inputs.push(axisTensor); - var res = backend.executeSingleOutput('ConcatV2', opAttrs, inputs); - axisTensor.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2D.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2D.d.ts deleted file mode 100644 index adf5b22ea..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2D.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { backend_util, KernelConfig, Tensor4D, TensorInfo } from '@tensorflow/tfjs'; -import { NodeJSKernelBackend } from '../nodejs_kernel_backend'; -export declare const conv2DConfig: KernelConfig; -export declare function conv2dImpl(x: TensorInfo, filter: TensorInfo, convInfo: backend_util.Conv2DInfo, backend: NodeJSKernelBackend): Tensor4D; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2D.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2D.js deleted file mode 100644 index 78544717b..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2D.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.conv2DConfig = { - kernelName: tfjs_1.Conv2D, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, x = _a.x, filter = _a.filter; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, pad = _b.pad, dataFormat = _b.dataFormat, dilations = _b.dilations, dimRoundingMode = _b.dimRoundingMode; - var $dataFormat = tfjs_1.backend_util.convertConv2DDataFormat(dataFormat); - var convInfo = tfjs_1.backend_util.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad, dimRoundingMode, false /* depthwise */, $dataFormat); - return conv2dImpl(x, filter, convInfo, backend); - } -}; -function conv2dImpl(x, filter, convInfo, backend) { - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME' && - convInfo.padInfo.type !== 'EXPLICIT') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding was " + convInfo.padInfo.type)); - } - var strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var dilations = [1, convInfo.dilationHeight, convInfo.dilationWidth, 1]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, - { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'use_cudnn_on_gpu', type: backend.binding.TF_ATTR_BOOL, value: true }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: dilations }, - ]; - if (padding === 'EXPLICIT') { - var padValue = [ - convInfo.padInfo.top, convInfo.padInfo.bottom, convInfo.padInfo.left, - convInfo.padInfo.right - ]; - opAttrs.push({ - name: 'explicit_paddings', - type: backend.binding.TF_ATTR_INT, - value: dataFormat === 'NHWC' ? [0, 0].concat(padValue, [0, 0]) : [0, 0, 0, 0].concat(padValue) - }); - } - return backend.executeSingleOutput(tfjs_1.Conv2D, opAttrs, [x, filter]); -} -exports.conv2dImpl = conv2dImpl; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropFilter.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropFilter.d.ts deleted file mode 100644 index 9ec6d8af6..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropFilter.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const conv2DBackpropFilterConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropFilter.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropFilter.js deleted file mode 100644 index 6d39f6882..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropFilter.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.conv2DBackpropFilterConfig = { - kernelName: tfjs_1.Conv2DBackpropFilter, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, x = _a.x, dy = _a.dy; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, pad = _b.pad, dataFormat = _b.dataFormat, dimRoundingMode = _b.dimRoundingMode, filterShape = _b.filterShape; - var $dataFormat = tfjs_1.backend_util.convertConv2DDataFormat(dataFormat); - var convInfo = tfjs_1.backend_util.computeConv2DInfo(x.shape, filterShape, strides, 1 /* dilations */, pad, dimRoundingMode, false /* depthwise */, $dataFormat); - return conv2DBackpropFilterImpl(dy, x, convInfo, backend); - } -}; -function conv2DBackpropFilterImpl(dy, filter, convInfo, backend) { - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding was " + convInfo.padInfo.type)); - } - var strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var dilations = [1, convInfo.dilationHeight, convInfo.dilationWidth, 1]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', 'float32'), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'use_cudnn_on_gpu', type: backend.binding.TF_ATTR_BOOL, value: true }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: dilations } - ]; - var filterSizes = tfjs_1.tensor1d(convInfo.filterShape, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.Conv2DBackpropFilter, opAttrs, [filter, filterSizes, dy]); - filterSizes.dispose(); - return res; -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropInput.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropInput.d.ts deleted file mode 100644 index b8db12131..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropInput.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const conv2DBackpropInputConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropInput.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropInput.js deleted file mode 100644 index 9209fa2b0..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv2DBackpropInput.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.conv2DBackpropInputConfig = { - kernelName: tfjs_1.Conv2DBackpropInput, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, dy = _a.dy, filter = _a.filter; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, pad = _b.pad, dataFormat = _b.dataFormat, dimRoundingMode = _b.dimRoundingMode, inputShape = _b.inputShape; - var $dataFormat = tfjs_1.backend_util.convertConv2DDataFormat(dataFormat); - var convInfo = tfjs_1.backend_util.computeConv2DInfo(inputShape, filter.shape, strides, 1 /* dilations */, pad, dimRoundingMode, false, $dataFormat); - return conv2DBackpropInputImpl(dy, filter, convInfo, backend); - } -}; -function conv2DBackpropInputImpl(dy, filter, convInfo, backend) { - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding was " + convInfo.padInfo.type)); - } - var strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var dilations = [1, convInfo.dilationHeight, convInfo.dilationWidth, 1]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', 'float32'), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'use_cudnn_on_gpu', type: backend.binding.TF_ATTR_BOOL, value: true }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: dilations } - ]; - var inputSizes = tfjs_1.tensor1d(convInfo.inShape, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.Conv2DBackpropInput, opAttrs, [inputSizes, filter, dy]); - inputSizes.dispose(); - return res; -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3D.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3D.d.ts deleted file mode 100644 index a578c63b8..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3D.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const conv3DConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3D.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3D.js deleted file mode 100644 index 14896b965..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3D.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.conv3DConfig = { - kernelName: tfjs_1.Conv3D, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, x = _a.x, filter = _a.filter; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, pad = _b.pad, dilations = _b.dilations; - var convInfo = tfjs_1.backend_util.computeConv3DInfo(x.shape, filter.shape, strides, dilations, pad); - var $strides = [ - 1, convInfo.strideDepth, convInfo.strideHeight, convInfo.strideWidth, 1 - ]; - var padding = convInfo.padInfo.type; - var $dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NDHWC' : 'NCDHW'; - if (!backend.isGPUPackage && convInfo.dilationDepth > 1) { - throw new Error('CPU Dilation depth must be 1'); - } - var $dilations = [ - 1, convInfo.dilationDepth, convInfo.dilationHeight, - convInfo.dilationWidth, 1 - ]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: $strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: $dataFormat - }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: $dilations } - ]; - return backend.executeSingleOutput(tfjs_1.Conv3D, opAttrs, [x, filter]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropFilterV2.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropFilterV2.d.ts deleted file mode 100644 index fc3735af7..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropFilterV2.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const conv3DBackpropFilterV2Config: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropFilterV2.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropFilterV2.js deleted file mode 100644 index 9596c7afe..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropFilterV2.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.conv3DBackpropFilterV2Config = { - kernelName: tfjs_1.Conv3DBackpropFilterV2, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, x = _a.x, dy = _a.dy; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, pad = _b.pad, filterShape = _b.filterShape; - var dilations = 1; - var convInfo = tfjs_1.backend_util.computeConv3DInfo(x.shape, filterShape, strides, dilations, pad); - var $strides = [ - 1, convInfo.strideDepth, convInfo.strideHeight, convInfo.strideWidth, 1 - ]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NDHWC' : 'NCDHW'; - if (!backend.isGPUPackage && convInfo.dilationDepth > 1) { - throw new Error('CPU Dilation depth must be 1'); - } - var $dilations = [ - 1, convInfo.dilationDepth, convInfo.dilationHeight, - convInfo.dilationWidth, 1 - ]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: $strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: $dilations } - ]; - var filterSizes = tfjs_1.tensor1d(filterShape, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.Conv3DBackpropFilterV2, opAttrs, [x, filterSizes, dy]); - filterSizes.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropInputV2.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropInputV2.d.ts deleted file mode 100644 index bcc7970c1..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropInputV2.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const conv3DBackpropInputV2Config: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropInputV2.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropInputV2.js deleted file mode 100644 index 0a65bce33..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Conv3DBackpropInputV2.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.conv3DBackpropInputV2Config = { - kernelName: tfjs_1.Conv3DBackpropInputV2, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, dy = _a.dy, filter = _a.filter; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, pad = _b.pad, inputShape = _b.inputShape; - var dilations = 1; - var convInfo = tfjs_1.backend_util.computeConv3DInfo(inputShape, filter.shape, strides, dilations, pad); - var $strides = [ - 1, convInfo.strideDepth, convInfo.strideHeight, convInfo.strideWidth, 1 - ]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NDHWC' : 'NCDHW'; - if (!backend.isGPUPackage && convInfo.dilationDepth > 1) { - throw new Error('CPU Dilation depth must be 1'); - } - var $dilations = [ - 1, convInfo.dilationDepth, convInfo.dilationHeight, - convInfo.dilationWidth, 1 - ]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', dy.dtype), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: $strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: $dilations }, - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tshape', 'int32') - ]; - var inputSizes = tfjs_1.tensor1d(inputShape, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.Conv3DBackpropInputV2, opAttrs, [inputSizes, filter, dy]); - inputSizes.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cos.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cos.d.ts deleted file mode 100644 index 79f5b120f..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cos.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const cosConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cos.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cos.js deleted file mode 100644 index 3759353d6..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cos.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.cosConfig = { - kernelName: tfjs_1.Cos, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Cos, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cosh.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cosh.d.ts deleted file mode 100644 index 207327652..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cosh.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const coshConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cosh.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cosh.js deleted file mode 100644 index 64daef7a0..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cosh.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.coshConfig = { - kernelName: tfjs_1.Cosh, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Cosh, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/CropAndResize.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/CropAndResize.d.ts deleted file mode 100644 index aa23f965b..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/CropAndResize.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const cropAndResizeConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/CropAndResize.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/CropAndResize.js deleted file mode 100644 index 30566358c..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/CropAndResize.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.cropAndResizeConfig = { - kernelName: tfjs_1.CropAndResize, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, image = _a.image, boxes = _a.boxes, boxInd = _a.boxInd; - var backend = args.backend; - var _b = args.attrs, cropSize = _b.cropSize, method = _b.method, extrapolationValue = _b.extrapolationValue; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', image.dtype), - { name: 'method', type: backend.binding.TF_ATTR_STRING, value: method }, { - name: 'extrapolation_value', - type: backend.binding.TF_ATTR_FLOAT, - value: extrapolationValue - } - ]; - var cropSizeTensor = tfjs_1.tensor1d(cropSize, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.CropAndResize, opAttrs, [image, boxes, boxInd, cropSizeTensor]); - cropSizeTensor.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cumsum.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cumsum.d.ts deleted file mode 100644 index 5491c6c61..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cumsum.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const cumsumConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cumsum.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cumsum.js deleted file mode 100644 index fc528d2c8..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Cumsum.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.cumsumConfig = { - kernelName: tfjs_1.Cumsum, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var _a = args.attrs, axis = _a.axis, exclusive = _a.exclusive, reverse = _a.reverse; - var axisTensor = tfjs_1.scalar(axis, 'int32'); - var opAttrs = [ - { name: 'exclusive', type: backend.binding.TF_ATTR_BOOL, value: exclusive }, - { name: 'reverse', type: backend.binding.TF_ATTR_BOOL, value: reverse }, - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - nodejs_kernel_backend_1.createTensorsTypeOpAttr('Tidx', 'int32') - ]; - var res = backend.executeSingleOutput(tfjs_1.Cumsum, opAttrs, [x, axisTensor]); - axisTensor.dispose(); - return res; - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthToSpace.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthToSpace.d.ts deleted file mode 100644 index 5695688b7..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthToSpace.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const depthToSpaceConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthToSpace.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthToSpace.js deleted file mode 100644 index 55ce2bbcf..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthToSpace.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.depthToSpaceConfig = { - kernelName: tfjs_1.DepthToSpace, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - var _a = args.attrs, blockSize = _a.blockSize, dataFormat = _a.dataFormat; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x), { - name: 'block_size', - type: backend.binding.TF_ATTR_INT, - value: blockSize < 2 ? 2 : blockSize - }, - { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - } - ]; - var inputs = [x]; - return backend.executeSingleOutput(tfjs_1.DepthToSpace, opAttrs, inputs); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNative.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNative.d.ts deleted file mode 100644 index 76c3dff93..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNative.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { backend_util, KernelConfig, Tensor4D, TensorInfo } from '@tensorflow/tfjs'; -import { NodeJSKernelBackend } from '../nodejs_kernel_backend'; -export declare const depthwiseConv2dNativeConfig: KernelConfig; -export declare function depthwiseConv2dNativeImpl(input: TensorInfo, filter: TensorInfo, convInfo: backend_util.Conv2DInfo, backend: NodeJSKernelBackend): Tensor4D; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNative.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNative.js deleted file mode 100644 index 15b9fc9b8..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNative.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.depthwiseConv2dNativeConfig = { - kernelName: tfjs_1.DepthwiseConv2dNative, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, x = _a.x, filter = _a.filter; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, pad = _b.pad, dilations = _b.dilations, dimRoundingMode = _b.dimRoundingMode; - var $dilations = dilations; - if ($dilations == null) { - $dilations = [1, 1]; - } - var convInfo = tfjs_1.backend_util.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad, dimRoundingMode, true /* depthwise */); - return depthwiseConv2dNativeImpl(x, filter, convInfo, backend); - } -}; -function depthwiseConv2dNativeImpl(input, filter, convInfo, backend) { - if (convInfo.padInfo.type !== 'VALID' && convInfo.padInfo.type !== 'SAME' && - convInfo.padInfo.type !== 'EXPLICIT') { - throw new Error("TF Backend supports only 'valid' and 'same' padding " + - ("while padding was " + convInfo.padInfo.type)); - } - var strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var dilations = [1, convInfo.dilationHeight, convInfo.dilationWidth, 1]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', input.dtype), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: dilations } - ]; - if (padding === 'EXPLICIT') { - var padValue = [ - convInfo.padInfo.top, convInfo.padInfo.bottom, convInfo.padInfo.left, - convInfo.padInfo.right - ]; - opAttrs.push({ - name: 'explicit_paddings', - type: backend.binding.TF_ATTR_INT, - value: dataFormat === 'NHWC' ? [0, 0].concat(padValue, [0, 0]) : [0, 0, 0, 0].concat(padValue) - }); - } - return backend.executeSingleOutput(tfjs_1.DepthwiseConv2dNative, opAttrs, [input, filter]); -} -exports.depthwiseConv2dNativeImpl = depthwiseConv2dNativeImpl; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropFilter.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropFilter.d.ts deleted file mode 100644 index 313293dff..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropFilter.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const depthwiseConv2dNativeBackpropFilterConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js deleted file mode 100644 index e2f470ad5..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.depthwiseConv2dNativeBackpropFilterConfig = { - kernelName: tfjs_1.DepthwiseConv2dNativeBackpropFilter, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, x = _a.x, dy = _a.dy; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, dilations = _b.dilations, pad = _b.pad, dimRoundingMode = _b.dimRoundingMode, filterShape = _b.filterShape; - var convInfo = tfjs_1.backend_util.computeConv2DInfo(x.shape, filterShape, strides, dilations, pad, dimRoundingMode, true /* depthwise */); - return depthwiseConv2dNativeBackpropFilterImpl(x, dy, convInfo, backend); - } -}; -function depthwiseConv2dNativeBackpropFilterImpl(x, dy, convInfo, backend) { - var strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var dilations = [1, convInfo.dilationHeight, convInfo.dilationWidth, 1]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', 'float32'), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: dilations } - ]; - var filterSizes = tfjs_1.tensor1d(convInfo.filterShape, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.DepthwiseConv2dNativeBackpropFilter, opAttrs, [x, filterSizes, dy]); - filterSizes.dispose(); - return res; -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropInput.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropInput.d.ts deleted file mode 100644 index 21aef1fdd..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropInput.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const depthwiseConv2dNativeBackpropInputConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropInput.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropInput.js deleted file mode 100644 index af68a1aeb..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/DepthwiseConv2dNativeBackpropInput.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.depthwiseConv2dNativeBackpropInputConfig = { - kernelName: tfjs_1.DepthwiseConv2dNativeBackpropInput, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, dy = _a.dy, filter = _a.filter; - var backend = args.backend; - var _b = args.attrs, strides = _b.strides, dilations = _b.dilations, pad = _b.pad, dimRoundingMode = _b.dimRoundingMode, inputShape = _b.inputShape; - var convInfo = tfjs_1.backend_util.computeConv2DInfo(inputShape, filter.shape, strides, dilations, pad, dimRoundingMode, true /* depthwise */); - return depthwiseConv2dNativeBackpropInputImpl(dy, filter, convInfo, backend); - } -}; -function depthwiseConv2dNativeBackpropInputImpl(dy, filter, convInfo, backend) { - var strides = [1, convInfo.strideHeight, convInfo.strideWidth, 1]; - var padding = convInfo.padInfo.type; - var dataFormat = convInfo.dataFormat === 'channelsLast' ? 'NHWC' : 'NCHW'; - var dilations = [1, convInfo.dilationHeight, convInfo.dilationWidth, 1]; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', 'float32'), - { name: 'strides', type: backend.binding.TF_ATTR_INT, value: strides }, - { name: 'padding', type: backend.binding.TF_ATTR_STRING, value: padding }, { - name: 'data_format', - type: backend.binding.TF_ATTR_STRING, - value: dataFormat - }, - { name: 'dilations', type: backend.binding.TF_ATTR_INT, value: dilations } - ]; - var inputSizes = tfjs_1.tensor1d(convInfo.inShape, 'int32'); - var res = backend.executeSingleOutput(tfjs_1.DepthwiseConv2dNativeBackpropInput, opAttrs, [inputSizes, filter, dy]); - inputSizes.dispose(); - return res; -} diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Diag.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Diag.d.ts deleted file mode 100644 index 8c0967293..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Diag.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const diagConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Diag.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Diag.js deleted file mode 100644 index f93d32857..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Diag.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.diagConfig = { - kernelName: tfjs_1.Diag, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Diag, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2D.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2D.d.ts deleted file mode 100644 index 74431f886..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2D.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const dilation2dConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2D.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2D.js deleted file mode 100644 index 20f9a0d94..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2D.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.dilation2dConfig = { - kernelName: tfjs_1.Dilation2D, - backendName: 'tensorflow', - kernelFunc: function (_a) { - var inputs = _a.inputs, backend = _a.backend, attrs = _a.attrs; - var _b = inputs, x = _b.x, filter = _b.filter; - var _c = attrs, strides = _c.strides, pad = _c.pad, dilations = _c.dilations; - var _d = tfjs_1.backend_util.computeDilation2DInfo(x.shape, filter.shape, strides, pad, 'NHWC' /* dataFormat */, dilations), dilationHeight = _d.dilationHeight, dilationWidth = _d.dilationWidth, padInfo = _d.padInfo, strideHeight = _d.strideHeight, strideWidth = _d.strideWidth; - var $strides = [1, strideHeight, strideWidth, 1]; - var $dilations = [1, dilationHeight, dilationWidth, 1]; - var nodeBackend = backend; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'strides', type: nodeBackend.binding.TF_ATTR_INT, value: $strides }, - { name: 'rates', type: nodeBackend.binding.TF_ATTR_INT, value: $dilations }, - { - name: 'padding', - type: nodeBackend.binding.TF_ATTR_STRING, - value: padInfo.type - } - ]; - return nodeBackend.executeSingleOutput(tfjs_1.Dilation2D, opAttrs, [x, filter]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropFilter.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropFilter.d.ts deleted file mode 100644 index 644d886ee..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropFilter.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const dilation2dBackpropFilterConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropFilter.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropFilter.js deleted file mode 100644 index 792b2ce37..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropFilter.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.dilation2dBackpropFilterConfig = { - kernelName: tfjs_1.Dilation2DBackpropFilter, - backendName: 'tensorflow', - kernelFunc: function (_a) { - var inputs = _a.inputs, backend = _a.backend, attrs = _a.attrs; - var _b = inputs, x = _b.x, filter = _b.filter, dy = _b.dy; - var _c = attrs, strides = _c.strides, pad = _c.pad, dilations = _c.dilations; - var _d = tfjs_1.backend_util.computeDilation2DInfo(x.shape, filter.shape, strides, pad, 'NHWC' /* dataFormat */, dilations), dilationHeight = _d.dilationHeight, dilationWidth = _d.dilationWidth, padInfo = _d.padInfo, strideHeight = _d.strideHeight, strideWidth = _d.strideWidth; - var $strides = [1, strideHeight, strideWidth, 1]; - var $dilations = [1, dilationHeight, dilationWidth, 1]; - var nodeBackend = backend; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'strides', type: nodeBackend.binding.TF_ATTR_INT, value: $strides }, - { name: 'rates', type: nodeBackend.binding.TF_ATTR_INT, value: $dilations }, - { - name: 'padding', - type: nodeBackend.binding.TF_ATTR_STRING, - value: padInfo.type - } - ]; - return nodeBackend.executeSingleOutput(tfjs_1.Dilation2DBackpropFilter, opAttrs, [x, filter, dy]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropInput.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropInput.d.ts deleted file mode 100644 index 2a11b0471..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropInput.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const dilation2dBackpropInputConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropInput.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropInput.js deleted file mode 100644 index 3ab781f29..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Dilation2DBackpropInput.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.dilation2dBackpropInputConfig = { - kernelName: tfjs_1.Dilation2DBackpropInput, - backendName: 'tensorflow', - kernelFunc: function (_a) { - var inputs = _a.inputs, backend = _a.backend, attrs = _a.attrs; - var _b = inputs, x = _b.x, filter = _b.filter, dy = _b.dy; - var _c = attrs, strides = _c.strides, pad = _c.pad, dilations = _c.dilations; - var _d = tfjs_1.backend_util.computeDilation2DInfo(x.shape, filter.shape, strides, pad, 'NHWC' /* dataFormat */, dilations), dilationHeight = _d.dilationHeight, dilationWidth = _d.dilationWidth, padInfo = _d.padInfo, strideHeight = _d.strideHeight, strideWidth = _d.strideWidth; - var $strides = [1, strideHeight, strideWidth, 1]; - var $dilations = [1, dilationHeight, dilationWidth, 1]; - var nodeBackend = backend; - var opAttrs = [ - nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', x.dtype), - { name: 'strides', type: nodeBackend.binding.TF_ATTR_INT, value: $strides }, - { name: 'rates', type: nodeBackend.binding.TF_ATTR_INT, value: $dilations }, - { - name: 'padding', - type: nodeBackend.binding.TF_ATTR_STRING, - value: padInfo.type - } - ]; - return nodeBackend.executeSingleOutput(tfjs_1.Dilation2DBackpropInput, opAttrs, [x, filter, dy]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Elu.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Elu.d.ts deleted file mode 100644 index 3bdb3a299..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Elu.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const eluConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Elu.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Elu.js deleted file mode 100644 index b538ff58d..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Elu.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.eluConfig = { - kernelName: tfjs_1.Elu, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Elu, x); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/EluGrad.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/EluGrad.d.ts deleted file mode 100644 index 86b737b33..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/EluGrad.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const eluGradConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/EluGrad.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/EluGrad.js deleted file mode 100644 index c24a06e4f..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/EluGrad.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.eluGradConfig = { - kernelName: tfjs_1.EluGrad, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, dy = _a.dy, y = _a.y; - var backend = args.backend; - var opAttrs = [nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', y.dtype)]; - return backend.executeSingleOutput(tfjs_1.EluGrad, opAttrs, [dy, y]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Equal.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Equal.d.ts deleted file mode 100644 index 0638afc27..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Equal.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const equalConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Equal.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Equal.js deleted file mode 100644 index e50383538..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Equal.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -var nodejs_kernel_backend_1 = require("../nodejs_kernel_backend"); -exports.equalConfig = { - kernelName: tfjs_1.Equal, - backendName: 'tensorflow', - kernelFunc: function (args) { - var _a = args.inputs, a = _a.a, b = _a.b; - var backend = args.backend; - var opAttrs = [nodejs_kernel_backend_1.createTensorsTypeOpAttr('T', tfjs_1.backend_util.upcastType(a.dtype, b.dtype))]; - return backend.executeSingleOutput(tfjs_1.Equal, opAttrs, [a, b]); - } -}; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Erf.d.ts b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Erf.d.ts deleted file mode 100644 index 0eb9003c4..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Erf.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -import { KernelConfig } from '@tensorflow/tfjs'; -export declare const erfConfig: KernelConfig; diff --git a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Erf.js b/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Erf.js deleted file mode 100644 index 19baaf71e..000000000 --- a/Projects/TensorFlow/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/node_modules/@tensorflow/tfjs-node/dist/kernels/Erf.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -/** - * @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================= - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var tfjs_1 = require("@tensorflow/tfjs"); -exports.erfConfig = { - kernelName: tfjs_1.Erf, - backendName: 'tensorflow', - kernelFunc: function (args) { - var x = args.inputs.x; - var backend = args.backend; - return backend.executeSingleInput(tfjs_1.Erf, x); - } -};