diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..38b9869 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +/target + +.idea +cmake-build-* +*.wav +*.mp3 + +Cargo.lock \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..be2d3ad --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "cpp/external/RTNeural"] + path = cpp/external/RTNeural + url = https://github.com/jatinchowdhury18/RTNeural.git diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..fd90dc3 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "basic_pitch" +version = "0.0.1" +edition = "2021" + + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] + diff --git a/build-android-onnx-libs.sh b/build-android-onnx-libs.sh new file mode 100755 index 0000000..f733190 --- /dev/null +++ b/build-android-onnx-libs.sh @@ -0,0 +1,46 @@ + +# script designed to build onnxruntime for android and copy the relevant files +# to on directory in order to make linking easy + +ANDROID_NDK_HOME="$HOME/Library/Android/sdk/ndk/25.2.9519653" +ANDROID_SDK_PATH="$HOME/Library/Android/sdk" +ONNX_TARGET_DIR="$(pwd)/onnxruntime-libs/android" + +echo "using onnxruntime dir: $ONNX_REPO_DIR" +echo "using sdk path: $ANDROID_SDK_PATH" +echo "using ndk home: $ANDROID_NDK_HOME" + +cd "$ONNX_REPO_DIR" || exit + +./build.sh --android \ + --android_sdk_path "$ANDROID_SDK_PATH" \ + --android_ndk_path "$ANDROID_NDK_HOME" \ + --android_abi "arm64-v8a" \ + --android_api 33 \ + --config=Release \ + --parallel + +ONNX_BUILD_DIR="$ONNX_REPO_DIR/build/Android/Release" + +echo "cd to $(pwd)" +cd "$ONNX_BUILD_DIR" || exit + +echo "making target dir '$ONNX_TARGET_DIR' if it doesn't exist" +mkdir -p "$ONNX_TARGET_DIR" + +echo "copying relevant onnxruntime libs to '$ONNX_TARGET_DIR'" +cp *.a \ + _deps/abseil_cpp-build/absl/hash/libabsl_city.a \ + _deps/abseil_cpp-build/absl/hash/libabsl_hash.a \ + _deps/abseil_cpp-build/absl/hash/libabsl_low_level_hash.a \ + _deps/abseil_cpp-build/absl/base/libabsl_throw_delegate.a \ + _deps/abseil_cpp-build/absl/base/libabsl_raw_logging_internal.a \ + _deps/abseil_cpp-build/absl/container/libabsl_raw_hash_set.a \ + _deps/pytorch_cpuinfo-build/libcpuinfo.a \ + _deps/pytorch_cpuinfo-build/deps/clog/libclog.a \ + _deps/google_nsync-build/libnsync_cpp.a \ + _deps/protobuf-build/libprotobuf-lite.a \ + _deps/onnx-build/libonnx.a \ + _deps/onnx-build/libonnx_proto.a \ + _deps/re2-build/libre2.a \ + "$ONNX_TARGET_DIR" diff --git a/build-android.sh b/build-android.sh new file mode 100755 index 0000000..ad4a118 --- /dev/null +++ b/build-android.sh @@ -0,0 +1,3 @@ +ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk/25.2.9519653 \ + CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$HOME/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android33-clang++ \ + cargo build --target=aarch64-linux-android diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..937af25 --- /dev/null +++ b/build.rs @@ -0,0 +1,189 @@ +use std::path::Path; +use std::path::PathBuf; + +fn cmake_build_dir() -> PathBuf { + PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("cpp") + .join("cmake-build-release") +} + +fn add_link_search_path(path: impl AsRef) { + println!( + "cargo:rustc-link-search={}", + path.as_ref().to_str().unwrap() + ); +} + +fn add_link_search_paths(paths: &[&str]) { + for path in paths { + add_link_search_path(path); + } +} + +fn link_static_libs(libs: &[&str]) { + for lib in libs { + link_static_lib(lib); + } +} + +fn link_static_lib(name: &str) { + println!("cargo:rustc-link-lib=static={name}"); +} + +fn link_neural_pitch() { + let lib_path = cmake_build_dir(); + let lib_name = "neural_pitch_detector"; + println!("cargo:rustc-link-search={}", lib_path.to_str().unwrap()); + println!("cargo:rustc-link-lib=static={lib_name}"); +} + +fn link_rtneural() { + let lib_path = cmake_build_dir() + .join("external") + .join("RTNeural") + .join("RTNeural"); + + let lib_name = "RTNeural"; + println!("cargo:rustc-link-search={}", lib_path.to_str().unwrap()); + println!("cargo:rustc-link-lib=static={lib_name}"); +} + +fn link_onnx_runtime() { + let lib_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("cpp") + .join("external") + .join("onnxruntime") + .join("lib"); + let lib_name = "onnxruntime"; + println!("cargo:rustc-link-search={}", lib_path.to_str().unwrap()); + println!("cargo:rustc-link-lib=static={lib_name}"); +} + +fn main() { + println!("cargo:rerun-if-changed=build.rs"); + + let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap(); + + match target_os.as_str() { + "macos" => { + println!("cargo:warning=compiling for macos"); + + println!("cargo:rustc-link-lib=c++"); + println!("cargo:rustc-link-lib=framework=Foundation"); + link_onnx_runtime(); + link_rtneural(); + link_neural_pitch(); + } + "android" => { + println!("cargo:warning=compiling for android"); + + configure_cmake_for_android(); + build_with_cmake_android(); + + add_link_search_paths(&[ + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/abseil_cpp-build/absl/hash", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/abseil_cpp-build/absl/base", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/abseil_cpp-build/absl/container", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/pytorch_cpuinfo-build", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/pytorch_cpuinfo-build/deps/clog", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/google_nsync-build", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/protobuf-build", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/onnx-build", + "/Users/wouter/Dev/cpp/onnxruntime/build/Android/Release/_deps/re2-build", + ]); + + link_static_libs(&[ + "onnxruntime_common", + "onnx_test_data_proto", + "onnx_test_runner_common", + "onnxruntime_flatbuffers", + "onnxruntime_framework", + "onnxruntime_graph", + "onnxruntime_mlas", + "onnxruntime_optimizer", + "onnxruntime_providers", + "onnxruntime_session", + "onnxruntime_test_utils", + "onnxruntime_util", + "absl_city", + "absl_hash", + "absl_low_level_hash", + "absl_throw_delegate", + "absl_raw_logging_internal", + "absl_raw_hash_set", + "cpuinfo", + "clog", + "nsync_cpp", + "protobuf-lite", + "onnx", + "onnx_proto", + "re2", + ]); + + add_link_search_path(format!( + "{}/android_libs", + std::env::var("OUT_DIR").unwrap() + )); + link_static_lib("neural_pitch_detector"); + link_static_lib("RTNeural"); + + let ndk_dir = + std::env::var("ANDROID_NDK_HOME").expect("set `ANDROID_NDK_HOME` env variable"); + add_link_search_path(format!("{ndk_dir}/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android")); + println!("cargo:rustc-link-lib=c++_shared") + } + _ => {} + } +} + +fn build_with_cmake_android() { + let cmake_output = std::process::Command::new("cmake") + .args([ + "--build", + &format!("{}/cmake-build-release", std::env::var("OUT_DIR").unwrap()), + ]) + .current_dir("cpp") + .spawn() + .unwrap() + .wait_with_output() + .unwrap(); + + if !cmake_output.status.success() { + let stdout = String::from_utf8(cmake_output.stdout).unwrap(); + let stderr = String::from_utf8(cmake_output.stderr).unwrap(); + panic!("failed to build with cmake: \n\nstdout: {stdout}\n\nstderr: {stderr}"); + } +} + +fn configure_cmake_for_android() { + let ndk_dir = std::env::var("ANDROID_NDK_HOME").expect("set `ANDROID_NDK_HOME` env variable"); + let out_dir = std::env::var("OUT_DIR").unwrap(); + + let cmake_output = std::process::Command::new("cmake") + .args([ + "-S", + ".", + "-B", + &format!("{out_dir}/cmake-build-release"), + &format!("-DCMAKE_ANDROID_NDK='{ndk_dir}'"), + &format!("-DCMAKE_TOOLCHAIN_FILE='{ndk_dir}/build/cmake/android.toolchain.cmake'"), + "-DCMAKE_BUILD_TYPE=Release", + "-DANDROID_ABI=arm64-v8a", + "-DANDROID_PLATFORM=android-33", + "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", + "-DANDROID_STL=c++_shared", + &format!("-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY='{out_dir}/android_libs'"), + ]) + .current_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/cpp")) + .spawn() + .unwrap() + .wait_with_output() + .unwrap(); + + if !cmake_output.status.success() { + let stdout = String::from_utf8(cmake_output.stdout).unwrap(); + let stderr = String::from_utf8(cmake_output.stderr).unwrap(); + panic!("failed to build configure cmake: \n\nstdout: {stdout}\n\nstderr: {stderr}"); + } +} diff --git a/cpp/.clang-format b/cpp/.clang-format new file mode 100644 index 0000000..60172a5 --- /dev/null +++ b/cpp/.clang-format @@ -0,0 +1,5 @@ +BasedOnStyle: LLVM +Standard: Latest +IndentWidth: 4 +TabWidth: 4 +UseTab: Never \ No newline at end of file diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt new file mode 100644 index 0000000..903cbbb --- /dev/null +++ b/cpp/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.16) + +project(neural_pitch_detector VERSION 0.0.1) + +enable_language(CXX C) + +set(CMAKE_CXX_STANDARD 17) + +add_subdirectory(external/RTNeural) + +add_library(onnx_runtime STATIC IMPORTED) +set_property(TARGET onnx_runtime PROPERTY IMPORTED_LOCATION + "${CMAKE_CURRENT_LIST_DIR}/external/onnxruntime/lib/libonnxruntime.a") + + +add_library(neural_pitch_detector STATIC + source/lib.cpp + source/features.h + source/features.cpp + source/constants.h + source/pitch_cnn.h + source/pitch_cnn.cpp + source/pitch_detector.h + source/pitch_detector.cpp + source/notes.h + source/notes.cpp) + +target_include_directories(neural_pitch_detector PUBLIC "${CMAKE_CURRENT_LIST_DIR}/external/onnxruntime/include") +target_link_libraries(neural_pitch_detector PUBLIC RTNeural) +target_compile_features(neural_pitch_detector PRIVATE cxx_std_17) \ No newline at end of file diff --git a/cpp/compile-android.sh b/cpp/compile-android.sh new file mode 100755 index 0000000..fda942b --- /dev/null +++ b/cpp/compile-android.sh @@ -0,0 +1,15 @@ + +# building onnxruntime from the repo dir (checkout stable version tag) +# ./build.sh --android --android_sdk_path "~/Library/Android/sdk" --android_ndk_path "~/Library/Android/sdk/ndk/25.2.9519653" --android_abi "arm64-v8a" --android_api 33 + +cmake -S . -B build-android-release \ + -DCMAKE_ANDROID_NDK="/Users/wouter/Library/Android/sdk/ndk/25.2.9519653" \ + -DCMAKE_TOOLCHAIN_FILE="/Users/wouter/Library/Android/sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake" \ + -DCMAKE_BUILD_TYPE=Release \ + -DANDROID_ABI=arm64-v8a \ + -DANDROID_PLATFORM=android-33 \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DANDROID_STL=c++_shared \ + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY="$(pwd)/android_libs" + +cmake --build build-android-release --target neural_pitch_detector \ No newline at end of file diff --git a/cpp/external/RTNeural b/cpp/external/RTNeural new file mode 160000 index 0000000..c5ba9c8 --- /dev/null +++ b/cpp/external/RTNeural @@ -0,0 +1 @@ +Subproject commit c5ba9c8bf8511b10e372bde9adf6de3efd46a19b diff --git a/cpp/external/onnxruntime/include/coreml_provider_factory.h b/cpp/external/onnxruntime/include/coreml_provider_factory.h new file mode 100644 index 0000000..f7857a3 --- /dev/null +++ b/cpp/external/onnxruntime/include/coreml_provider_factory.h @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +#pragma once + +#include "onnxruntime_c_api.h" + +// COREMLFlags are bool options we want to set for CoreML EP +// This enum is defined as bit flags, and cannot have negative value +// To generate an uint32_t coreml_flags for using with OrtSessionOptionsAppendExecutionProvider_CoreML below, +// uint32_t coreml_flags = 0; +// coreml_flags |= COREML_FLAG_USE_CPU_ONLY; +enum COREMLFlags { + COREML_FLAG_USE_NONE = 0x000, + + // Using CPU only in CoreML EP, this may decrease the perf but will provide + // reference output value without precision loss, which is useful for validation + COREML_FLAG_USE_CPU_ONLY = 0x001, + + // Enable CoreML EP on subgraph + COREML_FLAG_ENABLE_ON_SUBGRAPH = 0x002, + + // By default CoreML Execution provider will be enabled for all compatible Apple devices + // Enable this option will only enable CoreML EP for Apple devices with ANE (Apple Neural Engine) + // Please note, enable this option does not guarantee the entire model to be executed using ANE only + COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE = 0x004, + + // Keep COREML_FLAG_MAX at the end of the enum definition + // And assign the last COREMLFlag to it + COREML_FLAG_LAST = COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE, +}; + +#ifdef __cplusplus +extern "C" { +#endif + +ORT_EXPORT ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CoreML, + _In_ OrtSessionOptions* options, uint32_t coreml_flags); + +#ifdef __cplusplus +} +#endif diff --git a/cpp/external/onnxruntime/include/cpu_provider_factory.h b/cpp/external/onnxruntime/include/cpu_provider_factory.h new file mode 100644 index 0000000..2926786 --- /dev/null +++ b/cpp/external/onnxruntime/include/cpu_provider_factory.h @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#include "onnxruntime_c_api.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \param use_arena zero: false. non-zero: true. + */ +ORT_EXPORT +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CPU, _In_ OrtSessionOptions* options, int use_arena) +ORT_ALL_ARGS_NONNULL; + +#ifdef __cplusplus +} +#endif diff --git a/cpp/external/onnxruntime/include/onnxruntime_c_api.h b/cpp/external/onnxruntime/include/onnxruntime_c_api.h new file mode 100644 index 0000000..44875b0 --- /dev/null +++ b/cpp/external/onnxruntime/include/onnxruntime_c_api.h @@ -0,0 +1,3987 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// See docs\c_cxx\README.md on generating the Doxygen documentation from this file + +/** \mainpage C & C++ APIs + * + *

C

+ * + * ::OrtApi - Click here to go to the structure with all C API functions. + * + *

C++

+ * + * ::Ort - Click here to go to the namespace holding all of the C++ wrapper classes + * + * It is a set of header only wrapper classes around the C API. The goal is to turn the C style return value error codes into C++ exceptions, and to + * automate memory management through standard C++ RAII principles. + * + * \addtogroup Global + * ONNX Runtime C API + * @{ + */ + +#pragma once +#include +#include +#include + +/** \brief The API version defined in this header + * + * This value is used by some API functions to behave as this version of the header expects. + */ +#define ORT_API_VERSION 14 + +#ifdef __cplusplus +extern "C" { +#endif + +//! @} +// SAL2 Definitions +#ifndef _WIN32 +#define _In_ +#define _In_z_ +#define _In_opt_ +#define _In_opt_z_ +#define _Out_ +#define _Outptr_ +#define _Out_opt_ +#define _Inout_ +#define _Inout_opt_ +#define _Frees_ptr_opt_ +#define _Ret_maybenull_ +#define _Ret_notnull_ +#define _Check_return_ +#define _Outptr_result_maybenull_ +#define _In_reads_(X) +#define _Inout_updates_all_(X) +#define _Out_writes_bytes_all_(X) +#define _Out_writes_all_(X) +#define _Success_(X) +#define _Outptr_result_buffer_maybenull_(X) +#define ORT_ALL_ARGS_NONNULL __attribute__((nonnull)) +#else +#include +#define ORT_ALL_ARGS_NONNULL +#endif + +#ifdef _WIN32 +// Define ORT_DLL_IMPORT if your program is dynamically linked to Ort. +// dllexport is not used, we use a .def file. +#ifdef ORT_DLL_IMPORT +#define ORT_EXPORT __declspec(dllimport) +#else +#define ORT_EXPORT +#endif +#define ORT_API_CALL _stdcall +#define ORT_MUST_USE_RESULT +#define ORTCHAR_T wchar_t +#else +// To make symbols visible on macOS/iOS +#ifdef __APPLE__ +#define ORT_EXPORT __attribute__((visibility("default"))) +#else +#define ORT_EXPORT +#endif +#define ORT_API_CALL +#define ORT_MUST_USE_RESULT __attribute__((warn_unused_result)) +#define ORTCHAR_T char +#endif + +#ifndef ORT_TSTR +#ifdef _WIN32 +#define ORT_TSTR(X) L##X +#else +#define ORT_TSTR(X) X +#endif +#endif + +// Any pointer marked with _In_ or _Out_, cannot be NULL. + +// Windows users should use unicode paths when possible to bypass the MAX_PATH limitation +// Every pointer marked with _In_ or _Out_, cannot be NULL. Caller should ensure that. +// for ReleaseXXX(...) functions, they can accept NULL pointer. + +#ifdef __cplusplus +// For any compiler with C++11 support, MSVC 2015 and greater, or Clang version supporting noexcept. +// Such complex condition is needed because compilers set __cplusplus value differently. +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +#if ((__cplusplus >= 201103L) || (_MSC_VER >= 1900) || (defined(__has_feature) && __has_feature(cxx_noexcept))) +#define NO_EXCEPTION noexcept +#else +#define NO_EXCEPTION throw() +#endif +#else +#define NO_EXCEPTION +#endif + +// __VA_ARGS__ on Windows and Linux are different +#define ORT_API(RETURN_TYPE, NAME, ...) RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION + +#define ORT_API_STATUS(NAME, ...) \ + _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) \ + NO_EXCEPTION ORT_MUST_USE_RESULT + +// XXX: Unfortunately, SAL annotations are known to not work with function pointers +#define ORT_API2_STATUS(NAME, ...) \ + _Check_return_ _Ret_maybenull_ OrtStatusPtr(ORT_API_CALL* NAME)(__VA_ARGS__) NO_EXCEPTION ORT_MUST_USE_RESULT + +// Used in *.cc files. Almost as same as ORT_API_STATUS, except without ORT_MUST_USE_RESULT and ORT_EXPORT +#define ORT_API_STATUS_IMPL(NAME, ...) \ + _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION + +#define ORT_CLASS_RELEASE(X) void(ORT_API_CALL * Release##X)(_Frees_ptr_opt_ Ort##X * input) + +#ifdef __DOXYGEN__ +#undef ORT_API_STATUS +#define ORT_API_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__) +#undef ORT_API2_STATUS +#define ORT_API2_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__) +#undef ORT_CLASS_RELEASE +#define ORT_CLASS_RELEASE(X) void Release##X(Ort##X* input) +#undef NO_EXCEPTION +#define NO_EXCEPTION +#endif +/** \addtogroup Global + * ONNX Runtime C API + * @{ + */ + +/** Copied from TensorProto::DataType + * Currently, Ort doesn't support complex64, complex128 + */ +typedef enum ONNXTensorElementDataType { + ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT, // maps to c type float + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8, // maps to c type uint8_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8, // maps to c type int8_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16, // maps to c type uint16_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16, // maps to c type int16_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32, // maps to c type int32_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64, // maps to c type int64_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING, // maps to c++ type std::string + ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16, + ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE, // maps to c type double + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32, // maps to c type uint32_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64, // maps to c type uint64_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64, // complex with float32 real and imaginary components + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128, // complex with float64 real and imaginary components + ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16 // Non-IEEE floating-point format based on IEEE754 single-precision +} ONNXTensorElementDataType; + +// Synced with onnx TypeProto oneof +typedef enum ONNXType { + ONNX_TYPE_UNKNOWN, + ONNX_TYPE_TENSOR, + ONNX_TYPE_SEQUENCE, + ONNX_TYPE_MAP, + ONNX_TYPE_OPAQUE, + ONNX_TYPE_SPARSETENSOR, + ONNX_TYPE_OPTIONAL +} ONNXType; + +// These types are synced with internal +// SparseFormatFlags +typedef enum OrtSparseFormat { + ORT_SPARSE_UNDEFINED = 0, + ORT_SPARSE_COO = 0x1, + ORT_SPARSE_CSRC = 0x2, + ORT_SPARSE_BLOCK_SPARSE = 0x4 +} OrtSparseFormat; + +// Enum allows to query sparse tensor indices +enum OrtSparseIndicesFormat { + ORT_SPARSE_COO_INDICES, + ORT_SPARSE_CSR_INNER_INDICES, + ORT_SPARSE_CSR_OUTER_INDICES, + ORT_SPARSE_BLOCK_SPARSE_INDICES +}; + +/** \brief Logging severity levels + * + * In typical API usage, specifying a logging severity level specifies the minimum severity of log messages to show. + */ +typedef enum OrtLoggingLevel { + ORT_LOGGING_LEVEL_VERBOSE, ///< Verbose informational messages (least severe). + ORT_LOGGING_LEVEL_INFO, ///< Informational messages. + ORT_LOGGING_LEVEL_WARNING, ///< Warning messages. + ORT_LOGGING_LEVEL_ERROR, ///< Error messages. + ORT_LOGGING_LEVEL_FATAL, ///< Fatal error messages (most severe). +} OrtLoggingLevel; + +typedef enum OrtErrorCode { + ORT_OK, + ORT_FAIL, + ORT_INVALID_ARGUMENT, + ORT_NO_SUCHFILE, + ORT_NO_MODEL, + ORT_ENGINE_ERROR, + ORT_RUNTIME_EXCEPTION, + ORT_INVALID_PROTOBUF, + ORT_MODEL_LOADED, + ORT_NOT_IMPLEMENTED, + ORT_INVALID_GRAPH, + ORT_EP_FAIL, +} OrtErrorCode; + +typedef enum OrtOpAttrType { + ORT_OP_ATTR_UNDEFINED = 0, + ORT_OP_ATTR_INT, + ORT_OP_ATTR_INTS, + ORT_OP_ATTR_FLOAT, + ORT_OP_ATTR_FLOATS, + ORT_OP_ATTR_STRING, + ORT_OP_ATTR_STRINGS, +} OrtOpAttrType; + +//! @} +#define ORT_RUNTIME_CLASS(X) \ + struct Ort##X; \ + typedef struct Ort##X Ort##X; + +/** \addtogroup Global + * ONNX Runtime C API + * @{ + */ +// The actual types defined have an Ort prefix +ORT_RUNTIME_CLASS(Env); +ORT_RUNTIME_CLASS(Status); // nullptr for Status* indicates success +ORT_RUNTIME_CLASS(MemoryInfo); +ORT_RUNTIME_CLASS(IoBinding); +ORT_RUNTIME_CLASS(Session); // Don't call ReleaseSession from Dllmain (because session owns a thread pool) +ORT_RUNTIME_CLASS(Value); +ORT_RUNTIME_CLASS(RunOptions); +ORT_RUNTIME_CLASS(TypeInfo); +ORT_RUNTIME_CLASS(TensorTypeAndShapeInfo); +ORT_RUNTIME_CLASS(SessionOptions); +ORT_RUNTIME_CLASS(CustomOpDomain); +ORT_RUNTIME_CLASS(MapTypeInfo); +ORT_RUNTIME_CLASS(SequenceTypeInfo); +ORT_RUNTIME_CLASS(ModelMetadata); +ORT_RUNTIME_CLASS(ThreadPoolParams); +ORT_RUNTIME_CLASS(ThreadingOptions); +ORT_RUNTIME_CLASS(ArenaCfg); +ORT_RUNTIME_CLASS(PrepackedWeightsContainer); +ORT_RUNTIME_CLASS(TensorRTProviderOptionsV2); +ORT_RUNTIME_CLASS(CUDAProviderOptionsV2); +ORT_RUNTIME_CLASS(CANNProviderOptions); +ORT_RUNTIME_CLASS(Op); +ORT_RUNTIME_CLASS(OpAttr); + +#ifdef _WIN32 +typedef _Return_type_success_(return == 0) OrtStatus* OrtStatusPtr; +#else +typedef OrtStatus* OrtStatusPtr; +#endif + +/** \brief Memory allocation interface + * + * Structure of function pointers that defines a memory allocator. This can be created and filled in by the user for custom allocators. + * + * When an allocator is passed to any function, be sure that the allocator object is not destroyed until the last allocated object using it is freed. + */ +typedef struct OrtAllocator { + uint32_t version; ///< Must be initialized to ORT_API_VERSION + void*(ORT_API_CALL* Alloc)(struct OrtAllocator* this_, size_t size); ///< Returns a pointer to an allocated block of `size` bytes + void(ORT_API_CALL* Free)(struct OrtAllocator* this_, void* p); ///< Free a block of memory previously allocated with OrtAllocator::Alloc + const struct OrtMemoryInfo*(ORT_API_CALL* Info)(const struct OrtAllocator* this_); ///< Return a pointer to an ::OrtMemoryInfo that describes this allocator +} OrtAllocator; + +typedef void(ORT_API_CALL* OrtLoggingFunction)( + void* param, OrtLoggingLevel severity, const char* category, const char* logid, const char* code_location, + const char* message); + +/** \brief Graph optimization level + * + * Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html + * for an in-depth understanding of Graph Optimizations + */ +typedef enum GraphOptimizationLevel { + ORT_DISABLE_ALL = 0, + ORT_ENABLE_BASIC = 1, + ORT_ENABLE_EXTENDED = 2, + ORT_ENABLE_ALL = 99 +} GraphOptimizationLevel; + +typedef enum ExecutionMode { + ORT_SEQUENTIAL = 0, + ORT_PARALLEL = 1, +} ExecutionMode; + +/** \brief Language projection identifiers + * /see OrtApi::SetLanguageProjection + */ +typedef enum OrtLanguageProjection { + ORT_PROJECTION_C = 0, + ORT_PROJECTION_CPLUSPLUS = 1, + ORT_PROJECTION_CSHARP = 2, + ORT_PROJECTION_PYTHON = 3, + ORT_PROJECTION_JAVA = 4, + ORT_PROJECTION_WINML = 5, + ORT_PROJECTION_NODEJS = 6, +} OrtLanguageProjection; + +struct OrtKernelInfo; +typedef struct OrtKernelInfo OrtKernelInfo; +struct OrtKernelContext; +typedef struct OrtKernelContext OrtKernelContext; +struct OrtCustomOp; +typedef struct OrtCustomOp OrtCustomOp; + +typedef enum OrtAllocatorType { + OrtInvalidAllocator = -1, + OrtDeviceAllocator = 0, + OrtArenaAllocator = 1 +} OrtAllocatorType; + +/** \brief Memory types for allocated memory, execution provider specific types should be extended in each provider. + */ +// Whenever this struct is updated, please also update the MakeKey function in onnxruntime / core / framework / execution_provider.cc +typedef enum OrtMemType { + OrtMemTypeCPUInput = -2, ///< Any CPU memory used by non-CPU execution provider + OrtMemTypeCPUOutput = -1, ///< CPU accessible memory outputted by non-CPU execution provider, i.e. CUDA_PINNED + OrtMemTypeCPU = OrtMemTypeCPUOutput, ///< Temporary CPU accessible memory allocated by non-CPU execution provider, i.e. CUDA_PINNED + OrtMemTypeDefault = 0, ///< The default allocator for execution provider +} OrtMemType; + +/** \brief This mimics OrtDevice type constants so they can be returned in the API + */ +typedef enum OrtMemoryInfoDeviceType { + OrtMemoryInfoDeviceType_CPU = 0, + OrtMemoryInfoDeviceType_GPU = 1, + OrtMemoryInfoDeviceType_FPGA = 2 +} OrtMemoryInfoDeviceType; + +/** \brief Algorithm to use for cuDNN Convolution Op + */ +typedef enum OrtCudnnConvAlgoSearch { + OrtCudnnConvAlgoSearchExhaustive, // expensive exhaustive benchmarking using cudnnFindConvolutionForwardAlgorithmEx + OrtCudnnConvAlgoSearchHeuristic, // lightweight heuristic based search using cudnnGetConvolutionForwardAlgorithm_v7 + OrtCudnnConvAlgoSearchDefault, // default algorithm using CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM +} OrtCudnnConvAlgoSearch; + +/** \brief CUDA Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_CUDA + */ +typedef struct OrtCUDAProviderOptions { +#ifdef __cplusplus + OrtCUDAProviderOptions() + : device_id{}, + cudnn_conv_algo_search{OrtCudnnConvAlgoSearchExhaustive}, + gpu_mem_limit{SIZE_MAX}, + arena_extend_strategy{}, + do_copy_in_default_stream{1}, + has_user_compute_stream{}, + user_compute_stream{}, + default_memory_arena_cfg{}, + tunable_op_enabled{false} {} +#endif + + /** \brief CUDA device Id + * Defaults to 0. + */ + int device_id; + + /** \brief CUDA Convolution algorithm search configuration. + * See enum OrtCudnnConvAlgoSearch for more details. + * Defaults to OrtCudnnConvAlgoSearchExhaustive. + */ + OrtCudnnConvAlgoSearch cudnn_conv_algo_search; + + /** \brief CUDA memory limit (To use all possible memory pass in maximum size_t) + * Defaults to SIZE_MAX. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + size_t gpu_mem_limit; + + /** \brief Strategy used to grow the memory arena + * 0 = kNextPowerOfTwo
+ * 1 = kSameAsRequested
+ * Defaults to 0. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + int arena_extend_strategy; + + /** \brief Flag indicating if copying needs to take place on the same stream as the compute stream in the CUDA EP + * 0 = Use separate streams for copying and compute. + * 1 = Use the same stream for copying and compute. + * Defaults to 1. + * WARNING: Setting this to 0 may result in data races for some models. + * Please see issue #4829 for more details. + */ + int do_copy_in_default_stream; + + /** \brief Flag indicating if there is a user provided compute stream + * Defaults to 0. + */ + int has_user_compute_stream; + + /** \brief User provided compute stream. + * If provided, please set `has_user_compute_stream` to 1. + */ + void* user_compute_stream; + + /** \brief CUDA memory arena configuration parameters + */ + OrtArenaCfg* default_memory_arena_cfg; + + /** \brief Enable TunableOp. + * Set it to 1 to enable TunableOp. Otherwise, it is disabled by default. + * This option can be superseded by environment variable ORT_CUDA_TUNABLE_OP_ENABLED. + */ + int tunable_op_enabled; + +} OrtCUDAProviderOptions; + +/** \brief ROCM Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_ROCM + */ +typedef struct OrtROCMProviderOptions { +#ifdef __cplusplus + OrtROCMProviderOptions() + : device_id{}, + miopen_conv_exhaustive_search{0}, + gpu_mem_limit{SIZE_MAX}, + arena_extend_strategy{}, + do_copy_in_default_stream{1}, + has_user_compute_stream{}, + user_compute_stream{}, + default_memory_arena_cfg{}, + tunable_op_enabled{false} {} +#endif + + /** \brief ROCM device Id + * Defaults to 0. + */ + int device_id; + + /** \brief ROCM MIOpen Convolution algorithm exaustive search option. + * Defaults to 0 (false). + */ + int miopen_conv_exhaustive_search; + + /** \brief ROCM memory limit (To use all possible memory pass in maximum size_t) + * Defaults to SIZE_MAX. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + size_t gpu_mem_limit; + + /** \brief Strategy used to grow the memory arena + * 0 = kNextPowerOfTwo
+ * 1 = kSameAsRequested
+ * Defaults to 0. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + int arena_extend_strategy; + + /** \brief Flag indicating if copying needs to take place on the same stream as the compute stream in the ROCM EP + * 0 = Use separate streams for copying and compute. + * 1 = Use the same stream for copying and compute. + * Defaults to 1. + * WARNING: Setting this to 0 may result in data races for some models. + * Please see issue #4829 for more details. + */ + int do_copy_in_default_stream; + + /** \brief Flag indicating if there is a user provided compute stream + * Defaults to 0. + */ + int has_user_compute_stream; + + /** \brief User provided compute stream. + * If provided, please set `has_user_compute_stream` to 1. + */ + void* user_compute_stream; + + /** \brief ROCM memory arena configuration parameters + */ + OrtArenaCfg* default_memory_arena_cfg; + + /** \brief Enable TunableOp. + * Set it to 1 to enable TunableOp. Otherwise, it is disabled by default. + * This option can be superseded by environment variable ORT_ROCM_TUNABLE_OP_ENABLED. + */ + int tunable_op_enabled; + +} OrtROCMProviderOptions; + +/** \brief TensorRT Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + */ +typedef struct OrtTensorRTProviderOptions { + int device_id; ///< CUDA device id (0 = default device) + int has_user_compute_stream; // indicator of user specified CUDA compute stream. + void* user_compute_stream; // user specified CUDA compute stream. + int trt_max_partition_iterations; // maximum iterations for TensorRT parser to get capability + int trt_min_subgraph_size; // minimum size of TensorRT subgraphs + size_t trt_max_workspace_size; // maximum workspace size for TensorRT. + int trt_fp16_enable; // enable TensorRT FP16 precision. Default 0 = false, nonzero = true + int trt_int8_enable; // enable TensorRT INT8 precision. Default 0 = false, nonzero = true + const char* trt_int8_calibration_table_name; // TensorRT INT8 calibration table name. + int trt_int8_use_native_calibration_table; // use native TensorRT generated calibration table. Default 0 = false, nonzero = true + int trt_dla_enable; // enable DLA. Default 0 = false, nonzero = true + int trt_dla_core; // DLA core number. Default 0 + int trt_dump_subgraphs; // dump TRT subgraph. Default 0 = false, nonzero = true + int trt_engine_cache_enable; // enable engine caching. Default 0 = false, nonzero = true + const char* trt_engine_cache_path; // specify engine cache path + int trt_engine_decryption_enable; // enable engine decryption. Default 0 = false, nonzero = true + const char* trt_engine_decryption_lib_path; // specify engine decryption library path + int trt_force_sequential_engine_build; // force building TensorRT engine sequentially. Default 0 = false, nonzero = true + // This is the legacy struct and don't add new fields here. + // For new field that can be represented by string, please add it in include/onnxruntime/core/providers/tensorrt/tensorrt_provider_options.h + // For non-string field, need to create a new separate api to handle it. +} OrtTensorRTProviderOptions; + +/** \brief MIGraphX Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX + */ +typedef struct OrtMIGraphXProviderOptions { + int device_id; // hip device id. + int migraphx_fp16_enable; // enable MIGraphX FP16 precision. Default 0 = false, nonzero = true + int migraphx_int8_enable; // enable MIGraphX INT8 precision. Default 0 = false, nonzero = true +} OrtMIGraphXProviderOptions; + +/** \brief OpenVINO Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO + */ +typedef struct OrtOpenVINOProviderOptions { +#ifdef __cplusplus + OrtOpenVINOProviderOptions() : device_type{}, enable_vpu_fast_compile{}, device_id{}, + num_of_threads{}, cache_dir{}, + context{}, enable_opencl_throttling{}, enable_dynamic_shapes{} {} +#endif + /** \brief Device type string + * + * Valid settings are one of: "CPU_FP32", "CPU_FP16", "GPU_FP32", "GPU_FP16", "MYRIAD_FP16", "VAD-M_FP16" or "VAD-F_FP32" + */ + const char* device_type; + unsigned char enable_vpu_fast_compile; ///< 0 = disabled, nonzero = enabled + const char* device_id; + size_t num_of_threads; ///< 0 = Use default number of threads + const char* cache_dir; // path is set to empty by default + void* context; + unsigned char enable_opencl_throttling; ///< 0 = disabled, nonzero = enabled + unsigned char enable_dynamic_shapes; ///< 0 = disabled, nonzero = enabled +} OrtOpenVINOProviderOptions; + +struct OrtApi; +typedef struct OrtApi OrtApi; + +struct OrtTrainingApi; +typedef struct OrtTrainingApi OrtTrainingApi; + +/** \brief The helper interface to get the right version of OrtApi + * + * Get a pointer to this structure through ::OrtGetApiBase + */ +struct OrtApiBase { + /** \brief Get a pointer to the requested version of the ::OrtApi + * + * \param[in] version Must be ::ORT_API_VERSION + * \return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime + * older than the version created with this header file. + */ + const OrtApi*(ORT_API_CALL* GetApi)(uint32_t version)NO_EXCEPTION; + const char*(ORT_API_CALL* GetVersionString)(void)NO_EXCEPTION; ///< Returns a null terminated string of the version of the Onnxruntime library (eg: "1.8.1") +}; +typedef struct OrtApiBase OrtApiBase; + +/** \brief The Onnxruntime library's entry point to access the C API + * + * Call this to get the a pointer to an ::OrtApiBase + */ +ORT_EXPORT const OrtApiBase* ORT_API_CALL OrtGetApiBase(void) NO_EXCEPTION; + +/** \brief Thread work loop function + * + * Onnxruntime will provide the working loop on custom thread creation + * Argument is an onnxruntime built-in type which will be provided when thread pool calls OrtCustomCreateThreadFn + */ +typedef void (*OrtThreadWorkerFn)(void* ort_worker_fn_param); + +typedef const struct OrtCustomHandleType { + char __place_holder; +}* OrtCustomThreadHandle; + +/** \brief Ort custom thread creation function + * + * The function should return a thread handle to be used in onnxruntime thread pools + * Onnxruntime will throw exception on return value of nullptr or 0, indicating that the function failed to create a thread + */ +typedef OrtCustomThreadHandle (*OrtCustomCreateThreadFn)(void* ort_custom_thread_creation_options, OrtThreadWorkerFn ort_thread_worker_fn, void* ort_worker_fn_param); + +/** \brief Custom thread join function + * + * Onnxruntime thread pool destructor will call the function to join a custom thread. + * Argument ort_custom_thread_handle is the value returned by OrtCustomCreateThreadFn + */ +typedef void (*OrtCustomJoinThreadFn)(OrtCustomThreadHandle ort_custom_thread_handle); + +typedef OrtStatus*(ORT_API_CALL* RegisterCustomOpsFn)(OrtSessionOptions* options, const OrtApiBase* api); + +/** \brief The C API + * + * All C API functions are defined inside this structure as pointers to functions. + * Call OrtApiBase::GetApi to get a pointer to it + * + * \nosubgrouping + */ +struct OrtApi { + /// \name OrtStatus + /// @{ + + /** + * \brief Create an OrtStatus from a null terminated string + * + * \param[in] code + * \param[in] msg A null-terminated string. Its contents will be copied. + * \return A new OrtStatus object, must be destroyed with OrtApi::ReleaseStatus + */ + OrtStatus*(ORT_API_CALL* CreateStatus)(OrtErrorCode code, _In_ const char* msg)NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Get OrtErrorCode from OrtStatus + * + * \param[in] status + * \return OrtErrorCode that \p status was created with + */ + OrtErrorCode(ORT_API_CALL* GetErrorCode)(_In_ const OrtStatus* status) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Get error string from OrtStatus + * + * \param[in] status + * \return The error message inside the `status`. Do not free the returned value. + */ + const char*(ORT_API_CALL* GetErrorMessage)(_In_ const OrtStatus* status)NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an OrtEnv + * + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnv, OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out); + + /** \brief Create an OrtEnv + * + * \param[in] logging_function A pointer to a logging function. + * \param[in] logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `logging_function`. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithCustomLogger, OrtLoggingFunction logging_function, _In_opt_ void* logger_param, + OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out); + + /** \brief Enable Telemetry + * + * \note Telemetry events are on by default since they are lightweight + * \param[in] env + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableTelemetryEvents, _In_ const OrtEnv* env); + /** \brief Disable Telemetry + * + * \see OrtApi::EnableTelemetryEvents + * \param[in] env + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableTelemetryEvents, _In_ const OrtEnv* env); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Create an OrtSession from a model file + * + * \param[in] env + * \param[in] model_path + * \param[in] options + * \param[out] out Returned newly created OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + // TODO: document the path separator convention? '/' vs '\' + // TODO: should specify the access characteristics of model_path. Is this read only during the + // execution of CreateSession, or does the OrtSession retain a handle to the file/directory + // and continue to access throughout the OrtSession lifetime? + // What sort of access is needed to model_path : read or read/write? + ORT_API2_STATUS(CreateSession, _In_ const OrtEnv* env, _In_ const ORTCHAR_T* model_path, + _In_ const OrtSessionOptions* options, _Outptr_ OrtSession** out); + + /** \brief Create an OrtSession from memory + * + * \param[in] env + * \param[in] model_data + * \param[in] model_data_length + * \param[in] options + * \param[out] out Returned newly created OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionFromArray, _In_ const OrtEnv* env, _In_ const void* model_data, size_t model_data_length, + _In_ const OrtSessionOptions* options, _Outptr_ OrtSession** out); + + /** \brief Run the model in an ::OrtSession + * + * Will not return until the model run has completed. Multiple threads might be used to run the model based on + * the options in the ::OrtSession and settings used when creating the ::OrtEnv + * + * \param[in] session + * \param[in] run_options If nullptr, will use a default ::OrtRunOptions + * \param[in] input_names Array of null terminated UTF8 encoded strings of the input names + * \param[in] inputs Array of ::OrtValue%s of the input values + * \param[in] input_len Number of elements in the input_names and inputs arrays + * \param[in] output_names Array of null terminated UTF8 encoded strings of the output names + * \param[in] output_names_len Number of elements in the output_names and outputs array + * \param[out] outputs Array of ::OrtValue%s that the outputs are stored in. This can also be + * an array of nullptr values, in this case ::OrtValue objects will be allocated and pointers + * to them will be set into the `outputs` array. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(Run, _Inout_ OrtSession* session, _In_opt_ const OrtRunOptions* run_options, + _In_reads_(input_len) const char* const* input_names, + _In_reads_(input_len) const OrtValue* const* inputs, size_t input_len, + _In_reads_(output_names_len) const char* const* output_names, size_t output_names_len, + _Inout_updates_all_(output_names_len) OrtValue** outputs); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Create an ::OrtSessionOptions object + * + * To use additional providers, you must build ORT with the extra providers enabled. Then call one of these + * functions to enable them in the session:
+ * OrtSessionOptionsAppendExecutionProvider_CPU
+ * OrtSessionOptionsAppendExecutionProvider_CUDA
+ * OrtSessionOptionsAppendExecutionProvider_(remaining providers...)
+ * The order they are called indicates the preference order as well. In other words call this method + * on your most preferred execution provider first followed by the less preferred ones. + * If none are called Ort will use its internal CPU execution provider. + * + * \param[out] options The newly created OrtSessionOptions. Must be freed with OrtApi::ReleaseSessionOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionOptions, _Outptr_ OrtSessionOptions** options); + + /** \brief Set filepath to save optimized model after graph level transformations + * + * \param[in] options + * \param[in] optimized_model_filepath + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetOptimizedModelFilePath, _Inout_ OrtSessionOptions* options, + _In_ const ORTCHAR_T* optimized_model_filepath); + + /** \brief Create a copy of an existing ::OrtSessionOptions + * + * \param[in] in_options OrtSessionOptions to copy + * \param[out] out_options Returned newly created ::OrtSessionOptions. Must be freed with OrtApi::ReleaseSessionOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CloneSessionOptions, _In_ const OrtSessionOptions* in_options, + _Outptr_ OrtSessionOptions** out_options); + + /** \brief Set execution mode + * + * Controls whether you want to execute operators in your graph sequentially or in parallel. Usually when the model + * has many branches, setting this option to ExecutionMode.ORT_PARALLEL will give you better performance. + * See [docs/ONNX_Runtime_Perf_Tuning.md] for more details. + * + * \param[in] options + * \param[in] execution_mode + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionExecutionMode, _Inout_ OrtSessionOptions* options, ExecutionMode execution_mode); + + /** \brief Enable profiling for a session + * + * \param[in] options + * \param[in] profile_file_prefix + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableProfiling, _Inout_ OrtSessionOptions* options, _In_ const ORTCHAR_T* profile_file_prefix); + + /** \brief Disable profiling for a session + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableProfiling, _Inout_ OrtSessionOptions* options); + + /** \brief Enable the memory pattern optimization + * + * The idea is if the input shapes are the same, we could trace the internal memory allocation + * and generate a memory pattern for future request. So next time we could just do one allocation + * with a big chunk for all the internal memory allocation. + * \note Memory pattern optimization is only available when Sequential Execution mode is enabled (see OrtApi::SetSessionExecutionMode) + * + * \see OrtApi::DisableMemPattern + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableMemPattern, _Inout_ OrtSessionOptions* options); + + /** \brief Disable the memory pattern optimization + * + * \see OrtApi::EnableMemPattern + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableMemPattern, _Inout_ OrtSessionOptions* options); + + /** \brief Enable the memory arena on CPU + * + * Arena may pre-allocate memory for future usage. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableCpuMemArena, _Inout_ OrtSessionOptions* options); + + /** \brief Disable the memory arena on CPU + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableCpuMemArena, _Inout_ OrtSessionOptions* options); + + /** \brief Set session log id + * + * \param[in] options + * \param[in] logid The log identifier. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogId, _Inout_ OrtSessionOptions* options, const char* logid); + + /** \brief Set session log verbosity level + * + * Applies to session load, initialization, etc + * + * \param[in] options + * \param[in] session_log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogVerbosityLevel, _Inout_ OrtSessionOptions* options, int session_log_verbosity_level); + + /** \brief Set session log severity level + * + * \param[in] options + * \param[in] session_log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogSeverityLevel, _Inout_ OrtSessionOptions* options, int session_log_severity_level); + + /** \brief Set the optimization level to apply when loading a graph + * + * Please see https://www.onnxruntime.ai/docs/resources/graph-optimizations.html for an in-depth explanation + * \param[in,out] options The session options object + * \param[in] graph_optimization_level The optimization level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionGraphOptimizationLevel, _Inout_ OrtSessionOptions* options, + GraphOptimizationLevel graph_optimization_level); + + /** \brief Sets the number of threads used to parallelize the execution within nodes + * + * When running a single node operation, ex. add, this sets the maximum number of threads to use. + * + * \note If built with OpenMP, this has no effect on the number of threads used. In this case + * use the OpenMP env variables to configure the number of intra op num threads. + * + * \param[in] options + * \param[in] intra_op_num_threads Number of threads to use
+ * A value of 0 will use the default number of threads
+ * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetIntraOpNumThreads, _Inout_ OrtSessionOptions* options, int intra_op_num_threads); + + /** \brief Sets the number of threads used to parallelize the execution of the graph + * + * If nodes can be run in parallel, this sets the maximum number of threads to use to run them in parallel. + * + * \note If sequential execution is enabled this value is ignored, it acts as if it was set to 1. + * + * \param[in] options + * \param[in] inter_op_num_threads Number of threads to use
+ * A value of 0 will use the default number of threads
+ * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetInterOpNumThreads, _Inout_ OrtSessionOptions* options, int inter_op_num_threads); + + /// @} + /// \name OrtCustomOpDomain + /// @{ + + /** \brief Create a custom op domain + * + * \param[in] domain + * \param[out] out Newly created domain. Must be freed with OrtApi::ReleaseCustomOpDomain + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateCustomOpDomain, _In_ const char* domain, _Outptr_ OrtCustomOpDomain** out); + + /** \brief Add a custom op to a custom op domain + * + * \note The OrtCustomOp* pointer must remain valid until the ::OrtCustomOpDomain using it is released + * + * \param[in] custom_op_domain + * \param[in] op + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CustomOpDomain_Add, _Inout_ OrtCustomOpDomain* custom_op_domain, _In_ const OrtCustomOp* op); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Add custom op domain to a session options + * + * \note The OrtCustomOpDomain* must not be deleted until all sessions using it are released + * + * \param[in] options + * \param[in] custom_op_domain + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddCustomOpDomain, _Inout_ OrtSessionOptions* options, _In_ OrtCustomOpDomain* custom_op_domain); + + /** \deprecated Use OrtApi::RegisterCustomOpsLibrary_V2. + * + * Registers custom ops from a shared library. + * + * Loads a shared library (dll on windows, so on linux, etc) named 'library_path' and looks for this entry point: + * OrtStatus* RegisterCustomOps(OrtSessionOptions * options, const OrtApiBase* api); + * It then passes in the provided session options to this function along with the api base. + * The handle to the loaded library is returned in library_handle. It can be freed by the caller after all sessions using the passed in + * session options are destroyed, or if an error occurs and it is non null. + * + * \param[in] options + * \param[in] library_path + * \param[out] library_handle OS specific handle to the loaded library (Use FreeLibrary on Windows, dlclose on Linux, etc.. to unload) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RegisterCustomOpsLibrary, _Inout_ OrtSessionOptions* options, _In_ const char* library_path, _Outptr_ void** library_handle); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Get input count for a session + * + * This number must also match the number of inputs passed to OrtApi::Run + * + * \see OrtApi::SessionGetInputTypeInfo, OrtApi::SessionGetInputName, OrtApi::Session + * + * \param[in] session + * \param[out] out Number of inputs + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get output count for a session + * + * This number must also match the number of outputs returned by OrtApi::Run + * + * \see OrtApi::SessionGetOutputTypeInfo, OrtApi::SessionGetOutputName, OrtApi::Session + * + * \param[in] session + * \param[out] out Number of outputs + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get overridable initializer count + * + * \see OrtApi::SessionGetOverridableInitializerTypeInfo, OrtApi::SessionGetOverridableInitializerName + * + * \param[in] session + * \param[in] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get input type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetInputCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get output type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOutputCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get overridable initializer type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOverridableInitializerCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get input name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetInputCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputName, _In_ const OrtSession* session, size_t index, _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get output name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOutputCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputName, _In_ const OrtSession* session, size_t index, _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get overridable initializer name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOverridableInitializerCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerName, _In_ const OrtSession* session, size_t index, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /// @} + /// \name OrtRunOptions + /// @{ + + /** \brief Create an OrtRunOptions + * + * \param[out] out Returned newly created ::OrtRunOptions. Must be freed with OrtApi::ReleaseRunOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateRunOptions, _Outptr_ OrtRunOptions** out); + + /** \brief Set per-run log verbosity level + * + * \see OrtApi::RunOptionsGetRunLogVerbosityLevel + * + * \param[in] options + * \param[in] log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsSetRunLogVerbosityLevel, _Inout_ OrtRunOptions* options, int log_verbosity_level); + + /** \brief Set per-run log severity level + * + * \see OrtApi::RunOptionsGetRunLogSeverityLevel + * + * \param[in] options + * \param[in] log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + */ + ORT_API2_STATUS(RunOptionsSetRunLogSeverityLevel, _Inout_ OrtRunOptions* options, int log_severity_level); + + /** \brief Set per-run tag + * + * This is used in a per-run log identifier. + * + * \see OrtApi::RunOptionsGetRunTag + * + * \param[in] options + * \param[in] run_tag The run tag. + */ + ORT_API2_STATUS(RunOptionsSetRunTag, _Inout_ OrtRunOptions* options, _In_ const char* run_tag); + + /** \brief Get per-run log verbosity level + * + * \see OrtApi::RunOptionsSetRunLogVerbosityLevel + * + * \param[in] options + * \param[out] log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsGetRunLogVerbosityLevel, _In_ const OrtRunOptions* options, + _Out_ int* log_verbosity_level); + + /** \brief Get per-run log severity level + * + * \see OrtApi::RunOptionsSetRunLogSeverityLevel + * + * \param[in] options + * \param[out] log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + */ + ORT_API2_STATUS(RunOptionsGetRunLogSeverityLevel, _In_ const OrtRunOptions* options, _Out_ int* log_severity_level); + + /** \brief Get per-run tag + * + * This is used in a per-run log identifier. + * + * \see OrtApi::RunOptionsSetRunTag + * + * \param[in] options + * \param[out] run_tag The run tag. + * Do not free this value, it is owned by `options`. It will be invalidated if the run tag + * changes (i.e., with OrtApi::RunOptionsSetRunTag) or `options` is freed. + */ + ORT_API2_STATUS(RunOptionsGetRunTag, _In_ const OrtRunOptions* options, _Out_ const char** run_tag); + + /** \brief Set terminate flag + * + * If a currently executing session needs to be force terminated, this can be called from another thread to force it to fail with an error. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsSetTerminate, _Inout_ OrtRunOptions* options); + + /** \brief Clears the terminate flag + * + * Used so the OrtRunOptions instance can be used in a new OrtApi::Run call without it instantly terminating + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsUnsetTerminate, _Inout_ OrtRunOptions* options); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Create a tensor + * + * Create a tensor using a supplied ::OrtAllocator + * + * \param[in] allocator + * \param[in] shape Pointer to the tensor shape dimensions. + * \param[in] shape_len The number of tensor shape dimensions. + * \param[in] type + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorAsOrtValue, _Inout_ OrtAllocator* allocator, _In_ const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** \brief Create a tensor backed by a user supplied buffer + * + * Create a tensor with user's buffer. You can fill the buffer either before calling this function or after. + * p_data is owned by caller. ReleaseValue won't release p_data. + * + * \param[in] info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param[in] p_data Pointer to the data buffer. + * \param[in] p_data_len The number of bytes in the data buffer. + * \param[in] shape Pointer to the tensor shape dimensions. + * \param[in] shape_len The number of tensor shape dimensions. + * \param[in] type The data type. + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorWithDataAsOrtValue, _In_ const OrtMemoryInfo* info, _Inout_ void* p_data, + size_t p_data_len, _In_ const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type, + _Outptr_ OrtValue** out); + + /** \brief Return if an ::OrtValue is a tensor type + * + * \param[in] value A tensor type (string tensors are not supported) + * \param[out] out Set to 1 iff ::OrtValue is a tensor, 0 otherwise + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(IsTensor, _In_ const OrtValue* value, _Out_ int* out); + + /** \brief Get a pointer to the raw data inside a tensor + * + * Used to read/write/modify the internal tensor data directly. + * \note The returned pointer is valid until the \p value is destroyed. + * + * \param[in] value A tensor type (string tensors are not supported) + * \param[out] out Filled in with a pointer to the internal storage + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorMutableData, _In_ OrtValue* value, _Outptr_ void** out); + + /** \brief Set all strings at once in a string tensor + * + * \param[in,out] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[in] s An array of strings. Each string in this array must be null terminated. + * \param[in] s_len Count of strings in s (Must match the size of \p value's tensor shape) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillStringTensor, _Inout_ OrtValue* value, _In_ const char* const* s, size_t s_len); + + /** \brief Get total byte length for all strings in a string tensor + * + * Typically used with OrtApi::GetStringTensorContent + * + * \param[in] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[out] len Total byte length of all strings (does not include trailing nulls) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorDataLength, _In_ const OrtValue* value, _Out_ size_t* len); + + /** \brief Get all strings from a string tensor + * + * An example of the results:
+ * Given \p value is a string tensor with the strings { "This" "is" "a" "test" }
+ * \p s must have a size of 11 bytes
+ * \p offsets must have 4 elements
+ * After the call, these values will be filled in:
+ * \p s will contain "Thisisatest"
+ * \p offsets will contain { 0, 4, 6, 7 }
+ * The length of the last string is just s_len - offsets[last] + * + * \param[in] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[in] s Buffer to sequentially write all tensor strings to. Each string is NOT null-terminated. + * \param[in] s_len Number of bytes of buffer pointed to by \p s (Get it from OrtApi::GetStringTensorDataLength) + * \param[out] offsets Array of start offsets into the strings written to \p s + * \param[in] offsets_len Number of elements in offsets + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorContent, _In_ const OrtValue* value, _Out_writes_bytes_all_(s_len) void* s, + size_t s_len, _Out_writes_all_(offsets_len) size_t* offsets, size_t offsets_len); + + /// @} + /// \name OrtTypeInfo + /// @{ + + /** \brief Get ::OrtTensorTypeAndShapeInfo from an ::OrtTypeInfo + * + * \param[in] type_info + * \param[out] out Do not free this value, it will be valid until type_info is freed. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToTensorInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtTensorTypeAndShapeInfo** out); + + /** \brief Get ::ONNXType from ::OrtTypeInfo + * + * \param[in] type_info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetOnnxTypeFromTypeInfo, _In_ const OrtTypeInfo* type_info, _Out_ enum ONNXType* out); + + /// @} + /// \name OrtTensorTypeAndShapeInfo + /// @{ + + /** \brief Create an ::OrtTensorTypeAndShapeInfo object + * + * \param[out] out Returns newly created ::OrtTensorTypeAndShapeInfo. Must be freed with OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorTypeAndShapeInfo, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Set element type in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] type + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetTensorElementType, _Inout_ OrtTensorTypeAndShapeInfo* info, enum ONNXTensorElementDataType type); + + /** \brief Set shape information in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] dim_values Array with `dim_count` elements. Can contain negative values. + * \param[in] dim_count Number of elements in `dim_values` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetDimensions, OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count); + + /** \brief Get element type in ::OrtTensorTypeAndShapeInfo + * + * \see OrtApi::SetTensorElementType + * + * \param[in] info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorElementType, _In_ const OrtTensorTypeAndShapeInfo* info, + _Out_ enum ONNXTensorElementDataType* out); + + /** \brief Get dimension count in ::OrtTensorTypeAndShapeInfo + * + * \see OrtApi::GetDimensions + * + * \param[in] info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDimensionsCount, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ size_t* out); + + /** \brief Get dimensions in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[out] dim_values Array with `dim_values_length` elements. On return, filled with the dimensions stored in the ::OrtTensorTypeAndShapeInfo + * \param[in] dim_values_length Number of elements in `dim_values`. Use OrtApi::GetDimensionsCount to get this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDimensions, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, + size_t dim_values_length); + + /** \brief Get symbolic dimension names in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] dim_params Array with `dim_params_length` elements. On return filled with pointers to null terminated strings of the dimension names + * \param[in] dim_params_length Number of elements in `dim_params`. Use OrtApi::GetDimensionsCount to get this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSymbolicDimensions, _In_ const OrtTensorTypeAndShapeInfo* info, + _Out_writes_all_(dim_params_length) const char* dim_params[], size_t dim_params_length); + + /** \brief Get total number of elements in a tensor shape from an ::OrtTensorTypeAndShapeInfo + * + * Return the number of elements specified by the tensor shape (all dimensions multiplied by each other). + * For 0 dimensions, 1 is returned. If any dimension is less than 0, the result is always -1. + * + * Examples:
+ * [] = 1
+ * [1,3,4] = 12
+ * [2,0,4] = 0
+ * [-1,3,4] = -1
+ * + * \param[in] info + * \param[out] out Number of elements + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorShapeElementCount, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ size_t* out); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Get type and shape information from a tensor ::OrtValue + * + * \param[in] value Must be a tensor (not a map/sequence/etc) or will return failure + * \param[out] out Newly created ::OrtTensorTypeAndShapeInfo. Must be freed with OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorTypeAndShape, _In_ const OrtValue* value, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Get type information of an OrtValue + * + * \param[in] value + * \param[out] out Newly created ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTypeInfo, _In_ const OrtValue* value, _Outptr_result_maybenull_ OrtTypeInfo** out); + + /** \brief Get ONNXType of an ::OrtValue + * + * \param[in] value + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValueType, _In_ const OrtValue* value, _Out_ enum ONNXType* out); + + /// @} + /// \name OrtMemoryInfo + /// @{ + + /** \brief Create an ::OrtMemoryInfo + * + * \param[in] name + * \param[in] type + * \param[in] id + * \param[in] mem_type + * \param[out] out Newly created ::OrtMemoryInfo. Must be freed with OrtAPi::ReleaseMemoryInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateMemoryInfo, _In_ const char* name, enum OrtAllocatorType type, int id, + enum OrtMemType mem_type, _Outptr_ OrtMemoryInfo** out); + + /** \brief Create an ::OrtMemoryInfo for CPU memory + * + * Special case version of OrtApi::CreateMemoryInfo for CPU based memory. Same as using OrtApi::CreateMemoryInfo with name = "Cpu" and id = 0. + * + * \param[in] type + * \param[in] mem_type + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateCpuMemoryInfo, enum OrtAllocatorType type, enum OrtMemType mem_type, + _Outptr_ OrtMemoryInfo** out); + + /** \brief Compare ::OrtMemoryInfo objects for equality + * + * Compares all settings of each ::OrtMemoryInfo for equality + * + * \param[in] info1 + * \param[in] info2 + * \param[out] out Set to 0 if equal, -1 if not equal + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CompareMemoryInfo, _In_ const OrtMemoryInfo* info1, _In_ const OrtMemoryInfo* info2, _Out_ int* out); + + /** \brief Get name from ::OrtMemoryInfo + * + * \param[in] ptr + * \param[out] out Writes null terminated string to this pointer. Do NOT free the returned pointer. It is valid for the lifetime of the ::OrtMemoryInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(MemoryInfoGetName, _In_ const OrtMemoryInfo* ptr, _Out_ const char** out); + + /** \brief Get the id from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetId, _In_ const OrtMemoryInfo* ptr, _Out_ int* out); + + /** \brief Get the ::OrtMemType from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetMemType, _In_ const OrtMemoryInfo* ptr, _Out_ OrtMemType* out); + + /** \brief Get the ::OrtAllocatorType from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetType, _In_ const OrtMemoryInfo* ptr, _Out_ OrtAllocatorType* out); + + /// @} + /// \name OrtAllocator + /// @{ + + /// \brief Calls OrtAllocator::Alloc function + ORT_API2_STATUS(AllocatorAlloc, _Inout_ OrtAllocator* ort_allocator, size_t size, _Outptr_ void** out); + /// \brief Calls OrtAllocator::Free function + ORT_API2_STATUS(AllocatorFree, _Inout_ OrtAllocator* ort_allocator, void* p); + /// \brief Calls OrtAllocator::Info function + ORT_API2_STATUS(AllocatorGetInfo, _In_ const OrtAllocator* ort_allocator, _Outptr_ const struct OrtMemoryInfo** out); + + /** \brief Get the default allocator + * + * The default allocator is a CPU based, non-arena. Always returns the same pointer to the same default allocator. + * + * \param[out] out Returned value should NOT be freed + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetAllocatorWithDefaultOptions, _Outptr_ OrtAllocator** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Override session symbolic dimensions + * + * Override symbolic dimensions (by specific denotation strings) with actual values if known at session initialization time to enable + * optimizations that can take advantage of fixed values (such as memory planning, etc) + * + * \param[in] options + * \param[in] dim_denotation + * \param[in] dim_value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddFreeDimensionOverride, _Inout_ OrtSessionOptions* options, _In_ const char* dim_denotation, + _In_ int64_t dim_value); + + /// @} + /// \name OrtValue + /// @{ + + /* Internal information (not seen in Doxygen) + * + * APIs to support non-tensor types - map and sequence. + * Currently only the following types are supported + * Note: the following types should be kept in sync with data_types.h + * Map types + * ========= + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * + * Sequence types + * ============== + * std::vector + * std::vector + * std::vector + * std::vector + * std::vector> + * std::vector + */ + + /** \brief Get non tensor data from an ::OrtValue + * + * If `value` is of type ONNX_TYPE_MAP, you need to retrieve the keys and values + * separately. Use index=0 to retrieve keys and index=1 to retrieve values. + * If `value` is of type ONNX_TYPE_SEQUENCE, use index to retrieve the index'th element + * of the sequence. + * + * \param[in] value + * \param[in] index See above for usage based on `value` type + * \param[in] allocator Allocator used to allocate ::OrtValue + * \param[out] out Created ::OrtValue that holds the element requested. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValue, _In_ const OrtValue* value, int index, _Inout_ OrtAllocator* allocator, + _Outptr_ OrtValue** out); + + /** \brief Get non tensor value count from an ::OrtValue + * + * If `value` is of type ONNX_TYPE_MAP 2 will always be returned. For ONNX_TYPE_SEQUENCE + * the number of elements in the sequence will be returned + * + * \param[in] value + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValueCount, _In_ const OrtValue* value, _Out_ size_t* out); + + /** \brief Create a map or sequence ::OrtValue + * + * To construct a map (ONNX_TYPE_MAP), use num_values = 2 and `in` should be an array of 2 ::OrtValue%s + * representing keys and values.
+ * + * To construct a sequence (ONNX_TYPE_SEQUENCE), use num_values = N where N is the number of the elements in the + * sequence. 'in' should be an array of N ::OrtValue%s. + * + * \param[in] in See above for details + * \param[in] num_values + * \param[in] value_type Must be either ONNX_TYPE_MAP or ONNX_TYPE_SEQUENCE + * \param[out] out Newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateValue, _In_reads_(num_values) const OrtValue* const* in, size_t num_values, + enum ONNXType value_type, _Outptr_ OrtValue** out); + + /** \brief Create an opaque (custom user defined type) ::OrtValue + * + * Constructs an ::OrtValue that contains a value of non-standard type created for + * experiments or while awaiting standardization. ::OrtValue in this case would contain + * an internal representation of the Opaque type. Opaque types are distinguished from + * each other by two strings 1) domain and 2) type name. The combination of the two + * must be unique, so the type representation is properly identified internally. The combination + * must be properly registered from within ORT at both compile/run time or by another API. + * + * To construct the ::OrtValue pass domain and type names, also a pointer to a data container + * the type of which must be known to both ORT and the client program. That data container may or may + * not match the internal representation of the Opaque type. The sizeof(data_container) is passed for + * verification purposes. + * + * \param[in] domain_name Null terminated string of the domain name + * \param[in] type_name Null terminated string of the type name + * \param[in] data_container User pointer Data to populate ::OrtValue + * \param[in] data_container_size Size in bytes of what `data_container` points to + * \param[out] out Newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateOpaqueValue, _In_z_ const char* domain_name, _In_z_ const char* type_name, + _In_ const void* data_container, size_t data_container_size, _Outptr_ OrtValue** out); + + /** \brief Get internal data from an opaque (custom user defined type) ::OrtValue + * + * Copies internal data from an opaque value into a user provided buffer + * + * \see OrtApi::CreateOpaqueValue + * + * \param[in] domain_name Null terminated string of the domain name + * \param[in] type_name Null terminated string of the type name + * \param[in] in The opaque ::OrtValue + * \param[out] data_container Buffer to copy data into + * \param[out] data_container_size Size in bytes of the buffer pointed to by data_container. Must match the size of the internal buffer. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetOpaqueValue, _In_ const char* domain_name, _In_ const char* type_name, _In_ const OrtValue* in, + _Out_ void* data_container, size_t data_container_size); + + /// @} + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get a float stored as an attribute in the graph node + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_float, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ float* out); + + /** \brief Fetch a 64-bit int stored as an attribute in the graph node + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_int64, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ int64_t* out); + + /** \brief Fetch a string stored as an attribute in the graph node + * + * If `out` is nullptr, the value of `size` is set to the true size of the string + * attribute, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual string attribute's size, + * the value of `size` is set to the true size of the string attribute, the provided memory + * is filled with the attribute's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string attribute's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string attribute + * and a failure status is returned.) + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * \param[in,out] size See above comments for details + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_string, _In_ const OrtKernelInfo* info, _In_ const char* name, _Out_ char* out, + _Inout_ size_t* size); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Used for custom operators, get the input count of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetInputCount, _In_ const OrtKernelContext* context, _Out_ size_t* out); + + /** \brief Used for custom operators, get the output count of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetOutputCount, _In_ const OrtKernelContext* context, _Out_ size_t* out); + + /** \brief Used for custom operators, get an input of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetInput, _In_ const OrtKernelContext* context, _In_ size_t index, + _Out_ const OrtValue** out); + + /** \brief Used for custom operators, get an output of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetOutput, _Inout_ OrtKernelContext* context, _In_ size_t index, + _In_ const int64_t* dim_values, size_t dim_count, _Outptr_ OrtValue** out); + + /// @} + /// \name OrtEnv + /// @{ + ORT_CLASS_RELEASE(Env); + /// @} + /// \name OrtStatus + /// @{ + ORT_CLASS_RELEASE(Status); + /// @} + /// \name OrtMemoryInfo + /// @{ + ORT_CLASS_RELEASE(MemoryInfo); + /// @} + /// \name OrtSession + /// @{ + ORT_CLASS_RELEASE(Session); // Don't call ReleaseSession from Dllmain (because session owns a thread pool) + /// @} + /// \name OrtValue + /// @{ + ORT_CLASS_RELEASE(Value); + /// @} + /// \name OrtRunOptions + /// @{ + ORT_CLASS_RELEASE(RunOptions); + /// @} + /// \name OrtTypeInfo + /// @{ + ORT_CLASS_RELEASE(TypeInfo); + /// @} + /// \name OrtTensorTypeAndShapeInfo + /// @{ + ORT_CLASS_RELEASE(TensorTypeAndShapeInfo); + /// @} + /// \name OrtSessionOptions + /// @{ + ORT_CLASS_RELEASE(SessionOptions); + /// @} + /// \name OrtCustomOpDomain + /// @{ + ORT_CLASS_RELEASE(CustomOpDomain); + + /// @} + /// \name OrtTypeInfo + /// @{ + + /** \brief Get denotation from type information + * + * Augments ::OrtTypeInfo to return denotations on the type. + * + * This is used by WinML to determine if an input/output is intended to be an Image or a Tensor. + * + * \param[in] type_info + * \param[out] denotation Pointer to the null terminated denotation string is written to this pointer. This pointer is valid until the object is destroyed or the name is changed, do not free. + * \param[out] len Length in bytes of the string returned in `denotation` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDenotationFromTypeInfo, _In_ const OrtTypeInfo* type_info, _Out_ const char** const denotation, + _Out_ size_t* len); + + /** \brief Get detailed map information from an ::OrtTypeInfo + * + * This augments ::OrtTypeInfo to return an ::OrtMapTypeInfo when the type is a map. + * The OrtMapTypeInfo has additional information about the map's key type and value type. + * + * This is used by WinML to support model reflection APIs. + * + * \param[out] type_info + * \param[out] out A pointer to the ::OrtMapTypeInfo. Do not free this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToMapTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtMapTypeInfo** out); + + /** \brief Cast ::OrtTypeInfo to an ::OrtSequenceTypeInfo + * + * This api augments ::OrtTypeInfo to return an ::OrtSequenceTypeInfo when the type is a sequence. + * The ::OrtSequenceTypeInfo has additional information about the sequence's element type. + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] type_info + * \param[out] out A pointer to the OrtSequenceTypeInfo. Do not free this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToSequenceTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtSequenceTypeInfo** out); + + /// @} + /// \name OrtMapTypeInfo + /// @{ + + /** \brief Get key type from an ::OrtMapTypeInfo + * + * Key types are restricted to being scalar types. + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] map_type_info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetMapKeyType, _In_ const OrtMapTypeInfo* map_type_info, _Out_ enum ONNXTensorElementDataType* out); + + /** \brief Get the value type from an ::OrtMapTypeInfo + * + * \param[in] map_type_info + * \param[out] type_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetMapValueType, _In_ const OrtMapTypeInfo* map_type_info, _Outptr_ OrtTypeInfo** type_info); + + /// @} + /// \name OrtSequenceTypeInfo + /// @{ + + /** \brief Get element type from an ::OrtSequenceTypeInfo + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] sequence_type_info + * \param[out] type_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSequenceElementType, _In_ const OrtSequenceTypeInfo* sequence_type_info, + _Outptr_ OrtTypeInfo** type_info); + + /// @} + /// \name OrtMapTypeInfo + /// @{ + ORT_CLASS_RELEASE(MapTypeInfo); + /// @} + /// \name OrtSequenceTypeInfo + /// @{ + ORT_CLASS_RELEASE(SequenceTypeInfo); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief End profiling and return filename of the profile data + * + * Profiling is turned on through OrtApi::EnableProfiling + * + * \param[in] session + * \param[in] allocator + * \param[out] out Null terminated string of the filename, allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionEndProfiling, _In_ OrtSession* session, _Inout_ OrtAllocator* allocator, _Outptr_ char** out); + + /** \brief Get ::OrtModelMetadata from an ::OrtSession + * + * \param[in] session + * \param[out] out Newly created ::OrtModelMetadata. Must be freed using OrtApi::ReleaseModelMetadata + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetModelMetadata, _In_ const OrtSession* session, _Outptr_ OrtModelMetadata** out); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** \brief Get `producer name` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetProducerName, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get `graph name` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetGraphName, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get `domain` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetDomain, _In_ const OrtModelMetadata* model_metadata, _Inout_ OrtAllocator* allocator, + _Outptr_ char** value); + + /** \brief Get `description` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetDescription, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Return data for a key in the custom metadata map in an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[in] key Null terminated string + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * `value` will be set to nullptr if the given key is not found in the custom metadata map. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataLookupCustomMetadataMap, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _In_ const char* key, _Outptr_result_maybenull_ char** value); + + /** \brief Get version number from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[out] value Set to the version number + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetVersion, _In_ const OrtModelMetadata* model_metadata, _Out_ int64_t* value); + + ORT_CLASS_RELEASE(ModelMetadata); + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an OrtEnv + * + * Create an environment with global threadpools that will be shared across sessions. + * Use this in conjunction with OrtApi::DisablePerSessionThreads or else the session will use + * its own thread pools. + * + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[in] tp_options + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithGlobalThreadPools, OrtLoggingLevel log_severity_level, _In_ const char* logid, + _In_ const OrtThreadingOptions* tp_options, _Outptr_ OrtEnv** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Use global thread pool on a session + * + * Disable using per session thread pool and use the shared global threadpool. + * This should be used in conjunction with OrtApi::CreateEnvWithGlobalThreadPools. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisablePerSessionThreads, _Inout_ OrtSessionOptions* options); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Create an ::OrtThreadingOptions + * + * \param[out] out Newly created ::OrtThreadingOptions. Must be freed with OrtApi::ReleaseThreadingOptions + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateThreadingOptions, _Outptr_ OrtThreadingOptions** out); + + ORT_CLASS_RELEASE(ThreadingOptions); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] keys Array of null terminated strings (array count = num_keys) allocated using `allocator`. + * The strings and the pointer array must be freed using `allocator` + * `keys` will be set to nullptr if the custom metadata map is empty. + * \param[out] num_keys Set to the number of elements in the `keys` array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetCustomMetadataMapKeys, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_result_buffer_maybenull_(*num_keys) char*** keys, _Out_ int64_t* num_keys); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** + * + * Override symbolic dimensions (by specific name strings) with actual values + * if known at session initialization time to enable optimizations that can + * take advantage of fixed values (such as memory planning, etc) + * + */ + ORT_API2_STATUS(AddFreeDimensionOverrideByName, + _Inout_ OrtSessionOptions* options, _In_ const char* dim_name, + _In_ int64_t dim_value); + + /// @} + /// \name Misc + /// @{ + + /** \brief Get the names of all available providers + * + * \note The providers in the list are not guaranteed to be usable. They may fail to load due to missing system dependencies. + * For example, if the CUDA/cuDNN libraries are not installed, the CUDA provider will report an error when it is added to the session options. + * + * \param[out] out_ptr Set to a pointer to an array of null terminated strings of the available providers. The entries and the + * array itself must be freed using OrtApi::ReleaseAvailableProviders + * \param[out] provider_length Set to the number of entries in the `out_ptr` array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetAvailableProviders, _Outptr_ char*** out_ptr, _Out_ int* provider_length); + + /** \brief Release data from OrtApi::GetAvailableProviders + * + * \param[in] ptr The `out_ptr` result from OrtApi::GetAvailableProviders. + * \param[in] providers_length The `provider_length` result from OrtApi::GetAvailableProviders + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ReleaseAvailableProviders, _In_ char** ptr, + _In_ int providers_length); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Get the length of a single string in a string tensor + * + * \param[in] value A string tensor + * \param[in] index Index of the string in the tensor + * \param[out] out Set to number of bytes of the string element + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorElementLength, _In_ const OrtValue* value, size_t index, _Out_ size_t* out); + + /** \brief Get a single string from a string tensor + * + * \param[in] value A string tensor + * \param[in] s_len Number of bytes in the `s` buffer. Must match the value returned by OrtApi::GetStringTensorElementLength. + * \param[in] index Index of the string in the tensor + * \param[out] s The string element contents in UTF-8 encoding. The string is NOT null-terminated. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorElement, _In_ const OrtValue* value, size_t s_len, size_t index, _Out_writes_bytes_all_(s_len) void* s); + + /** \brief Set a single string in a string tensor + * + * \param[in] value A string tensor + * \param[in] s A null terminated UTF-8 encoded string + * \param[in] index Index of the string in the tensor to set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillStringTensorElement, _Inout_ OrtValue* value, _In_ const char* s, size_t index); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Set a session configuration entry as a pair of strings + * + * If a configuration with same key exists, this will overwrite the configuration with the given config_value. + * + * The config_key and the format of config_value are defined in onnxruntime_session_options_config_keys.h + * + * \param[in] options + * \param[in] config_key A null terminated string representation of the config key + * \param[in] config_value A null terminated string representation of the config value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddSessionConfigEntry, _Inout_ OrtSessionOptions* options, + _In_z_ const char* config_key, _In_z_ const char* config_value); + + /// @} + /// \name OrtAllocator + /// @{ + + /** \brief Create an allocator for an ::OrtSession following an ::OrtMemoryInfo + * + * \param[in] session + * \param[in] mem_info valid ::OrtMemoryInfo instance + * \param[out] out Newly created ::OrtAllocator. Must be freed with OrtApi::ReleaseAllocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateAllocator, _In_ const OrtSession* session, _In_ const OrtMemoryInfo* mem_info, + _Outptr_ OrtAllocator** out); + + /** \brief Release an ::OrtAllocator obtained from OrtApi::CreateAllocator + */ + ORT_CLASS_RELEASE(Allocator); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Run a model using Io Bindings for the inputs & outputs + * + * \see OrtApi::Run + * + * \param[in] session + * \param[in] run_options + * \param[in] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunWithBinding, _Inout_ OrtSession* session, _In_ const OrtRunOptions* run_options, _In_ const OrtIoBinding* binding_ptr); + + /** \brief Create an ::OrtIoBinding instance + * + * An IoBinding object allows one to bind pre-allocated ::OrtValue%s to input names. + * Thus if you want to use a raw on device buffer as input or output you can avoid + * extra copy during runtime. + * + * \param[in] session + * \param[out] out Newly created ::OrtIoBinding. Must be freed with OrtApi::ReleaseIoBinding + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateIoBinding, _Inout_ OrtSession* session, _Outptr_ OrtIoBinding** out); + + /// @} + /// \name OrtIoBinding + /// @{ + + /** \brief Release an ::OrtIoBinding obtained from OrtApi::CreateIoBinding + */ + ORT_CLASS_RELEASE(IoBinding); + + /** \brief Bind an ::OrtValue to an ::OrtIoBinding input + * + * When using OrtApi::RunWithBinding this value is used for the named input + * + * \param[in] binding_ptr + * \param[in] name Name for the model input + * \param[in] val_ptr ::OrtValue of Tensor type. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindInput, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtValue* val_ptr); + + /** \brief Bind an ::OrtValue to an ::OrtIoBinding output + * + * When using OrtApi::RunWithBinding this value is used for the named output + * + * \param[in] binding_ptr + * \param[in] name Null terminated string of the model output name + * \param[in] val_ptr ::OrtValue of Tensor type. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindOutput, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtValue* val_ptr); + + /** \brief Bind an ::OrtIoBinding output to a device + * + * Binds the ::OrtValue to a device which is specified by ::OrtMemoryInfo. + * You can either create an instance of ::OrtMemoryInfo with a device id or obtain one from the allocator that you have created/are using + * This is useful when one or more outputs have dynamic shapes and, it is hard to pre-allocate and bind a chunk of + * memory within ::OrtValue ahead of time. + * + * \see OrtApi::RunWithBinding + * + * \param[in] binding_ptr + * \param[in] name Null terminated string of the device name + * \param[in] mem_info_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindOutputToDevice, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtMemoryInfo* mem_info_ptr); + + /** \brief Get the names of an ::OrtIoBinding's outputs + * + * Returns the names of the outputs in the order they were bound. This is useful after running the model + * with bound outputs because the returned names are in order in which output ::OrtValue are returned. This is useful if + * the order of outputs and their names is not known. + * + * \param[in] binding_ptr + * \param[in] allocator Allocator used to allocate continuous buffers for output strings and lengths. + * \param[out] buffer Returns an array of non-null terminated UTF-8 strings. The number of strings stored is returned in the count parameter. + * This buffer is allocated using `allocator` and must be freed using it. + * \param[out] lengths Returns an array of `count` lengths of the strings returned in `buffer` + * This buffer is allocated using `allocator` and must be freed using it. + * \param[out] count Number of strings returned. If `binding_ptr` has no bound outputs, zero is returned, + * no memory allocation is performed and buffer and lengths are set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetBoundOutputNames, _In_ const OrtIoBinding* binding_ptr, _In_ OrtAllocator* allocator, + _Out_ char** buffer, _Out_writes_all_(count) size_t** lengths, _Out_ size_t* count); + + /** \brief Get the output ::OrtValue objects from an ::OrtIoBinding + * + * Returns an array of pointers to individually allocated ::OrtValue%s that contain results of a model execution with OrtApi::RunWithBinding + * The array contains the same number of ::OrtValue%s and they are in the same order as they were bound with OrtApi::BindOutput + * or OrtApi::BindOutputToDevice. + * + * The returned ::OrtValue%s must be released using OrtApi::ReleaseValue after they are no longer needed. + * The array is allocated using the specified instance of the allocator and must be freed using the same allocator after + * all the ::OrtValue%s contained therein are individually released. + * + * \param[in] binding_ptr + * \param[in] allocator Allocator used to allocate output array + * \param[out] output Set to the allocated array of allocated ::OrtValue outputs. Set to nullptr if there are 0 outputs. + * \param[out] output_count Set to number of ::OrtValue%s returned + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetBoundOutputValues, _In_ const OrtIoBinding* binding_ptr, _In_ OrtAllocator* allocator, + _Out_writes_all_(output_count) OrtValue*** output, _Out_ size_t* output_count); + + /** \brief Clears any previously set Inputs for an ::OrtIoBinding + */ + void(ORT_API_CALL* ClearBoundInputs)(_Inout_ OrtIoBinding* binding_ptr) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Clears any previously set Outputs for an ::OrtIoBinding + */ + void(ORT_API_CALL* ClearBoundOutputs)(_Inout_ OrtIoBinding* binding_ptr) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Direct memory access to a specified tensor element + * + * For example, given a tensor with shape of [3,224,224], a pointer to the element at location [2,150,128] can be retrieved + * + * This function only works for numeric type tensors (No strings, etc). + * This is a no-copy method whose returned pointer is valid until the passed in ::OrtValue is free'd. + * + * \param[in] value + * \param[in] location_values Pointer to an array of index values that specify an element's location relative to its shape + * \param[in] location_values_count Number of elements in location_values. Must match the number of elements in the tensor's shape. + * \param[out] out Set to a pointer to the element specified + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(TensorAt, _Inout_ OrtValue* value, const int64_t* location_values, size_t location_values_count, _Outptr_ void** out); + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an allocator and register it with the ::OrtEnv + * + * Enables sharing the allocator between multiple sessions that use the same env instance. + * Lifetime of the created allocator will be valid for the duration of the environment. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * + * See https://onnxruntime.ai/docs/reference/api/c-api.html for details. + * + * \param[in] env ::OrtEnv instance + * \param[in] mem_info + * \param[in] arena_cfg Pass nullptr for defaults + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateAndRegisterAllocator, _Inout_ OrtEnv* env, _In_ const OrtMemoryInfo* mem_info, + _In_ const OrtArenaCfg* arena_cfg); + + /** \brief Set language projection + * + * Set the language projection for collecting telemetry data when Env is created. + * + * The default is ORT_PROJECTION_C, which means it will classify the language not in the list to C also. + * + * \param[in] ort_env + * \param[in] projection + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetLanguageProjection, _In_ const OrtEnv* ort_env, _In_ OrtLanguageProjection projection); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Return the time that profiling was started + * + * \note The timer precision varies per platform. On Windows and MacOS, the precision will be ~100ns + * + * \param[in] session + * \param[out] out nanoseconds of profiling's start time + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetProfilingStartTimeNs, _In_ const OrtSession* session, _Outptr_ uint64_t* out); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Set global intra-op thread count + * + * This configures the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools + * + * \param[in] tp_options + * \param[in] intra_op_num_threads Number of threads, special values:
+ * 0 = Use default thread count
+ * 1 = The invoking thread will be used; no threads will be created in the thread pool. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalIntraOpNumThreads, _Inout_ OrtThreadingOptions* tp_options, int intra_op_num_threads); + + /** \brief Set global inter-op thread count + * + * This configures the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools + * + * \param[in] tp_options + * \param[in] inter_op_num_threads Number of threads, special values:
+ * 0 = Use default thread count
+ * 1 = The invoking thread will be used; no threads will be created in the thread pool. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalInterOpNumThreads, _Inout_ OrtThreadingOptions* tp_options, int inter_op_num_threads); + + /** \brief Set global spin control options + * + * This will configure the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools. + * Allow spinning of thread pools when their queues are empty. This will set the value for both + * inter_op and intra_op threadpools. + * + * \param[in] tp_options + * \param[in] allow_spinning Valid values are 0 or 1.
+ * 0 = It won't spin (recommended if CPU usage is high)
+ * 1 = Threadpool will spin to wait for queue to become non-empty + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalSpinControl, _Inout_ OrtThreadingOptions* tp_options, int allow_spinning); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Add a pre-allocated initializer to a session + * + * If a model contains an initializer with a name that is same as the name passed to this call, + * ORT will use this initializer instance instead of deserializing one from the model file. This + * is useful when you want to share the same initializer across sessions. + * + * \param[in] options + * \param[in] name Null terminated string of the initializer name + * \param[in] val ::OrtValue containing the initializer. Its lifetime and the underlying initializer buffer must be + * managed by the user (created using the OrtApi::CreateTensorWithDataAsOrtValue) and it must outlive the session object + * to which it is added. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddInitializer, _Inout_ OrtSessionOptions* options, _In_z_ const char* name, + _In_ const OrtValue* val); + + /// @} + /// \name OrtEnv + /// @{ + + /** + * Create a custom environment with global threadpools and logger that will be shared across sessions. + * Use this in conjunction with OrtApi::DisablePerSessionThreads or else the session will use + * its own thread pools. + * + * \param[in] logging_function A pointer to a logging function. + * \param[in] logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `logging_function`. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[in] tp_options + * \param[out] out Newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithCustomLoggerAndGlobalThreadPools, OrtLoggingFunction logging_function, _In_opt_ void* logger_param, OrtLoggingLevel log_severity_level, + _In_ const char* logid, _In_ const struct OrtThreadingOptions* tp_options, _Outptr_ OrtEnv** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append CUDA provider to session options + * + * If CUDA is not available (due to a non CUDA enabled build, or if CUDA is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] cuda_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CUDA, + _In_ OrtSessionOptions* options, _In_ const OrtCUDAProviderOptions* cuda_options); + + /** \brief Append ROCM execution provider to the session options + * + * If ROCM is not available (due to a non ROCM enabled build, or if ROCM is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] rocm_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_ROCM, + _In_ OrtSessionOptions* options, _In_ const OrtROCMProviderOptions* rocm_options); + + /** \brief Append OpenVINO execution provider to the session options + * + * If OpenVINO is not available (due to a non OpenVINO enabled build, or if OpenVINO is not installed on the system), this function will fail. + * + * \param[in] options + * \param[in] provider_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_OpenVINO, + _In_ OrtSessionOptions* options, _In_ const OrtOpenVINOProviderOptions* provider_options); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Set threading flush-to-zero and denormal-as-zero + * + * Sets global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools. + * Flush-to-zero and denormal-as-zero are applied to threads in both intra and inter global thread pool. + * \note This option is not needed if the models used have no denormals. Having no denormals is recommended as this option may hurt model accuracy. + * + * \param[in] tp_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalDenormalAsZero, _Inout_ OrtThreadingOptions* tp_options); + + /// @} + /// \name OrtArenaCfg + /// @{ + + /** \deprecated Use OrtApi::CreateArenaCfgV2 + * + * This will create the configuration of an arena that can eventually be used to define an arena based allocator's behavior + * + * \param[in] max_mem Use 0 to allow ORT to choose the default + * \param[in] arena_extend_strategy Use -1 to allow ORT to choose the default, 0 = kNextPowerOfTwo, 1 = kSameAsRequested + * \param[in] initial_chunk_size_bytes Use -1 to allow ORT to choose the default + * \param[in] max_dead_bytes_per_chunk Use -1 to allow ORT to choose the default + * \param[in] out A pointer to an OrtArenaCfg instance + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateArenaCfg, _In_ size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, + int max_dead_bytes_per_chunk, _Outptr_ OrtArenaCfg** out); + + ORT_CLASS_RELEASE(ArenaCfg); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** + * Use this to obtain the description of the graph present in the model + * (doc_string field of the GraphProto message within the ModelProto message). + * If it doesn't exist, an empty string will be returned. + * + * \param[in] model_metadata An instance of ::OrtModelMetadata + * \param[in] allocator Allocator used to allocate the string that will be returned back + * \param[out] value Set to a null terminated string allocated using `allocator`. The caller is responsible for freeing it using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetGraphDescription, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append TensorRT provider to session options + * + * If TensorRT is not available (due to a non TensorRT enabled build, or if TensorRT is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] tensorrt_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_TensorRT, + _In_ OrtSessionOptions* options, _In_ const OrtTensorRTProviderOptions* tensorrt_options); + + /// @} + /// \name Misc + /// @{ + + /** \brief Set current GPU device ID + * + * Set the current device id of the GPU execution provider (CUDA/tensorrt/rocm). The device id should be less + * than the total number of devices available. This is only useful when multiple-GPUs are installed and it is + * required to restrict execution to a single GPU. + * + * \param[in] device_id + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetCurrentGpuDeviceId, _In_ int device_id); + + /** \brief Get current GPU device ID + * + * Get the current device id of the GPU execution provider (CUDA/tensorrt/rocm). + * + * \see OrtApi::SetCurrentGpuDeviceId + * + * \param[out] device_id + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetCurrentGpuDeviceId, _In_ int* device_id); + + /// @} + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Fetch an array of int64_t values stored as an attribute in the graph node + * + * + * If `out` is nullptr, the value of `size` is set to the true size of the attribute + * array's size, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual attribute array's size, + * the value of `size` is set to the true size of the attribute array's size, + * the provided memory is filled with the attribute's contents, + * and a success status is returned. + * + * If the `size` parameter is less than the actual attribute array's size and `out` + * is not nullptr, the value of `size` is set to the true size of the attribute array's size + * and a failure status is returned.) + * + * \param[in] info instance + * \param[in] name name of the attribute to be parsed + * \param[out] out pointer to memory where the attribute's contents are to be stored + * \param[in, out] size actual size of attribute array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttributeArray_float, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ float* out, _Inout_ size_t* size); + + /** \brief Fetch an array of int64_t values stored as an attribute in the graph node + * + * If `out` is nullptr, the value of `size` is set to the true size of the attribute + * array's size, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual attribute array's size, + * the value of `size` is set to the true size of the attribute array's size, + * the provided memory is filled with the attribute's contents, + * and a success status is returned. + * + * If the `size` parameter is less than the actual attribute array's size and `out` + * is not nullptr, the value of `size` is set to the true size of the attribute array's size + * and a failure status is returned.) + * + * \param[in] info instance + * \param[in] name name of the attribute to be parsed + * \param[out] out pointer to memory where the attribute's contents are to be stored + * \param[in, out] size actual size of attribute array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttributeArray_int64, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ int64_t* out, _Inout_ size_t* size); + + /// @} + /// \name OrtArenaCfg + /// @{ + + /** \brief Create an ::OrtArenaCfg + * + * Create the configuration of an arena that can eventually be used to define an arena based allocator's behavior. + * + * Supported keys are (See https://onnxruntime.ai/docs/reference/api/c-api.html for details on what the + * following parameters mean and how to choose these values.): + * "max_mem": Maximum memory that can be allocated by the arena based allocator. + * Use 0 for ORT to pick the best value. Default is 0. + * "arena_extend_strategy": 0 = kNextPowerOfTwo, 1 = kSameAsRequested. + * Use -1 to allow ORT to choose the default. + * "initial_chunk_size_bytes": (Possible) Size of the first allocation in the arena. + * Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default. + * Ultimately, the first allocation size is determined by the allocation memory request. + * "max_dead_bytes_per_chunk": Threshold of unused memory in an allocated chunk of arena memory after + * crossing which the current chunk is chunked into 2. + * "initial_growth_chunk_size_bytes": (Possible) Size of the second allocation in the arena. + * Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default. + * Ultimately, the allocation size is determined by the allocation memory request. + * Further allocation sizes are governed by the arena extend strategy. + * + * \param[in] arena_config_keys Keys to configure the arena + * \param[in] arena_config_values Values to configure the arena + * \param[in] num_keys Number of keys in `arena_config_keys` and `arena_config_values` + * \param[out] out Newly created ::OrtArenaCfg. Must be freed with OrtApi::ReleaseArenaCfg + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateArenaCfgV2, _In_reads_(num_keys) const char* const* arena_config_keys, + _In_reads_(num_keys) const size_t* arena_config_values, _In_ size_t num_keys, + _Outptr_ OrtArenaCfg** out); + + /// @} + /// \name OrtRunOptions + /// @{ + + /** \brief Set a single run configuration entry as a pair of strings + * + * If a configuration with same key exists, this will overwrite the configuration with the given config_value + * + * The config_key and the format of config_value are defined in onnxruntime_run_options_config_keys.h + * + * \param[in] options + * \param[in] config_key A null terminated string representation of the config key + * \param[in] config_value A null terminated string representation of the config value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddRunConfigEntry, _Inout_ OrtRunOptions* options, + _In_z_ const char* config_key, _In_z_ const char* config_value); + + /// @} + /// \name OrtPrepackedWeightsContainer + /// @{ + + /** \brief Create an ::OrtPrepackedWeightsContainer + * + * This container will hold pre-packed buffers of shared initializers for sharing between sessions + * (i.e.) if there are shared initializers that can be shared between sessions, the pre-packed buffers + * of these (if any) may possibly be shared to provide memory footprint savings. Pass this container + * to sessions that you would like to share pre-packed buffers of shared initializers at session + * creation time. + * + * \param[out] out Newly created ::OrtPrepackedWeightsContainer. Must be freed with OrtApi::ReleasePrepackedWeightsContainer + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreatePrepackedWeightsContainer, _Outptr_ OrtPrepackedWeightsContainer** out); + + /** \brief Release OrtPrepackedWeightsContainer instance + * + * \note instance must not be released until the sessions using it are released + */ + ORT_CLASS_RELEASE(PrepackedWeightsContainer); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Create session with prepacked weights container + * + * Same functionality offered by OrtApi::CreateSession except that a container that contains + * pre-packed weights' buffers is written into/read from by the created session. + * This is useful when used in conjunction with OrtApi::AddInitializer which injects + * shared initializer info into sessions. Wherever possible, the pre-packed versions of these + * shared initializers are cached in this container so that multiple sessions can just re-use + * these instead of duplicating these in memory. + * + * \param[in] env OrtEnv instance instance + * \param[in] model_path Null terminated string of the path (wchar on Windows, char otherwise) + * \param[in] options + * \param[in] prepacked_weights_container + * \param[out] out Newly created ::OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionWithPrepackedWeightsContainer, _In_ const OrtEnv* env, _In_ const ORTCHAR_T* model_path, + _In_ const OrtSessionOptions* options, _Inout_ OrtPrepackedWeightsContainer* prepacked_weights_container, + _Outptr_ OrtSession** out); + + /** \brief Create session from memory with prepacked weights container + * + * Same functionality offered by OrtApi::CreateSessionFromArray except that a container that contains + * pre-packed weights' buffers is written into/read from by the created session. + * This is useful when used in conjunction with OrtApi::AddInitializer which injects + * shared initializer info into sessions. Wherever possible, the pre-packed versions of these + * shared initializers are cached in this container so that multiple sessions can just re-use + * these instead of duplicating these in memory. + * + * \param[in] env + * \param[in] model_data Array of bytes holding the model + * \param[in] model_data_length Number of bytes in `model_data_model` + * \param[in] options + * \param[in] prepacked_weights_container + * \param[out] out Newly created ::OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionFromArrayWithPrepackedWeightsContainer, _In_ const OrtEnv* env, + _In_ const void* model_data, size_t model_data_length, + _In_ const OrtSessionOptions* options, _Inout_ OrtPrepackedWeightsContainer* prepacked_weights_container, + _Outptr_ OrtSession** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append TensorRT execution provider to the session options + * + * If TensorRT is not available (due to a non TensorRT enabled build), this function will return failure. + * + * This is slightly different from OrtApi::SessionOptionsAppendExecutionProvider_TensorRT, it takes an + * ::OrtTensorRTProviderOptions which is publicly defined. This takes an opaque ::OrtTensorRTProviderOptionsV2 + * which must be created with OrtApi::CreateTensorRTProviderOptions. + * + * For OrtApi::SessionOptionsAppendExecutionProvider_TensorRT, the user needs to instantiate ::OrtTensorRTProviderOptions + * as well as allocate/release buffers for some members of ::OrtTensorRTProviderOptions. + * Here, OrtApi::CreateTensorRTProviderOptions and Ortapi::ReleaseTensorRTProviderOptions will do the memory management for you. + * + * \param[in] options + * \param[in] tensorrt_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_TensorRT_V2, + _In_ OrtSessionOptions* options, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options); + + /// @} + /// \name OrtTensorRTProviderOptionsV2 + /// @{ + + /** \brief Create an OrtTensorRTProviderOptionsV2 + * + * \param[out] out Newly created ::OrtTensorRTProviderOptionsV2. Must be released with OrtApi::ReleaseTensorRTProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorRTProviderOptions, _Outptr_ OrtTensorRTProviderOptionsV2** out); + + /** \brief Set options in a TensorRT Execution Provider. + * + * Please refer to https://www.onnxruntime.ai/docs/reference/execution-providers/TensorRT-ExecutionProvider.html#c-api-example + * to know the available keys and values. Key should be in null terminated string format of the member of ::OrtTensorRTProviderOptionsV2 + * and value should be its related range. + * + * For example, key="trt_max_workspace_size" and value="2147483648" + * + * \param[in] tensorrt_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UpdateTensorRTProviderOptions, _Inout_ OrtTensorRTProviderOptionsV2* tensorrt_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get serialized TensorRT provider options string. + * + * For example, "trt_max_workspace_size=2147483648;trt_max_partition_iterations=10;trt_int8_enable=1;......" + * + * \param tensorrt_options - OrTensorRTProviderOptionsV2 instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with OrtApi::CreateAllocator or OrtApi::GetAllocatorWithDefaultOptions + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorRTProviderOptionsAsString, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtTensorRTProviderOptionsV2 + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + */ + void(ORT_API_CALL* ReleaseTensorRTProviderOptions)(_Frees_ptr_opt_ OrtTensorRTProviderOptionsV2* input); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Enable custom operators + * + * See onnxruntime-extensions: https://github.com/microsoft/onnxruntime-extensions.git + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableOrtCustomOps, _Inout_ OrtSessionOptions* options); + + /// @} + /// \name OrtAllocator + /// @{ + + /** \brief Register a custom allocator + * + * Enables sharing between multiple sessions that use the same env instance. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * + * The behavior of this is exactly the same as OrtApi::CreateAndRegisterAllocator except + * instead of ORT creating an allocator based on provided info, in this case + * ORT uses the user-provided custom allocator. + * See https://onnxruntime.ai/docs/reference/api/c-api.html for details. + * + * \param[in] env + * \param[in] allocator User provided allocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RegisterAllocator, _Inout_ OrtEnv* env, _In_ OrtAllocator* allocator); + + /** \brief Unregister a custom allocator + * + * It is an error if you provide an ::OrtMemoryInfo not corresponding to any + * registered allocators for sharing. + * + * \param[in] env + * \param[in] mem_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UnregisterAllocator, _Inout_ OrtEnv* env, + _In_ const OrtMemoryInfo* mem_info); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Sets *out to 1 iff an ::OrtValue is a SparseTensor, and 0 otherwise + * + * \param[in] value existing ::OrtValue + * \param[out] out unless an error occurs, contains 1 iff the value contains an instance + * of sparse tensor or 0 otherwise. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(IsSparseTensor, _In_ const OrtValue* value, _Out_ int* out); + + /** \brief Create an ::OrtValue with a sparse tensor that is empty. + * + * Use FillSparseTensor() functions to populate sparse tensor with non-zero values and + * format specific indices data. + * Use ReleaseValue to destroy the sparse tensor, this will also release the buffer inside the output value + * if any was allocated. + * \param[in,out] allocator allocator to use when performing an allocation. Allocation will be performed + * by FillSparseTensor() APIs. The lifespan of the allocator instance must eclipse the lifespan + * this sparse tensor instance as the same allocator will be used to free memory. + * \param[in] dense_shape shape of the original dense tensor + * \param[in] dense_shape_len number of shape dimensions being passed + * \param[in] type must be one of TENSOR_ELEMENT_DATA_TYPE_xxxx + * \param[out] out Should be freed by calling ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSparseTensorAsOrtValue, _Inout_ OrtAllocator* allocator, _In_ const int64_t* dense_shape, + size_t dense_shape_len, ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and COO indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape pointer to values shape array + * \param[in] values_shape_len length of the values_shape + * \param[in] values pointer to an array of values. For strings, pass const char**. + * \param[in] indices_data pointer to a location of COO indices + * \param[in] indices_num number of COO indices + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorCoo, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* indices_data, size_t indices_num); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and CSR indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape pointer to values shape array + * \param[in] values_shape_len length of the values_shape + * \param[in] values - pointer to an array of values. For strings, pass const char**. + * \param[in] inner_indices_data pointer to a location of CSR inner indices + * \param[in] inner_indices_num number of CSR inner indices + * \param[in] outer_indices_data pointer to a location of CSR outer indices + * \param[in] outer_indices_num number of CSR outer indices + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorCsr, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* inner_indices_data, size_t inner_indices_num, + _In_ const int64_t* outer_indices_data, size_t outer_indices_num); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and BlockSparse indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape + * \param[in] values_shape_len + * \param[in] values structure with values information + * \param[in] indices_shape_data pointer to a location of indices shape + * \param[in] indices_shape_len length of the block sparse indices shape + * \param[in] indices_data pointer to a location of indices data. Shape will determine the length of the indices data. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorBlockSparse, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* indices_shape_data, size_t indices_shape_len, + _In_ const int32_t* indices_data); + + /** + * Create an ::OrtValue with a sparse tensor. This is the first step. + * Next, use UseIndices() functions to supply sparse tensor with + * format specific indices data and set its sparse format to a specific enum value. + * This will not perform memory allocations. It will + * use supplied user buffer which should outlive the created sparse tensor. + * Use OrtApi::ReleaseValue to destroy the sparse tensor. It would not release the supplied values buffer. + * This function can not be used to map strings from the user allocated memory. Strings must always be copied + * and have UTF-8 encoding. Therefore, use OrtApi::CreateSparseTensorAsOrtValue above and then fill it with data + * using appropriate Make*() function. + * + * \param[in] info memory info where sparse values reside. + * \param[in,out] p_data pointer to a user allocated buffer with values. To create a full sparse tensor with no non-zero + * values, pass nullptr + * \param[in] dense_shape shape of the original dense tensor + * \param[in] dense_shape_len number of shape dimensions being passed + * \param[in] values_shape shape of the values data. To create a fully sparse tensor with no non-zero values, + * pass {0} shape. + * \param[in] values_shape_len number of values shape dimensions + * \param[in] type must be one of TENSOR_ELEMENT_DATA_TYPE_xxxx + * \param[out] out Should be freed by calling ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSparseTensorWithValuesAsOrtValue, _In_ const OrtMemoryInfo* info, _Inout_ void* p_data, + _In_ const int64_t* dense_shape, size_t dense_shape_len, + _In_ const int64_t* values_shape, size_t values_shape_len, + ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** + * This assigns Coo format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_COO. This will not allocate any additional memory for data. The life span of + * indices_data buffer should eclipse the life span of this ::OrtValue. + * + * \param[in,out] ort_value ::OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in,out] indices_data pointer to a user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] indices_num number of COO indices. Should either be 0 for fully sparse tensors, be equal + * to the number of nnz values specified to OrtApi::CreateSparseTensorWithValuesAsOrtValue for 1-D {nnz} indices or + * be twice as number of nnz values for a 2-D indices {nnz, 2} + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseCooIndices, _Inout_ OrtValue* ort_value, _Inout_ int64_t* indices_data, size_t indices_num); + + /** + * The assigns CSR format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_CSRC. This will not allocate any additional memory for data. The life spans of + * inner_data and outer_data buffers should eclipse the life span of this ::OrtValue. + * + * \param[in,out] ort_value ::OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in,out] inner_data pointer to a user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] inner_num number of inner CSR indices. Should either be 0 for fully sparse tensors or be equal + * to the number of nnz values specified to OrtApi::CreateSparseTensorWithValuesAsOrtValue. + * \param[in,out] outer_data pointer to user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] outer_num number of CSR outer indices. Should either be 0 for fully sparse tensors or + * equal to rows + 1 of the dense shape. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseCsrIndices, _Inout_ OrtValue* ort_value, _Inout_ int64_t* inner_data, size_t inner_num, + _Inout_ int64_t* outer_data, size_t outer_num); + + /** + * The assigns BlockSparse format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_BLOCK_SPARSE. This will not allocate any additional memory for data. The life span of + * indices_data buffer must eclipse the lifespan of this ::OrtValue. + * + * \param[in,out] ort_value OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in] indices_shape pointer to indices shape. Use {0} for fully sparse tensors + * \param[in] indices_shape_len length of the indices shape + * \param[in,out] indices_data pointer to user pre-allocated buffer or nullptr for fully sparse tensors. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseBlockSparseIndices, _Inout_ OrtValue* ort_value, const int64_t* indices_shape, size_t indices_shape_len, _Inout_ int32_t* indices_data); + + /** \brief Returns sparse tensor format enum iff a given ort value contains an instance of sparse tensor. + * + * \param[in] ort_value ::OrtValue that contains an instance of sparse tensor + * \param[out] out pointer to out parameter + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorFormat, _In_ const OrtValue* ort_value, _Out_ enum OrtSparseFormat* out); + + /** \brief Returns data type and shape of sparse tensor values (nnz) iff ::OrtValue contains a SparseTensor. + * + * \param[in] ort_value An ::OrtValue that contains a fully constructed sparse tensor + * \param[out] out Must be freed by OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorValuesTypeAndShape, _In_ const OrtValue* ort_value, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Returns numeric data for sparse tensor values (nnz). For string values use GetStringTensor*(). + * + * \param[in] ort_value an instance of ::OrtValue containing sparse tensor + * \param[out] out returns a pointer to values data. Do not attempt to free this ptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorValues, _In_ const OrtValue* ort_value, _Outptr_ const void** out); + + /** \brief Returns data type, shape for the type of indices specified by indices_format. + * + * \param[in] ort_value ::OrtValue containing sparse tensor. + * \param[in] indices_format One of the indices formats. It is an error to request a format that the sparse + * tensor does not contain. + * \param[out] out an instance of ::OrtTensorTypeAndShapeInfo. Must be freed by OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorIndicesTypeShape, _In_ const OrtValue* ort_value, enum OrtSparseIndicesFormat indices_format, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Returns indices data for the type of the indices specified by indices_format + * + * \param[in] ort_value ::OrtValue containing sparse tensor. + * \param[in] indices_format One of the indices formats. It is an error to request a format that the sparse tensor does not contain. + * \param[out] num_indices Pointer to where the number of indices entries is returned + * \param[out] indices Returned pointer to the indices data. Do not free the returned pointer as it refers to internal data owned by the ::OrtValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorIndices, _In_ const OrtValue* ort_value, enum OrtSparseIndicesFormat indices_format, _Out_ size_t* num_indices, _Outptr_ const void** indices); + /// @} + /// \name OrtSessionOptions + /// @{ + + /** + * \brief Sets out to 1 iff an optional type OrtValue has an element, 0 otherwise (OrtValue is None) + * Use this API to find if the optional type OrtValue is None or not. + * If the optional type OrtValue is not None, use the OrtValue just like any other OrtValue. + * For example, if you get an OrtValue that corresponds to Optional(tensor) and + * if HasValue() returns true, use it as tensor and so on. + + * \param[in] value Input OrtValue. + * \param[out] out indicating if the input OrtValue contains data (1) or if it is a None (0) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(HasValue, _In_ const OrtValue* value, _Out_ int* out); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Used for custom operators, gets the GPU compute stream to use to launch the custom a GPU kernel + * \see ::OrtCustomOp + * \param[in] context OrtKernelContext instance + * \param[out] out Returns pointer to a GPU compute stream that can be used to launch the custom GPU kernel. + * If retrieving the GPU compute stream is not relevant (GPU not enabled in the build, kernel partitioned to + * some other EP), then a nullptr is returned as the output param. + * Do not free or mutate the returned pointer as it refers to internal data owned by the underlying session. + * Only use it for custom kernel launching. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetGPUComputeStream, _In_ const OrtKernelContext* context, _Outptr_ void** out); + + /// @} + /// \name GetTensorMemoryInfo + /// @{ + /** \brief Returns a pointer to the ::OrtMemoryInfo of a Tensor + * \param[in] value ::OrtValue containing tensor. + * \param[out] mem_info ::OrtMemoryInfo of the tensor. Do NOT free the returned pointer. It is valid for the lifetime of the ::OrtValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorMemoryInfo, _In_ const OrtValue* value, _Out_ const OrtMemoryInfo** mem_info); + + /// @} + /// \name GetExecutionProviderApi + /// @{ + /** \brief Get a pointer to the requested version of the Execution Provider specific + * API extensions to the OrtApi + * \param[in] provider_name The name of the execution provider name. Currently only the following + * values are supported: "DML". + * \param[in] version Must be ::ORT_API_VERSION. + * \param[out] provider_api A void pointer containing a reference to the execution provider versioned api structure. + * For example, the provider_api pointer can be cast to the OrtDmlApi* when the provider_name is "DML". + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetExecutionProviderApi, _In_ const char* provider_name, _In_ uint32_t version, _Outptr_ const void** provider_api); + + /// @} + + /// \name SessionOptions + /// @{ + /** \brief Set custom thread creation function + * + * \param[in] options Session options + * \param[in] ort_custom_create_thread_fn Custom thread creation function + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomCreateThreadFn, _Inout_ OrtSessionOptions* options, _In_ OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /** \brief Set creation options for custom thread + * + * \param[in] options Session options + * \param[in] ort_custom_thread_creation_options Custom thread creation options (can be nullptr) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomThreadCreationOptions, _Inout_ OrtSessionOptions* options, _In_ void* ort_custom_thread_creation_options); + + /** \brief Set custom thread join function + * + * \param[in] options Session options + * \param[in] ort_custom_join_thread_fn Custom join thread function, must not be nullptr when ort_custom_create_thread_fn is set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomJoinThreadFn, _Inout_ OrtSessionOptions* options, _In_ OrtCustomJoinThreadFn ort_custom_join_thread_fn); + /// @} + + /// \name OrtThreadingOptions + /// @{ + /** \brief Set custom thread creation function for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_create_thread_fn Custom thread creation function + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomCreateThreadFn, _Inout_ OrtThreadingOptions* tp_options, _In_ OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /** \brief Set custom thread creation options for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_thread_creation_options Custom thread creation options (can be nullptr) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomThreadCreationOptions, _Inout_ OrtThreadingOptions* tp_options, _In_ void* ort_custom_thread_creation_options); + + /** \brief Set custom thread join function for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_join_thread_fn Custom thread join function, must not be nullptr when global ort_custom_create_thread_fn is set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomJoinThreadFn, _Inout_ OrtThreadingOptions* tp_options, _In_ OrtCustomJoinThreadFn ort_custom_join_thread_fn); + /// @} + + /** \brief Synchronize bound inputs. The call may be necessary for some providers, such as cuda, + * in case the system that allocated bound memory operated on a different stream. However, the + * operation is provider specific and could be a no-op. + * + * \param[inout] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SynchronizeBoundInputs, _Inout_ OrtIoBinding* binding_ptr); + + /** \brief Synchronize bound outputs. The call may be necessary for some providers, such as cuda, + * in case the system that allocated bound memory operated on a different stream. However, the + * operation is provider specific and could be a no-op. + * + * \param[inout] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SynchronizeBoundOutputs, _Inout_ OrtIoBinding* binding_ptr); + + /// \name OrtSessionOptions + /// @{ + + /** \brief Append CUDA execution provider to the session options + * + * If CUDA is not available (due to a non CUDA enabled build), this function will return failure. + * + * This is slightly different from OrtApi::SessionOptionsAppendExecutionProvider_CUDA, it takes an + * ::OrtCUDAProviderOptions which is publicly defined. This takes an opaque ::OrtCUDAProviderOptionsV2 + * which must be created with OrtApi::CreateCUDAProviderOptions. + * + * For OrtApi::SessionOptionsAppendExecutionProvider_CUDA, the user needs to instantiate ::OrtCUDAProviderOptions + * as well as allocate/release buffers for some members of ::OrtCUDAProviderOptions. + * Here, OrtApi::CreateCUDAProviderOptions and Ortapi::ReleaseCUDAProviderOptions will do the memory management for you. + * + * \param[in] options + * \param[in] cuda_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CUDA_V2, + _In_ OrtSessionOptions* options, _In_ const OrtCUDAProviderOptionsV2* cuda_options); + + /// @} + /// \name OrtCUDAProviderOptionsV2 + /// @{ + + /** \brief Create an OrtCUDAProviderOptionsV2 + * + * \param[out] out Newly created ::OrtCUDAProviderOptionsV2. Must be released with OrtApi::ReleaseCudaProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(CreateCUDAProviderOptions, _Outptr_ OrtCUDAProviderOptionsV2** out); + + /** \brief Set options in a CUDA Execution Provider. + * + * Please refer to https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#configuration-options + * to know the available keys and values. Key should be in null terminated string format of the member of ::OrtCUDAProviderOptionsV2 + * and value should be its related range. + * + * For example, key="device_id" and value="0" + * + * \param[in] cuda_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(UpdateCUDAProviderOptions, _Inout_ OrtCUDAProviderOptionsV2* cuda_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** + * Get serialized CUDA provider options string. + * + * For example, "device_id=0;arena_extend_strategy=0;......" + * + * \param cuda_options - OrtCUDAProviderOptionsV2 instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions() + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(GetCUDAProviderOptionsAsString, _In_ const OrtCUDAProviderOptionsV2* cuda_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtCUDAProviderOptionsV2 + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + * + * \since Version 1.11. + */ + void(ORT_API_CALL* ReleaseCUDAProviderOptions)(_Frees_ptr_opt_ OrtCUDAProviderOptionsV2* input); + + /// @} + + /** \brief Append MIGraphX provider to session options + * + * If MIGraphX is not available (due to a non MIGraphX enabled build, or if MIGraphX is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] migraphx_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_MIGraphX, + _In_ OrtSessionOptions* options, _In_ const OrtMIGraphXProviderOptions* migraphx_options); + + /** \brief Replace initialized Tensors with external data with the data provided in initializers. + * + * The function will find the initialized TensorProtos with external data in the graph with the provided names and + * replace them with the provided tensors. The API verifies that the TensorProto being replaced + * has an external data reference and has the same name, dimensions and data type as its replacement. The replacement + * will occur before any of the optimizations take place. The data will be copied into the graph + * since TensorProto can't refer to the user provided buffers. + * + * Once the model has been loaded, the OrtValue(s) added to SessionOptions instance will be removed + * from the internal SessionOptions copy to save memory, the user provided buffers can then be deallocated + * and the SessionOptions instance that refers to them can be destroyed. + * + * \param[in] options + * \param[in] initializer_names Array of null terminated UTF-8 encoded strings of the initializers names. + * \param[in] initializers Array of ::OrtValue type + * \param[in] initializers_num Number of elements in the initializer_names and initializers + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.12. + */ + ORT_API2_STATUS(AddExternalInitializers, _In_ OrtSessionOptions* options, + _In_reads_(input_len) const char* const* initializer_names, + _In_reads_(input_len) const OrtValue* const* initializers, size_t initializers_num); + + /** \brief: Create attribute of onnxruntime operator + * + * \param[in] name Name of the attribute + * \param[in] data Data content of the attribute + * \param[in] len Number of bytes stored in data + * \param[in] type Data type + * \param[out] op_attr Attribute that has been created, which must be released by OrtApi::ReleaseOpAttr + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CreateOpAttr, + _In_ const char* name, + _In_ const void* data, + _In_ int len, + _In_ OrtOpAttrType type, + _Outptr_ OrtOpAttr** op_attr); + + /* \brief: Release op attribute + * + * \param[in] opAttr Attribute created by OrtApi::CreateOpAttr + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(OpAttr); + + /** \brief: Create onnxruntime native operator + * + * \param[in] info Kernel info + * \param[in] op_name Operator name + * \param[in] domain Operator domain + * \param[in] version Operator opset version + * \param[in] type_constraint_names Name of the type contraints, such as "T" or "T1" + * \param[in] type_constraint_values Type of each contraints + * \param[in] type_constraint_count Number of contraints + * \param[in] attr_values Attributes used to initialize the operator + * \param[in] attr_count Number of the attributes + * \param[in] input_count Number of inputs + * \param[in] output_count Number of outputs + * \param[out] ort_op Operator that has been created + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CreateOp, + _In_ const OrtKernelInfo* info, + _In_ const char* op_name, + _In_ const char* domain, + _In_ int version, + _In_opt_ const char** type_constraint_names, + _In_opt_ const ONNXTensorElementDataType* type_constraint_values, + _In_opt_ int type_constraint_count, + _In_opt_ const OrtOpAttr* const* attr_values, + _In_opt_ int attr_count, + _In_ int input_count, + _In_ int output_count, + _Outptr_ OrtOp** ort_op); + + /** \brief: Invoke the operator created by OrtApi::CreateOp + * The inputs must follow the order as specified in onnx specification + * + * \param[in] context Kernel context + * \param[in] ort_op Operator that has been created + * \param[in] input_values Array of inputs + * \param[in] input_count Number of inputs + * \param[in] output_values Array of outputs + * \param[in] output_count Number of outputs + * + * \since Version 1.12. + */ + ORT_API2_STATUS(InvokeOp, + _In_ const OrtKernelContext* context, + _In_ const OrtOp* ort_op, + _In_ const OrtValue* const* input_values, + _In_ int input_count, + _Inout_ OrtValue* const* output_values, + _In_ int output_count); + + /* \brief: Release an onnxruntime operator + * + * \param[in] Op Operator created by OrtApi::CreateOp + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(Op); + + /** \brief: Append execution provider to the session options. + * \param[in] options + * \param[in] provider_name - provider to add. + * \param[in] provider_options_keys - keys to configure the provider options + * \param[in] provider_options_values - values to configure the provider options + * \param[in] num_keys - number of keys passed in + * + * Currently supported providers: + * SNPE + * XNNPACK + * + * Note: If an execution provider has a dedicated SessionOptionsAppendExecutionProvider_ function + * that should be used to add it. + * + * SNPE supported keys: + * "runtime": SNPE runtime engine, options: "CPU", "CPU_FLOAT32", "GPU", "GPU_FLOAT32_16_HYBRID", "GPU_FLOAT16", + * "DSP", "DSP_FIXED8_TF", "AIP_FIXED_TF", "AIP_FIXED8_TF". + * Mapping to SNPE Runtime_t definition: CPU, CPU_FLOAT32 => zdl::DlSystem::Runtime_t::CPU; + * GPU, GPU_FLOAT32_16_HYBRID => zdl::DlSystem::Runtime_t::GPU; + * GPU_FLOAT16 => zdl::DlSystem::Runtime_t::GPU_FLOAT16; + * DSP, DSP_FIXED8_TF => zdl::DlSystem::Runtime_t::DSP. + * AIP_FIXED_TF, AIP_FIXED8_TF => zdl::DlSystem::Runtime_t::AIP_FIXED_TF. + * "priority": execution priority, options: "low", "normal". + * "buffer_type": ITensor or user buffers, options: "ITENSOR", user buffer with different types - "TF8", "TF16", "UINT8", "FLOAT". + * "ITENSOR" -- default, ITensor which is float only. + * "TF8" -- quantized model required, "FLOAT" -- for both quantized or non-quantized model + * If SNPE is not available (due to a non Snpe enabled build or its dependencies not being installed), this function will fail. + * + * XNNPACK supported keys: + * "intra_op_num_threads": number of thread-pool size to use for XNNPACK execution provider. + * default value is 0, which means to use the session thread-pool size. + * + * \since Version 1.12. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider, _In_ OrtSessionOptions* options, + _In_ const char* provider_name, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /* \brief: Get a copy of kernel info + * + * \param[in] info Kernel info + * \param[out] info_copy Copy of kernel info + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CopyKernelInfo, + _In_ const OrtKernelInfo* info, + _Outptr_ OrtKernelInfo** info_copy); + + /* \brief: Release kernel info + * + * \param[in] KernelInfo A copy of kernel info returned by CopyKernelInfo + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(KernelInfo); + + /* \brief: Get the training C Api + * + * \since Version 1.13 + */ + const OrtTrainingApi*(ORT_API_CALL* GetTrainingApi)(uint32_t version)NO_EXCEPTION; + + /** \brief Append CANN provider to session options + * + * If CANN is not available (due to a non CANN enabled build, or if CANN is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] cann_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CANN, + _In_ OrtSessionOptions* options, _In_ const OrtCANNProviderOptions* cann_options); + + /** \brief Create an OrtCANNProviderOptions + * + * \param[out] out created ::OrtCANNProviderOptions. Must be released with OrtApi::ReleaseCANNProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(CreateCANNProviderOptions, _Outptr_ OrtCANNProviderOptions** out); + + /** \brief Set options in a CANN Execution Provider. + * + * \param[in] cann_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(UpdateCANNProviderOptions, _Inout_ OrtCANNProviderOptions* cann_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get serialized CANN provider options string. + * + * \param[in] cann_options OrtCANNProviderOptions instance + * \param[in] allocator a ptr to an instance of OrtAllocator obtained with CreateAllocator() + * or GetAllocatorWithDefaultOptions(), the specified allocator will be used to allocate + * continuous buffers for output strings and lengths. + * \param[out] ptr is a UTF-8 null terminated string allocated using 'allocator'. + * The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(GetCANNProviderOptionsAsString, _In_ const OrtCANNProviderOptions* cann_options, + _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an OrtCANNProviderOptions + * + * \param[in] the pointer of OrtCANNProviderOptions which will been deleted + * + * \since Version 1.13. + */ + void(ORT_API_CALL* ReleaseCANNProviderOptions)(_Frees_ptr_opt_ OrtCANNProviderOptions* input); + + /* \brief Get OrtDevice type from MemoryInfo + * + * \since Version 1.14 + */ + void(ORT_API_CALL* MemoryInfoGetDeviceType)(_In_ const OrtMemoryInfo* ptr, _Out_ OrtMemoryInfoDeviceType* out); + + /* \brief Update the OrtEnv instance with custom log severity level + * + * \param[in] ort_env The OrtEnv instance being used + * \param[in] log_severity_level The log severity level. + * + * \since Version 1.14. + */ + ORT_API2_STATUS(UpdateEnvWithCustomLogLevel, _In_ OrtEnv* ort_env, OrtLoggingLevel log_severity_level); + + /* \brief Set affinities for intra op threads + * + * Affinity string follows format: + * logical_processor_id,logical_processor_id;logical_processor_id,logical_processor_id + * Semicolon isolates configurations among threads, while comma split processors where ith thread expected to attach to. + * e.g. 1,2,3;4,5 + * specifies affinities for two threads, with the 1st thread attach to the 1st, 2nd, and 3rd processor, and 2nd thread to the 4th and 5th. + * To ease the configuration, an "interval" is also allowed: + * e.g. 1-8;8-16;17-24 + * orders that the 1st thread runs on first eight processors, 2nd thread runs on next eight processors, and so forth. + * Note: + * 1. Once set, the number of thread affinities must equal to intra_op_num_threads - 1, + * ort does not set affinity on the main thread which is started and managed by the calling app; + * 2. For windows, ort will infer the group id from a logical processor id, for example, assuming there are two groups with each has 64 logical processors, + * an id of 64 will be inferred as the last processor of the 1st group, while 65 will be interpreted as the 1st processor of the second group. + * Hence 64-65 is an invalid configuration, because a windows thread cannot be attached to processors across group boundary. + * + * \since Version 1.14 + */ + ORT_API2_STATUS(SetGlobalIntraOpThreadAffinity, _Inout_ OrtThreadingOptions* tp_options, const char* affinity_string); + + /** \brief Register custom ops from a shared library. + * + * Loads a shared library (.dll on windows, .so on linux, etc) named 'library_name' and looks for this entry point: + * OrtStatus* RegisterCustomOps(OrtSessionOptions * options, const OrtApiBase* api); + * It then passes in the provided session options to this function along with the api base. + * + * The handle to the loaded library is automatically released by ORT when the last OrtSession that references the + * library handle is released. If no OrtSession is created, then the library handle is released when the provided + * OrtSessionOptions is released. + * + * \param[in] options The session options. + * \param[in] library_name The name of the shared library to load and register. Refer to OS-specific dynamic library + * loading utilities (e.g., LoadLibraryEx on Windows or dlopen on Linux/MacOS) for information + * on the format of library names and search paths. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(RegisterCustomOpsLibrary_V2, _Inout_ OrtSessionOptions* options, _In_ const ORTCHAR_T* library_name); + + /** \brief Register custom ops by calling a RegisterCustomOpsFn function. + * + * Searches for registration_func_name and if found calls it. + * + * The library containing the function must either be linked against or previously loaded by the executable. + * + * If you want ONNX Runtime to load the library and manage its lifetime, use RegisterCustomOpsLibrary_V2. + * + * RegisterCustomOpsUsingFunction can be used in scenarios where it may not be possible for ONNX Runtime to load + * the library from a path. e.g. mobile platforms where the library must be linked into the app. + * + * The registration function must have the signature of RegisterCustomOpsFn: + * OrtStatus* (*fn)(OrtSessionOptions* options, const OrtApiBase* api); + * + * See https://onnxruntime.ai/docs/reference/operators/add-custom-op.html for details on how the registration + * function should be implemented. + * + * \param[in] options OrtSessionOptions that is passed through as the first argument in the call to the + * registration function. + * \param[in] registration_func_name Name of registration function to use. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(RegisterCustomOpsUsingFunction, _Inout_ OrtSessionOptions* options, + _In_ const char* registration_func_name); + + /// @} + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get the number of inputs from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the number of inputs + * during kernel/session creation. + * + * \param[in] info Instance of ::OrtKernelInfo. + * \param[out] out Pointer to variable assigned with the result on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputCount, _In_ const OrtKernelInfo* info, _Out_ size_t* out); + + /** \brief Get the number of outputs from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the number of outputs + * during kernel/session creation. + * + * \param[in] info Instance of ::OrtKernelInfo. + * \param[out] out Pointer to variable assigned with the result on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputCount, _In_ const OrtKernelInfo* info, _Out_ size_t* out); + + /** \brief Get the name of a ::OrtKernelInfo's input. + * + * Used in the CreateKernel callback of an OrtCustomOp to query an input's name + * during kernel/session creation. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index The index of the input name to get. Returns a failure status if out-of-bounds. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the input's name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputName, _In_ const OrtKernelInfo* info, size_t index, _Out_ char* out, + _Inout_ size_t* size); + + /** \brief Get the name of a ::OrtKernelInfo's output. + * + * Used in the CreateKernel callback of an OrtCustomOp to query an output's name + * during kernel/session creation. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index The index of the output name to get. Returns a failure status if out-of-bounds. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the output's + * name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputName, _In_ const OrtKernelInfo* info, size_t index, _Out_ char* out, + _Inout_ size_t* size); + + /** \brief Get the type information for a ::OrtKernelInfo's input. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the shape and type information + * of an input during kernel/session creation. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[out] type_info Pointer set to the resulting ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputTypeInfo, _In_ const OrtKernelInfo* info, size_t index, + _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get the type information for a ::OrtKernelInfo's output. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the shape and type information + * of an output during kernel/session creation. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[out] type_info Pointer set to the resulting ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputTypeInfo, _In_ const OrtKernelInfo* info, size_t index, + _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get a ::OrtValue tensor stored as an attribute in the graph node. + * + * Used in the CreateKernel callback of an OrtCustomOp to get a tensor attribute. + * + * \param[in] info ::OrtKernelInfo instance. + * \param[in] name UTF-8 null-terminated string representing the attribute's name. + * \param[in] allocator Allocator used to allocate the internal tensor state. + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue, + * which will also free internal tensor state allocated with the provided allocator. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_tensor, _In_ const OrtKernelInfo* info, _In_z_ const char* name, + _Inout_ OrtAllocator* allocator, _Outptr_ OrtValue** out); + + /// @} + /// \name OrtSessionOptions + /// Custom operator APIs + /// @{ + + /** \brief Checks if the given session configuration entry exists. + * + * The config_key formats are defined in onnxruntime_session_options_config_keys.h + * + * Can be used in a custom operator library to check for session configuration entries + * that target one or more custom operators in the library. Example: The config entry + * custom_op.myop.some_key targets a custom op named "myop". + * + * \param[in] options The ::OrtSessionOptions instance. + * \param[in] config_key A null-terminated UTF-8 string representation of the configuration key. + * \param[out] out Pointer set to 1 if the entry exists and 0 otherwise. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(HasSessionConfigEntry, _In_ const OrtSessionOptions* options, + _In_z_ const char* config_key, _Out_ int* out); + + /** \brief Get a session configuration value. + * + * Returns a failure status if the configuration key does not exist. + * The config_key and the format of config_value are defined in onnxruntime_session_options_config_keys.h + * + * If `config_value` is nullptr, the value of `size` is set to the true size of the string + * value (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual string value's size, + * the value of `size` is set to the true size of the string value, the provided memory + * is filled with the value's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string value's size and `config_value` + * is not nullptr, the value of `size` is set to the true size of the string value + * and a failure status is returned. + * + * Can be used in a custom operator library to get session configuration entries + * that target one or more custom operators in the library. Example: The config entry + * custom_op.myop.some_key targets a custom op named "myop". + * + * \param[in] options The session options. + * \param[in] config_key A null-terminated UTF-8 string representation of the config key. + * \param[in] config_value Pointer to memory where the null-terminated UTF-8 string value will be stored. + * \param[in,out] size Pointer to the size of the `config_value` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(GetSessionConfigEntry, _In_ const OrtSessionOptions* options, + _In_z_ const char* config_key, _Out_ char* config_value, _Inout_ size_t* size); + + /// @} + +#ifdef __cplusplus + OrtApi(const OrtApi&) = delete; // Prevent users from accidentally copying the API structure, it should always be passed as a pointer +#endif +}; + +/* + * Steps to use a custom op: + * 1 Create an OrtCustomOpDomain with the domain name used by the custom ops + * 2 Create an OrtCustomOp structure for each op and add them to the domain + * 3 Call OrtAddCustomOpDomain to add the custom domain of ops to the session options + */ + +// Specifies some characteristics of inputs/outputs of custom ops: +// Specify if the inputs/outputs are one of: +// 1) Non-optional (input/output must be present in the node) +// 2) Optional (input/output may be absent in the node) +// 3) Variadic: A variadic input or output specifies N (i.e., the minimum arity) or more operands. +// Only the last input or output of a custom op may be marked as variadic. +// The homogeneity of the variadic input or output determines whether all operands must be of the same +// tensor element type. +typedef enum OrtCustomOpInputOutputCharacteristic { + INPUT_OUTPUT_REQUIRED = 0, + INPUT_OUTPUT_OPTIONAL, + INPUT_OUTPUT_VARIADIC, +} OrtCustomOpInputOutputCharacteristic; + +/* + * The OrtCustomOp structure defines a custom op's schema and its kernel callbacks. The callbacks are filled in by + * the implementor of the custom op. + */ +struct OrtCustomOp { + uint32_t version; // Must be initialized to ORT_API_VERSION + + // This callback creates the kernel, which is a user defined parameter that is passed to the Kernel* callbacks below. + void*(ORT_API_CALL* CreateKernel)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api, + _In_ const OrtKernelInfo* info); + + // Returns the name of the op + const char*(ORT_API_CALL* GetName)(_In_ const struct OrtCustomOp* op); + + // Returns the type of the execution provider, return nullptr to use CPU execution provider + const char*(ORT_API_CALL* GetExecutionProviderType)(_In_ const struct OrtCustomOp* op); + + // Returns the count and types of the input & output tensors + ONNXTensorElementDataType(ORT_API_CALL* GetInputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + size_t(ORT_API_CALL* GetInputTypeCount)(_In_ const struct OrtCustomOp* op); + ONNXTensorElementDataType(ORT_API_CALL* GetOutputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + size_t(ORT_API_CALL* GetOutputTypeCount)(_In_ const struct OrtCustomOp* op); + + // Op kernel callbacks + void(ORT_API_CALL* KernelCompute)(_In_ void* op_kernel, _In_ OrtKernelContext* context); + void(ORT_API_CALL* KernelDestroy)(_In_ void* op_kernel); + + // Returns the characteristics of the input & output tensors + OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetInputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetOutputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + + // Returns the memory type of the input tensors. This API allows the custom op + // to place the inputs on specific devices. By default, it returns + // OrtMemTypeDefault, which means the input is placed on the default device for + // the execution provider. If the inputs need to be with different memory tyeps, + // this function can be overridden to return the specific memory types. + OrtMemType(ORT_API_CALL* GetInputMemoryType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + + // Returns the minimum number of input arguments expected for the variadic input. + // Applicable only for custom ops that have a variadic input. + int(ORT_API_CALL* GetVariadicInputMinArity)(_In_ const struct OrtCustomOp* op); + + // Returns true (non-zero) if all arguments of a variadic input have to be of the same type (homogeneous), + // and false (zero) otherwise. + // Applicable only for custom ops that have a variadic input. + int(ORT_API_CALL* GetVariadicInputHomogeneity)(_In_ const struct OrtCustomOp* op); + + // Returns the minimum number of output values expected for the variadic output. + // Applicable only for custom ops that have a variadic output. + int(ORT_API_CALL* GetVariadicOutputMinArity)(_In_ const struct OrtCustomOp* op); + + // Returns true (non-zero) if all outputs values of a variadic output have to be of the same type (homogeneous), + // and false (zero) otherwise. + // Applicable only for custom ops that have a variadic output. + int(ORT_API_CALL* GetVariadicOutputHomogeneity)(_In_ const struct OrtCustomOp* op); +}; + +/* + * This is the old way to add the CUDA provider to the session, please use SessionOptionsAppendExecutionProvider_CUDA above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with CUDA support and the CUDA provider shared library exists + * + * \param device_id CUDA device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CUDA, _In_ OrtSessionOptions* options, int device_id); + +/* + * This is the old way to add the MIGraphX provider to the session, please use + * SessionOptionsAppendExecutionProvider_MIGraphX above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with + * HIP support and the MIGraphX provider shared library exists + * + * \param device_id HIP device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_MIGraphX, _In_ OrtSessionOptions* options, int device_id); + +#ifdef __cplusplus +} +#endif + +//! @} diff --git a/cpp/external/onnxruntime/include/onnxruntime_cxx_api.h b/cpp/external/onnxruntime/include/onnxruntime_cxx_api.h new file mode 100644 index 0000000..97b2aa4 --- /dev/null +++ b/cpp/external/onnxruntime/include/onnxruntime_cxx_api.h @@ -0,0 +1,1876 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Summary: The Ort C++ API is a header only wrapper around the Ort C API. +// +// The C++ API simplifies usage by returning values directly instead of error codes, throwing exceptions on errors +// and automatically releasing resources in the destructors. The primary purpose of C++ API is exception safety so +// all the resources follow RAII and do not leak memory. +// +// Each of the C++ wrapper classes holds only a pointer to the C internal object. Treat them like smart pointers. +// To create an empty object, pass 'nullptr' to the constructor (for example, Env e{nullptr};). However, you can't use them +// until you assign an instance that actually holds an underlying object. +// +// For Ort objects only move assignment between objects is allowed, there are no copy constructors. +// Some objects have explicit 'Clone' methods for this purpose. +// +// ConstXXXX types are copyable since they do not own the underlying C object, so you can pass them to functions as arguments +// by value or by reference. ConstXXXX types are restricted to const only interfaces. +// +// UnownedXXXX are similar to ConstXXXX but also allow non-const interfaces. +// +// The lifetime of the corresponding owning object must eclipse the lifetimes of the ConstXXXX/UnownedXXXX types. They exists so you do not +// have to fallback to C types and the API with the usual pitfalls. In general, do not use C API from your C++ code. + +#pragma once +#include "onnxruntime_c_api.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ORT_NO_EXCEPTIONS +#include +#endif + +/** \brief All C++ Onnxruntime APIs are defined inside this namespace + * + */ +namespace Ort { + +/** \brief All C++ methods that can fail will throw an exception of this type + * + * If ORT_NO_EXCEPTIONS is defined, then any error will result in a call to abort() + */ +struct Exception : std::exception { + Exception(std::string&& string, OrtErrorCode code) : message_{std::move(string)}, code_{code} {} + + OrtErrorCode GetOrtErrorCode() const { return code_; } + const char* what() const noexcept override { return message_.c_str(); } + + private: + std::string message_; + OrtErrorCode code_; +}; + +#ifdef ORT_NO_EXCEPTIONS +// The #ifndef is for the very special case where the user of this library wants to define their own way of handling errors. +// NOTE: This header expects control flow to not continue after calling ORT_CXX_API_THROW +#ifndef ORT_CXX_API_THROW +#define ORT_CXX_API_THROW(string, code) \ + do { \ + std::cerr << Ort::Exception(string, code) \ + .what() \ + << std::endl; \ + abort(); \ + } while (false) +#endif +#else +#define ORT_CXX_API_THROW(string, code) \ + throw Ort::Exception(string, code) +#endif + +// This is used internally by the C++ API. This class holds the global variable that points to the OrtApi, +// it's in a template so that we can define a global variable in a header and make +// it transparent to the users of the API. +template +struct Global { + static const OrtApi* api_; +}; + +// If macro ORT_API_MANUAL_INIT is defined, no static initialization will be performed. Instead, user must call InitApi() before using it. +template +#ifdef ORT_API_MANUAL_INIT +const OrtApi* Global::api_{}; +inline void InitApi() { Global::api_ = OrtGetApiBase()->GetApi(ORT_API_VERSION); } + +// Used by custom operator libraries that are not linked to onnxruntime. Sets the global API object, which is +// required by C++ APIs. +// +// Example mycustomop.cc: +// +// #define ORT_API_MANUAL_INIT +// #include +// #undef ORT_API_MANUAL_INIT +// +// OrtStatus* ORT_API_CALL RegisterCustomOps(OrtSessionOptions* options, const OrtApiBase* api_base) { +// Ort::InitApi(api_base->GetApi(ORT_API_VERSION)); +// // ... +// } +// +inline void InitApi(const OrtApi* api) { Global::api_ = api; } +#else +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +// "Global initializer calls a non-constexpr function." Therefore you can't use ORT APIs in the other global initializers. +// Please define ORT_API_MANUAL_INIT if it conerns you. +#pragma warning(disable : 26426) +#endif +const OrtApi* Global::api_ = OrtGetApiBase()->GetApi(ORT_API_VERSION); +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(pop) +#endif +#endif + +/// This returns a reference to the OrtApi interface in use +inline const OrtApi& GetApi() { return *Global::api_; } + +/// +/// This is a C++ wrapper for OrtApi::GetAvailableProviders() and +/// returns a vector of strings representing the available execution providers. +/// +/// vector of strings +std::vector GetAvailableProviders(); + +/** \brief IEEE 754 half-precision floating point data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint16_t. + * The size of the structure should align with uint16_t and one can freely cast + * uint16_t buffers to/from Ort::Float16_t to feed and retrieve data. + * + * Generally, you can feed any of your types as float16/blfoat16 data to create a tensor + * on top of it, providing it can form a continuous buffer with 16-bit elements with no padding. + * And you can also feed a array of uint16_t elements directly. For example, + * + * \code{.unparsed} + * uint16_t values[] = { 15360, 16384, 16896, 17408, 17664}; + * constexpr size_t values_length = sizeof(values) / sizeof(values[0]); + * std::vector dims = {values_length}; // one dimensional example + * Ort::MemoryInfo info("Cpu", OrtDeviceAllocator, 0, OrtMemTypeDefault); + * // Note we are passing bytes count in this api, not number of elements -> sizeof(values) + * auto float16_tensor = Ort::Value::CreateTensor(info, values, sizeof(values), + * dims.data(), dims.size(), ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16); + * \endcode + * + * Here is another example, a little bit more elaborate. Let's assume that you use your own float16 type and you want to use + * a templated version of the API above so the type is automatically set based on your type. You will need to supply an extra + * template specialization. + * + * \code{.unparsed} + * namespace yours { struct half {}; } // assume this is your type, define this: + * namespace Ort { + * template<> + * struct TypeToTensorType { static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16; }; + * } //namespace Ort + * + * std::vector values; + * std::vector dims = {values.size()}; // one dimensional example + * Ort::MemoryInfo info("Cpu", OrtDeviceAllocator, 0, OrtMemTypeDefault); + * // Here we are passing element count -> values.size() + * auto float16_tensor = Ort::Value::CreateTensor(info, values.data(), values.size(), dims.data(), dims.size()); + * + * \endcode + */ +struct Float16_t { + uint16_t value; + constexpr Float16_t() noexcept : value(0) {} + constexpr Float16_t(uint16_t v) noexcept : value(v) {} + constexpr operator uint16_t() const noexcept { return value; } + constexpr bool operator==(const Float16_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float16_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float16_t) == sizeof(uint16_t), "Sizes must match"); + +/** \brief bfloat16 (Brain Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint16_t. + * The size of the structure should align with uint16_t and one can freely cast + * uint16_t buffers to/from Ort::BFloat16_t to feed and retrieve data. + * + * See also code examples for Float16_t above. + */ +struct BFloat16_t { + uint16_t value; + constexpr BFloat16_t() noexcept : value(0) {} + constexpr BFloat16_t(uint16_t v) noexcept : value(v) {} + constexpr operator uint16_t() const noexcept { return value; } + constexpr bool operator==(const BFloat16_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const BFloat16_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(BFloat16_t) == sizeof(uint16_t), "Sizes must match"); + +namespace detail { +// This is used internally by the C++ API. This macro is to make it easy to generate overloaded methods for all of the various OrtRelease* functions for every Ort* type +// This can't be done in the C API since C doesn't have function overloading. +#define ORT_DEFINE_RELEASE(NAME) \ + inline void OrtRelease(Ort##NAME* ptr) { GetApi().Release##NAME(ptr); } + +ORT_DEFINE_RELEASE(Allocator); +ORT_DEFINE_RELEASE(MemoryInfo); +ORT_DEFINE_RELEASE(CustomOpDomain); +ORT_DEFINE_RELEASE(ThreadingOptions); +ORT_DEFINE_RELEASE(Env); +ORT_DEFINE_RELEASE(RunOptions); +ORT_DEFINE_RELEASE(Session); +ORT_DEFINE_RELEASE(SessionOptions); +ORT_DEFINE_RELEASE(TensorTypeAndShapeInfo); +ORT_DEFINE_RELEASE(SequenceTypeInfo); +ORT_DEFINE_RELEASE(MapTypeInfo); +ORT_DEFINE_RELEASE(TypeInfo); +ORT_DEFINE_RELEASE(Value); +ORT_DEFINE_RELEASE(ModelMetadata); +ORT_DEFINE_RELEASE(IoBinding); +ORT_DEFINE_RELEASE(ArenaCfg); +ORT_DEFINE_RELEASE(Status); +ORT_DEFINE_RELEASE(OpAttr); +ORT_DEFINE_RELEASE(Op); +ORT_DEFINE_RELEASE(KernelInfo); + +#undef ORT_DEFINE_RELEASE + +/** \brief This is a tagging template type. Use it with Base to indicate that the C++ interface object + * has no ownership of the underlying C object. + */ +template +struct Unowned { + using Type = T; +}; + +/** \brief Used internally by the C++ API. C++ wrapper types inherit from this. + * This is a zero cost abstraction to wrap the C API objects and delete them on destruction. + * + * All of the C++ classes + * a) serve as containers for pointers to objects that are created by the underlying C API. + * Their size is just a pointer size, no need to dynamically allocate them. Use them by value. + * b) Each of struct XXXX, XXX instances function as smart pointers to the underlying C API objects. + * they would release objects owned automatically when going out of scope, they are move-only. + * c) ConstXXXX and UnownedXXX structs function as non-owning, copyable containers for the above pointers. + * ConstXXXX allow calling const interfaces only. They give access to objects that are owned by somebody else + * such as Onnxruntime or instances of XXXX classes. + * d) serve convenient interfaces that return C++ objects and further enhance exception and type safety so they can be used + * in C++ code. + * + */ + +/// +/// This is a non-const pointer holder that is move-only. Disposes of the pointer on destruction. +/// +template +struct Base { + using contained_type = T; + + constexpr Base() = default; + constexpr explicit Base(contained_type* p) noexcept : p_{p} {} + ~Base() { OrtRelease(p_); } + + Base(const Base&) = delete; + Base& operator=(const Base&) = delete; + + Base(Base&& v) noexcept : p_{v.p_} { v.p_ = nullptr; } + Base& operator=(Base&& v) noexcept { + OrtRelease(p_); + p_ = v.release(); + return *this; + } + + constexpr operator contained_type*() const noexcept { return p_; } + + /// \brief Relinquishes ownership of the contained C object pointer + /// The underlying object is not destroyed + contained_type* release() { + T* p = p_; + p_ = nullptr; + return p; + } + + protected: + contained_type* p_{}; +}; + +// Undefined. For const types use Base> +template +struct Base; + +/// +/// Covers unowned pointers owned by either the ORT +/// or some other instance of CPP wrappers. +/// Used for ConstXXX and UnownedXXXX types that are copyable. +/// Also convenient to wrap raw OrtXX pointers . +/// +/// +template +struct Base> { + using contained_type = typename Unowned::Type; + + constexpr Base() = default; + constexpr explicit Base(contained_type* p) noexcept : p_{p} {} + + ~Base() = default; + + Base(const Base&) = default; + Base& operator=(const Base&) = default; + + Base(Base&& v) noexcept : p_{v.p_} { v.p_ = nullptr; } + Base& operator=(Base&& v) noexcept { + p_ = nullptr; + std::swap(p_, v.p_); + return *this; + } + + constexpr operator contained_type*() const noexcept { return p_; } + + protected: + contained_type* p_{}; +}; + +// Light functor to release memory with OrtAllocator +struct AllocatedFree { + OrtAllocator* allocator_; + explicit AllocatedFree(OrtAllocator* allocator) + : allocator_(allocator) {} + void operator()(void* ptr) const { + if (ptr) allocator_->Free(allocator_, ptr); + } +}; + +} // namespace detail + +struct AllocatorWithDefaultOptions; +struct Env; +struct TypeInfo; +struct Value; +struct ModelMetadata; + +/** \brief unique_ptr typedef used to own strings allocated by OrtAllocators + * and release them at the end of the scope. The lifespan of the given allocator + * must eclipse the lifespan of AllocatedStringPtr instance + */ +using AllocatedStringPtr = std::unique_ptr; + +/** \brief The Status that holds ownership of OrtStatus received from C API + * Use it to safely destroy OrtStatus* returned from the C API. Use appropriate + * constructors to construct an instance of a Status object from exceptions. + */ +struct Status : detail::Base { + explicit Status(std::nullptr_t) {} ///< Create an empty object, must be assigned a valid one to be used + explicit Status(OrtStatus* status); ///< Takes ownership of OrtStatus instance returned from the C API. Must be non-null + explicit Status(const Exception&); ///< Creates status instance out of exception + explicit Status(const std::exception&); ///< Creates status instance out of exception + std::string GetErrorMessage() const; + OrtErrorCode GetErrorCode() const; +}; + +/** \brief The ThreadingOptions + * + * The ThreadingOptions used for set global threadpools' options of The Env. + */ +struct ThreadingOptions : detail::Base { + /// \brief Wraps OrtApi::CreateThreadingOptions + ThreadingOptions(); + + /// \brief Wraps OrtApi::SetGlobalIntraOpNumThreads + ThreadingOptions& SetGlobalIntraOpNumThreads(int intra_op_num_threads); + + /// \brief Wraps OrtApi::SetGlobalInterOpNumThreads + ThreadingOptions& SetGlobalInterOpNumThreads(int inter_op_num_threads); + + /// \brief Wraps OrtApi::SetGlobalSpinControl + ThreadingOptions& SetGlobalSpinControl(int allow_spinning); + + /// \brief Wraps OrtApi::SetGlobalDenormalAsZero + ThreadingOptions& SetGlobalDenormalAsZero(); + + /// \brief Wraps OrtApi::SetGlobalCustomCreateThreadFn + ThreadingOptions& SetGlobalCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /// \brief Wraps OrtApi::SetGlobalCustomThreadCreationOptions + ThreadingOptions& SetGlobalCustomThreadCreationOptions(void* ort_custom_thread_creation_options); + + /// \brief Wraps OrtApi::SetGlobalCustomJoinThreadFn + ThreadingOptions& SetGlobalCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn); +}; + +/** \brief The Env (Environment) + * + * The Env holds the logging state used by all other objects. + * Note: One Env must be created before using any other Onnxruntime functionality + */ +struct Env : detail::Base { + explicit Env(std::nullptr_t) {} ///< Create an empty Env object, must be assigned a valid one to be used + + /// \brief Wraps OrtApi::CreateEnv + Env(OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief Wraps OrtApi::CreateEnvWithCustomLogger + Env(OrtLoggingLevel logging_level, const char* logid, OrtLoggingFunction logging_function, void* logger_param); + + /// \brief Wraps OrtApi::CreateEnvWithGlobalThreadPools + Env(const OrtThreadingOptions* tp_options, OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief Wraps OrtApi::CreateEnvWithCustomLoggerAndGlobalThreadPools + Env(const OrtThreadingOptions* tp_options, OrtLoggingFunction logging_function, void* logger_param, + OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief C Interop Helper + explicit Env(OrtEnv* p) : Base{p} {} + + Env& EnableTelemetryEvents(); ///< Wraps OrtApi::EnableTelemetryEvents + Env& DisableTelemetryEvents(); ///< Wraps OrtApi::DisableTelemetryEvents + + Env& UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level); ///< Wraps OrtApi::UpdateEnvWithCustomLogLevel + + Env& CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg); ///< Wraps OrtApi::CreateAndRegisterAllocator +}; + +/** \brief Custom Op Domain + * + */ +struct CustomOpDomain : detail::Base { + explicit CustomOpDomain(std::nullptr_t) {} ///< Create an empty CustomOpDomain object, must be assigned a valid one to be used + + /// \brief Wraps OrtApi::CreateCustomOpDomain + explicit CustomOpDomain(const char* domain); + + // This does not take ownership of the op, simply registers it. + void Add(const OrtCustomOp* op); ///< Wraps CustomOpDomain_Add +}; + +/** \brief RunOptions + * + */ +struct RunOptions : detail::Base { + explicit RunOptions(std::nullptr_t) {} ///< Create an empty RunOptions object, must be assigned a valid one to be used + RunOptions(); ///< Wraps OrtApi::CreateRunOptions + + RunOptions& SetRunLogVerbosityLevel(int); ///< Wraps OrtApi::RunOptionsSetRunLogVerbosityLevel + int GetRunLogVerbosityLevel() const; ///< Wraps OrtApi::RunOptionsGetRunLogVerbosityLevel + + RunOptions& SetRunLogSeverityLevel(int); ///< Wraps OrtApi::RunOptionsSetRunLogSeverityLevel + int GetRunLogSeverityLevel() const; ///< Wraps OrtApi::RunOptionsGetRunLogSeverityLevel + + RunOptions& SetRunTag(const char* run_tag); ///< wraps OrtApi::RunOptionsSetRunTag + const char* GetRunTag() const; ///< Wraps OrtApi::RunOptionsGetRunTag + + RunOptions& AddConfigEntry(const char* config_key, const char* config_value); ///< Wraps OrtApi::AddRunConfigEntry + + /** \brief Terminates all currently executing Session::Run calls that were made using this RunOptions instance + * + * If a currently executing session needs to be force terminated, this can be called from another thread to force it to fail with an error + * Wraps OrtApi::RunOptionsSetTerminate + */ + RunOptions& SetTerminate(); + + /** \brief Clears the terminate flag so this RunOptions instance can be used in a new Session::Run call without it instantly terminating + * + * Wraps OrtApi::RunOptionsUnsetTerminate + */ + RunOptions& UnsetTerminate(); +}; + + +namespace detail { +// Utility function that returns a SessionOption config entry key for a specific custom operator. +// Ex: custom_op.[custom_op_name].[config] +std::string MakeCustomOpConfigEntryKey(const char* custom_op_name, const char* config); +} // namespace detail + +/// +/// Class that represents session configuration entries for one or more custom operators. +/// +/// Example: +/// Ort::CustomOpConfigs op_configs; +/// op_configs.AddConfig("my_custom_op", "device_type", "CPU"); +/// +/// Passed to Ort::SessionOptions::RegisterCustomOpsLibrary. +/// +struct CustomOpConfigs { + CustomOpConfigs() = default; + ~CustomOpConfigs() = default; + CustomOpConfigs(const CustomOpConfigs&) = default; + CustomOpConfigs& operator=(const CustomOpConfigs&) = default; + CustomOpConfigs(CustomOpConfigs&& o) = default; + CustomOpConfigs& operator=(CustomOpConfigs&& o) = default; + + /** \brief Adds a session configuration entry/value for a specific custom operator. + * + * \param custom_op_name The name of the custom operator for which to add a configuration entry. + * Must match the name returned by the CustomOp's GetName() method. + * \param config_key The name of the configuration entry. + * \param config_value The value of the configuration entry. + * \return A reference to this object to enable call chaining. + */ + CustomOpConfigs& AddConfig(const char* custom_op_name, const char* config_key, const char* config_value); + + /** \brief Returns a flattened map of custom operator configuration entries and their values. + * + * The keys has been flattened to include both the custom operator name and the configuration entry key name. + * For example, a prior call to AddConfig("my_op", "key", "value") corresponds to the flattened key/value pair + * {"my_op.key", "value"}. + * + * \return An unordered map of flattened configurations. + */ + const std::unordered_map& GetFlattenedConfigs() const; + + private: + std::unordered_map flat_configs_; +}; + +/** \brief Options object used when creating a new Session object + * + * Wraps ::OrtSessionOptions object and methods + */ + +struct SessionOptions; + +namespace detail { +// we separate const-only methods because passing const ptr to non-const methods +// is only discovered when inline methods are compiled which is counter-intuitive +template +struct ConstSessionOptionsImpl : Base { + using B = Base; + using B::B; + + SessionOptions Clone() const; ///< Creates and returns a copy of this SessionOptions object. Wraps OrtApi::CloneSessionOptions + + std::string GetConfigEntry(const char* config_key) const; ///< Wraps OrtApi::GetSessionConfigEntry + bool HasConfigEntry(const char* config_key) const; ///< Wraps OrtApi::HasSessionConfigEntry + std::string GetConfigEntryOrDefault(const char* config_key, const std::string& def); +}; + +template +struct SessionOptionsImpl : ConstSessionOptionsImpl { + using B = ConstSessionOptionsImpl; + using B::B; + + SessionOptionsImpl& SetIntraOpNumThreads(int intra_op_num_threads); ///< Wraps OrtApi::SetIntraOpNumThreads + SessionOptionsImpl& SetInterOpNumThreads(int inter_op_num_threads); ///< Wraps OrtApi::SetInterOpNumThreads + SessionOptionsImpl& SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level); ///< Wraps OrtApi::SetSessionGraphOptimizationLevel + + SessionOptionsImpl& EnableCpuMemArena(); ///< Wraps OrtApi::EnableCpuMemArena + SessionOptionsImpl& DisableCpuMemArena(); ///< Wraps OrtApi::DisableCpuMemArena + + SessionOptionsImpl& SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_file); ///< Wraps OrtApi::SetOptimizedModelFilePath + + SessionOptionsImpl& EnableProfiling(const ORTCHAR_T* profile_file_prefix); ///< Wraps OrtApi::EnableProfiling + SessionOptionsImpl& DisableProfiling(); ///< Wraps OrtApi::DisableProfiling + + SessionOptionsImpl& EnableOrtCustomOps(); ///< Wraps OrtApi::EnableOrtCustomOps + + SessionOptionsImpl& EnableMemPattern(); ///< Wraps OrtApi::EnableMemPattern + SessionOptionsImpl& DisableMemPattern(); ///< Wraps OrtApi::DisableMemPattern + + SessionOptionsImpl& SetExecutionMode(ExecutionMode execution_mode); ///< Wraps OrtApi::SetSessionExecutionMode + + SessionOptionsImpl& SetLogId(const char* logid); ///< Wraps OrtApi::SetSessionLogId + SessionOptionsImpl& SetLogSeverityLevel(int level); ///< Wraps OrtApi::SetSessionLogSeverityLevel + + SessionOptionsImpl& Add(OrtCustomOpDomain* custom_op_domain); ///< Wraps OrtApi::AddCustomOpDomain + + SessionOptionsImpl& DisablePerSessionThreads(); ///< Wraps OrtApi::DisablePerSessionThreads + + SessionOptionsImpl& AddConfigEntry(const char* config_key, const char* config_value); ///< Wraps OrtApi::AddSessionConfigEntry + + SessionOptionsImpl& AddInitializer(const char* name, const OrtValue* ort_val); ///< Wraps OrtApi::AddInitializer + SessionOptionsImpl& AddExternalInitializers(const std::vector& names, const std::vector& ort_values); ///< Wraps OrtApi::AddExternalInitializers + + SessionOptionsImpl& AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA + SessionOptionsImpl& AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2 + SessionOptionsImpl& AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM + SessionOptionsImpl& AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO + SessionOptionsImpl& AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + SessionOptionsImpl& AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + SessionOptionsImpl& AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CANN + SessionOptionsImpl& AppendExecutionProvider_CANN(const OrtCANNProviderOptions& provider_options); + /// Wraps OrtApi::SessionOptionsAppendExecutionProvider. Currently supports SNPE and XNNPACK. + SessionOptionsImpl& AppendExecutionProvider(const std::string& provider_name, + const std::unordered_map& provider_options = {}); + + SessionOptionsImpl& SetCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn); ///< Wraps OrtApi::SessionOptionsSetCustomCreateThreadFn + SessionOptionsImpl& SetCustomThreadCreationOptions(void* ort_custom_thread_creation_options); ///< Wraps OrtApi::SessionOptionsSetCustomThreadCreationOptions + SessionOptionsImpl& SetCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn); ///< Wraps OrtApi::SessionOptionsSetCustomJoinThreadFn + + ///< Registers the custom operator from the specified shared library via OrtApi::RegisterCustomOpsLibrary_V2. + ///< The custom operator configurations are optional. If provided, custom operator configs are set via + ///< OrtApi::AddSessionConfigEntry. + SessionOptionsImpl& RegisterCustomOpsLibrary(const ORTCHAR_T* library_name, const CustomOpConfigs& custom_op_configs = {}); + + SessionOptionsImpl& RegisterCustomOpsUsingFunction(const char* function_name); ///< Wraps OrtApi::RegisterCustomOpsUsingFunction +}; +} // namespace detail + +using UnownedSessionOptions = detail::SessionOptionsImpl>; +using ConstSessionOptions = detail::ConstSessionOptionsImpl>; + +/** \brief Wrapper around ::OrtSessionOptions + * + */ +struct SessionOptions : detail::SessionOptionsImpl { + explicit SessionOptions(std::nullptr_t) {} ///< Create an empty SessionOptions object, must be assigned a valid one to be used + SessionOptions(); ///< Wraps OrtApi::CreateSessionOptions + explicit SessionOptions(OrtSessionOptions* p) : SessionOptionsImpl{p} {} ///< Used for interop with the C API + UnownedSessionOptions GetUnowned() const { return UnownedSessionOptions{this->p_}; } + ConstSessionOptions GetConst() const { return ConstSessionOptions{this->p_}; } +}; + +/** \brief Wrapper around ::OrtModelMetadata + * + */ +struct ModelMetadata : detail::Base { + explicit ModelMetadata(std::nullptr_t) {} ///< Create an empty ModelMetadata object, must be assigned a valid one to be used + explicit ModelMetadata(OrtModelMetadata* p) : Base{p} {} ///< Used for interop with the C API + + /** \brief Returns a copy of the producer name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetProducerNameAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetProducerName + + /** \brief Returns a copy of the graph name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetGraphNameAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetGraphName + + /** \brief Returns a copy of the domain name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetDomainAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetDomain + + /** \brief Returns a copy of the description. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetDescriptionAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetDescription + + /** \brief Returns a copy of the graph description. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetGraphDescriptionAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetGraphDescription + + /** \brief Returns a vector of copies of the custom metadata keys. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance std::vector of smart pointers that would deallocate the buffers when out of scope. + * The OrtAllocator instance must be valid at the point of memory release. + */ + std::vector GetCustomMetadataMapKeysAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetCustomMetadataMapKeys + + /** \brief Looks up a value by a key in the Custom Metadata map + * + * \param key zero terminated string key to lookup + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * maybe nullptr if key is not found. + * + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr LookupCustomMetadataMapAllocated(const char* key, OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataLookupCustomMetadataMap + + int64_t GetVersion() const; ///< Wraps OrtApi::ModelMetadataGetVersion +}; + +struct IoBinding; + +namespace detail { + +// we separate const-only methods because passing const ptr to non-const methods +// is only discovered when inline methods are compiled which is counter-intuitive +template +struct ConstSessionImpl : Base { + using B = Base; + using B::B; + + size_t GetInputCount() const; ///< Returns the number of model inputs + size_t GetOutputCount() const; ///< Returns the number of model outputs + size_t GetOverridableInitializerCount() const; ///< Returns the number of inputs that have defaults that can be overridden + + /** \brief Returns a copy of input name at the specified index. + * + * \param index must less than the value returned by GetInputCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetInputNameAllocated(size_t index, OrtAllocator* allocator) const; + + /** \brief Returns a copy of output name at then specified index. + * + * \param index must less than the value returned by GetOutputCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetOutputNameAllocated(size_t index, OrtAllocator* allocator) const; + + /** \brief Returns a copy of the overridable initializer name at then specified index. + * + * \param index must less than the value returned by GetOverridableInitializerCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetOverridableInitializerNameAllocated(size_t index, OrtAllocator* allocator) const; ///< Wraps OrtApi::SessionGetOverridableInitializerName + + uint64_t GetProfilingStartTimeNs() const; ///< Wraps OrtApi::SessionGetProfilingStartTimeNs + ModelMetadata GetModelMetadata() const; ///< Wraps OrtApi::SessionGetModelMetadata + + TypeInfo GetInputTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetInputTypeInfo + TypeInfo GetOutputTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetOutputTypeInfo + TypeInfo GetOverridableInitializerTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetOverridableInitializerTypeInfo +}; + +template +struct SessionImpl : ConstSessionImpl { + using B = ConstSessionImpl; + using B::B; + + /** \brief Run the model returning results in an Ort allocated vector. + * + * Wraps OrtApi::Run + * + * The caller provides a list of inputs and a list of the desired outputs to return. + * + * See the output logs for more information on warnings/errors that occur while processing the model. + * Common errors are.. (TODO) + * + * \param[in] run_options + * \param[in] input_names Array of null terminated strings of length input_count that is the list of input names + * \param[in] input_values Array of Value objects of length input_count that is the list of input values + * \param[in] input_count Number of inputs (the size of the input_names & input_values arrays) + * \param[in] output_names Array of C style strings of length output_count that is the list of output names + * \param[in] output_count Number of outputs (the size of the output_names array) + * \return A std::vector of Value objects that directly maps to the output_names array (eg. output_name[0] is the first entry of the returned vector) + */ + std::vector Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, size_t output_count); + + /** \brief Run the model returning results in user provided outputs + * Same as Run(const RunOptions&, const char* const*, const Value*, size_t,const char* const*, size_t) + */ + void Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count); + + void Run(const RunOptions& run_options, const IoBinding&); ///< Wraps OrtApi::RunWithBinding + + /** \brief End profiling and return a copy of the profiling file name. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr EndProfilingAllocated(OrtAllocator* allocator); ///< Wraps OrtApi::SessionEndProfiling +}; + +} // namespace detail + +using ConstSession = detail::ConstSessionImpl>; +using UnownedSession = detail::SessionImpl>; + +/** \brief Wrapper around ::OrtSession + * + */ +struct Session : detail::SessionImpl { + explicit Session(std::nullptr_t) {} ///< Create an empty Session object, must be assigned a valid one to be used + Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options); ///< Wraps OrtApi::CreateSession + Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container); ///< Wraps OrtApi::CreateSessionWithPrepackedWeightsContainer + Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options); ///< Wraps OrtApi::CreateSessionFromArray + Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container); ///< Wraps OrtApi::CreateSessionFromArrayWithPrepackedWeightsContainer + + ConstSession GetConst() const { return ConstSession{this->p_}; } + UnownedSession GetUnowned() const { return UnownedSession{this->p_}; } +}; + +namespace detail { +template +struct MemoryInfoImpl : Base { + using B = Base; + using B::B; + + std::string GetAllocatorName() const; + OrtAllocatorType GetAllocatorType() const; + int GetDeviceId() const; + OrtMemoryInfoDeviceType GetDeviceType() const; + OrtMemType GetMemoryType() const; + + template + bool operator==(const MemoryInfoImpl& o) const; +}; +} // namespace detail + +// Const object holder that does not own the underlying object +using ConstMemoryInfo = detail::MemoryInfoImpl>; + +/** \brief Wrapper around ::OrtMemoryInfo + * + */ +struct MemoryInfo : detail::MemoryInfoImpl { + static MemoryInfo CreateCpu(OrtAllocatorType type, OrtMemType mem_type1); + explicit MemoryInfo(std::nullptr_t) {} ///< No instance is created + explicit MemoryInfo(OrtMemoryInfo* p) : MemoryInfoImpl{p} {} ///< Take ownership of a pointer created by C Api + MemoryInfo(const char* name, OrtAllocatorType type, int id, OrtMemType mem_type); + ConstMemoryInfo GetConst() const { return ConstMemoryInfo{this->p_}; } +}; + +namespace detail { +template +struct TensorTypeAndShapeInfoImpl : Base { + using B = Base; + using B::B; + + ONNXTensorElementDataType GetElementType() const; ///< Wraps OrtApi::GetTensorElementType + size_t GetElementCount() const; ///< Wraps OrtApi::GetTensorShapeElementCount + + size_t GetDimensionsCount() const; ///< Wraps OrtApi::GetDimensionsCount + + /** \deprecated use GetShape() returning std::vector + * [[deprecated]] + * This interface is unsafe to use + */ + [[deprecated("use GetShape()")]] void GetDimensions(int64_t* values, size_t values_count) const; ///< Wraps OrtApi::GetDimensions + + void GetSymbolicDimensions(const char** values, size_t values_count) const; ///< Wraps OrtApi::GetSymbolicDimensions + + std::vector GetShape() const; ///< Uses GetDimensionsCount & GetDimensions to return a std::vector of the shape +}; + +} // namespace detail + +using ConstTensorTypeAndShapeInfo = detail::TensorTypeAndShapeInfoImpl>; + +/** \brief Wrapper around ::OrtTensorTypeAndShapeInfo + * + */ +struct TensorTypeAndShapeInfo : detail::TensorTypeAndShapeInfoImpl { + explicit TensorTypeAndShapeInfo(std::nullptr_t) {} ///< Create an empty TensorTypeAndShapeInfo object, must be assigned a valid one to be used + explicit TensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* p) : TensorTypeAndShapeInfoImpl{p} {} ///< Used for interop with the C API + ConstTensorTypeAndShapeInfo GetConst() const { return ConstTensorTypeAndShapeInfo{this->p_}; } +}; + +namespace detail { +template +struct SequenceTypeInfoImpl : Base { + using B = Base; + using B::B; + TypeInfo GetSequenceElementType() const; ///< Wraps OrtApi::GetSequenceElementType +}; + +} // namespace detail + +using ConstSequenceTypeInfo = detail::SequenceTypeInfoImpl>; + +/** \brief Wrapper around ::OrtSequenceTypeInfo + * + */ +struct SequenceTypeInfo : detail::SequenceTypeInfoImpl { + explicit SequenceTypeInfo(std::nullptr_t) {} ///< Create an empty SequenceTypeInfo object, must be assigned a valid one to be used + explicit SequenceTypeInfo(OrtSequenceTypeInfo* p) : SequenceTypeInfoImpl{p} {} ///< Used for interop with the C API + ConstSequenceTypeInfo GetConst() const { return ConstSequenceTypeInfo{this->p_}; } +}; + +namespace detail { +template +struct MapTypeInfoImpl : detail::Base { + using B = Base; + using B::B; + ONNXTensorElementDataType GetMapKeyType() const; ///< Wraps OrtApi::GetMapKeyType + TypeInfo GetMapValueType() const; ///< Wraps OrtApi::GetMapValueType +}; + +} // namespace detail + +using ConstMapTypeInfo = detail::MapTypeInfoImpl>; + +/** \brief Wrapper around ::OrtMapTypeInfo + * + */ +struct MapTypeInfo : detail::MapTypeInfoImpl { + explicit MapTypeInfo(std::nullptr_t) {} ///< Create an empty MapTypeInfo object, must be assigned a valid one to be used + explicit MapTypeInfo(OrtMapTypeInfo* p) : MapTypeInfoImpl{p} {} ///< Used for interop with the C API + ConstMapTypeInfo GetConst() const { return ConstMapTypeInfo{this->p_}; } +}; + +namespace detail { +template +struct TypeInfoImpl : detail::Base { + using B = Base; + using B::B; + + ConstTensorTypeAndShapeInfo GetTensorTypeAndShapeInfo() const; ///< Wraps OrtApi::CastTypeInfoToTensorInfo + ConstSequenceTypeInfo GetSequenceTypeInfo() const; ///< Wraps OrtApi::CastTypeInfoToSequenceTypeInfo + ConstMapTypeInfo GetMapTypeInfo() const; ///< Wraps OrtApi::CastTypeInfoToMapTypeInfo + + ONNXType GetONNXType() const; +}; +} // namespace detail + +/// +/// Contains a constant, unowned OrtTypeInfo that can be copied and passed around by value. +/// Provides access to const OrtTypeInfo APIs. +/// +using ConstTypeInfo = detail::TypeInfoImpl>; + +/// +/// Type information that may contain either TensorTypeAndShapeInfo or +/// the information about contained sequence or map depending on the ONNXType. +/// +struct TypeInfo : detail::TypeInfoImpl { + explicit TypeInfo(std::nullptr_t) {} ///< Create an empty TypeInfo object, must be assigned a valid one to be used + explicit TypeInfo(OrtTypeInfo* p) : TypeInfoImpl{p} {} ///< C API Interop + + ConstTypeInfo GetConst() const { return ConstTypeInfo{this->p_}; } +}; + +namespace detail { +// This structure is used to feed sparse tensor values +// information for use with FillSparseTensor() API +// if the data type for the sparse tensor values is numeric +// use data.p_data, otherwise, use data.str pointer to feed +// values. data.str is an array of const char* that are zero terminated. +// number of strings in the array must match shape size. +// For fully sparse tensors use shape {0} and set p_data/str +// to nullptr. +struct OrtSparseValuesParam { + const int64_t* values_shape; + size_t values_shape_len; + union { + const void* p_data; + const char** str; + } data; +}; + +// Provides a way to pass shape in a single +// argument +struct Shape { + const int64_t* shape; + size_t shape_len; +}; + +template +struct ConstValueImpl : Base { + using B = Base; + using B::B; + + /// + /// Obtains a pointer to a user defined data for experimental purposes + /// + template + void GetOpaqueData(const char* domain, const char* type_name, R&) const; ///< Wraps OrtApi::GetOpaqueValue + + bool IsTensor() const; ///< Returns true if Value is a tensor, false for other types like map/sequence/etc + bool HasValue() const; /// < Return true if OrtValue contains data and returns false if the OrtValue is a None + + size_t GetCount() const; // If a non tensor, returns 2 for map and N for sequence, where N is the number of elements + Value GetValue(int index, OrtAllocator* allocator) const; + + /// + /// This API returns a full length of string data contained within either a tensor or a sparse Tensor. + /// For sparse tensor it returns a full length of stored non-empty strings (values). The API is useful + /// for allocating necessary memory and calling GetStringTensorContent(). + /// + /// total length of UTF-8 encoded bytes contained. No zero terminators counted. + size_t GetStringTensorDataLength() const; + + /// + /// The API copies all of the UTF-8 encoded string data contained within a tensor or a sparse tensor + /// into a supplied buffer. Use GetStringTensorDataLength() to find out the length of the buffer to allocate. + /// The user must also allocate offsets buffer with the number of entries equal to that of the contained + /// strings. + /// + /// Strings are always assumed to be on CPU, no X-device copy. + /// + /// user allocated buffer + /// length in bytes of the allocated buffer + /// a pointer to the offsets user allocated buffer + /// count of offsets, must be equal to the number of strings contained. + /// that can be obtained from the shape of the tensor or from GetSparseTensorValuesTypeAndShapeInfo() + /// for sparse tensors + void GetStringTensorContent(void* buffer, size_t buffer_length, size_t* offsets, size_t offsets_count) const; + + /// + /// Returns a const typed pointer to the tensor contained data. + /// No type checking is performed, the caller must ensure the type matches the tensor type. + /// + /// + /// const pointer to data, no copies made + template + const R* GetTensorData() const; ///< Wraps OrtApi::GetTensorMutableData /// + + /// + /// Returns a non-typed pointer to a tensor contained data. + /// + /// const pointer to data, no copies made + const void* GetTensorRawData() const; + + /// + /// The API returns type information for data contained in a tensor. For sparse + /// tensors it returns type information for contained non-zero values. + /// It returns dense shape for sparse tensors. + /// + /// TypeInfo + TypeInfo GetTypeInfo() const; + + /// + /// The API returns type information for data contained in a tensor. For sparse + /// tensors it returns type information for contained non-zero values. + /// It returns dense shape for sparse tensors. + /// + /// TensorTypeAndShapeInfo + TensorTypeAndShapeInfo GetTensorTypeAndShapeInfo() const; + + /// + /// This API returns information about the memory allocation used to hold data. + /// + /// Non owning instance of MemoryInfo + ConstMemoryInfo GetTensorMemoryInfo() const; + + /// + /// The API copies UTF-8 encoded bytes for the requested string element + /// contained within a tensor or a sparse tensor into a provided buffer. + /// Use GetStringTensorElementLength() to obtain the length of the buffer to allocate. + /// + /// + /// + /// + void GetStringTensorElement(size_t buffer_length, size_t element_index, void* buffer) const; + + /// + /// The API returns a byte length of UTF-8 encoded string element + /// contained in either a tensor or a spare tensor values. + /// + /// + /// byte length for the specified string element + size_t GetStringTensorElementLength(size_t element_index) const; + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// The API returns the sparse data format this OrtValue holds in a sparse tensor. + /// If the sparse tensor was not fully constructed, i.e. Use*() or Fill*() API were not used + /// the value returned is ORT_SPARSE_UNDEFINED. + /// + /// Format enum + OrtSparseFormat GetSparseFormat() const; + + /// + /// The API returns type and shape information for stored non-zero values of the + /// sparse tensor. Use GetSparseTensorValues() to obtain values buffer pointer. + /// + /// TensorTypeAndShapeInfo values information + TensorTypeAndShapeInfo GetSparseTensorValuesTypeAndShapeInfo() const; + + /// + /// The API returns type and shape information for the specified indices. Each supported + /// indices have their own enum values even if a give format has more than one kind of indices. + /// Use GetSparseTensorIndicesData() to obtain pointer to indices buffer. + /// + /// enum requested + /// type and shape information + TensorTypeAndShapeInfo GetSparseTensorIndicesTypeShapeInfo(OrtSparseIndicesFormat format) const; + + /// + /// The API retrieves a pointer to the internal indices buffer. The API merely performs + /// a convenience data type casting on the return type pointer. Make sure you are requesting + /// the right type, use GetSparseTensorIndicesTypeShapeInfo(); + /// + /// type to cast to + /// requested indices kind + /// number of indices entries + /// Pinter to the internal sparse tensor buffer containing indices. Do not free this pointer. + template + const R* GetSparseTensorIndicesData(OrtSparseIndicesFormat indices_format, size_t& num_indices) const; + + /// + /// Returns true if the OrtValue contains a sparse tensor + /// + /// + bool IsSparseTensor() const; + + /// + /// The API returns a pointer to an internal buffer of the sparse tensor + /// containing non-zero values. The API merely does casting. Make sure you + /// are requesting the right data type by calling GetSparseTensorValuesTypeAndShapeInfo() + /// first. + /// + /// numeric data types only. Use GetStringTensor*() to retrieve strings. + /// a pointer to the internal values buffer. Do not free this pointer. + template + const R* GetSparseTensorValues() const; + +#endif +}; + +template +struct ValueImpl : ConstValueImpl { + using B = ConstValueImpl; + using B::B; + + /// + /// Returns a non-const typed pointer to an OrtValue/Tensor contained buffer + /// No type checking is performed, the caller must ensure the type matches the tensor type. + /// + /// non-const pointer to data, no copies made + template + R* GetTensorMutableData(); + + /// + /// Returns a non-typed non-const pointer to a tensor contained data. + /// + /// pointer to data, no copies made + void* GetTensorMutableRawData(); + + /// + // Obtain a reference to an element of data at the location specified + /// by the vector of dims. + /// + /// + /// [in] expressed by a vecotr of dimensions offsets + /// + template + R& At(const std::vector& location); + + /// + /// Set all strings at once in a string tensor + /// + /// [in] An array of strings. Each string in this array must be null terminated. + /// [in] Count of strings in s (Must match the size of \p value's tensor shape) + void FillStringTensor(const char* const* s, size_t s_len); + + /// + /// Set a single string in a string tensor + /// + /// [in] A null terminated UTF-8 encoded string + /// [in] Index of the string in the tensor to set + void FillStringTensorElement(const char* s, size_t index); + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// Supplies COO format specific indices and marks the contained sparse tensor as being a COO format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// pointer to the user allocated buffer with indices. Use nullptr for fully sparse tensors. + /// number of indices entries. Use 0 for fully sparse tensors + void UseCooIndices(int64_t* indices_data, size_t indices_num); + + /// + /// Supplies CSR format specific indices and marks the contained sparse tensor as being a CSR format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// pointer to the user allocated buffer with inner indices or nullptr for fully sparse tensors + /// number of csr inner indices or 0 for fully sparse tensors + /// pointer to the user allocated buffer with outer indices or nullptr for fully sparse tensors + /// number of csr outer indices or 0 for fully sparse tensors + void UseCsrIndices(int64_t* inner_data, size_t inner_num, int64_t* outer_data, size_t outer_num); + + /// + /// Supplies BlockSparse format specific indices and marks the contained sparse tensor as being a BlockSparse format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// indices shape or a {0} for fully sparse + /// user allocated buffer with indices or nullptr for fully spare tensors + void UseBlockSparseIndices(const Shape& indices_shape, int32_t* indices_data); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and COO indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information. + /// coo indices buffer or nullptr for fully sparse data + /// number of COO indices or 0 for fully sparse data + void FillSparseTensorCoo(const OrtMemoryInfo* data_mem_info, const OrtSparseValuesParam& values_param, + const int64_t* indices_data, size_t indices_num); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and CSR indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information + /// csr inner indices pointer or nullptr for fully sparse tensors + /// number of csr inner indices or 0 for fully sparse tensors + /// pointer to csr indices data or nullptr for fully sparse tensors + /// number of csr outer indices or 0 + void FillSparseTensorCsr(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const int64_t* inner_indices_data, size_t inner_indices_num, + const int64_t* outer_indices_data, size_t outer_indices_num); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and BlockSparse indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information + /// indices shape. use {0} for fully sparse tensors + /// pointer to indices data or nullptr for fully sparse tensors + void FillSparseTensorBlockSparse(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const Shape& indices_shape, + const int32_t* indices_data); + +#endif +}; + +} // namespace detail + +using ConstValue = detail::ConstValueImpl>; +using UnownedValue = detail::ValueImpl>; + +/** \brief Wrapper around ::OrtValue + * + */ +struct Value : detail::ValueImpl { + using Base = detail::ValueImpl; + using OrtSparseValuesParam = detail::OrtSparseValuesParam; + using Shape = detail::Shape; + + explicit Value(std::nullptr_t) {} ///< Create an empty Value object, must be assigned a valid one to be used + explicit Value(OrtValue* p) : Base{p} {} ///< Used for interop with the C API + Value(Value&&) = default; + Value& operator=(Value&&) = default; + + ConstValue GetConst() const { return ConstValue{this->p_}; } + UnownedValue GetUnowned() const { return UnownedValue{this->p_}; } + + /** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue. + * \tparam T The numeric datatype. This API is not suitable for strings. + * \param info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param p_data Pointer to the data buffer. + * \param p_data_element_count The number of elements in the data buffer. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + */ + template + static Value CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len); + + /** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue. + * \param info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param p_data Pointer to the data buffer. + * \param p_data_byte_count The number of bytes in the data buffer. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + * \param type The data type. + */ + static Value CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type); + + /** \brief Creates a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue. + * \tparam T The numeric datatype. This API is not suitable for strings. + * \param allocator The allocator to use. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + */ + template + static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len); + + /** \brief Creates a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue. + * \param allocator The allocator to use. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + * \param type The data type. + */ + static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type); + + static Value CreateMap(Value& keys, Value& values); ///< Wraps OrtApi::CreateValue + static Value CreateSequence(std::vector& values); ///< Wraps OrtApi::CreateValue + + template + static Value CreateOpaque(const char* domain, const char* type_name, const T&); ///< Wraps OrtApi::CreateOpaqueValue + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// This is a simple forwarding method to the other overload that helps deducing + /// data type enum value from the type of the buffer. + /// + /// numeric datatype. This API is not suitable for strings. + /// Memory description where the user buffers reside (CPU vs GPU etc) + /// pointer to the user supplied buffer, use nullptr for fully sparse tensors + /// a would be dense shape of the tensor + /// non zero values shape. Use a single 0 shape for fully sparse tensors. + /// + template + static Value CreateSparseTensor(const OrtMemoryInfo* info, T* p_data, const Shape& dense_shape, + const Shape& values_shape); + + /// + /// Creates an OrtValue instance containing SparseTensor. This constructs + /// a sparse tensor that makes use of user allocated buffers. It does not make copies + /// of the user provided data and does not modify it. The lifespan of user provided buffers should + /// eclipse the life span of the resulting OrtValue. This call constructs an instance that only contain + /// a pointer to non-zero values. To fully populate the sparse tensor call UseIndices() API below + /// to supply a sparse format specific indices. + /// This API is not suitable for string data. Use CreateSparseTensor() with allocator specified so strings + /// can be properly copied into the allocated buffer. + /// + /// Memory description where the user buffers reside (CPU vs GPU etc) + /// pointer to the user supplied buffer, use nullptr for fully sparse tensors + /// a would be dense shape of the tensor + /// non zero values shape. Use a single 0 shape for fully sparse tensors. + /// data type + /// Ort::Value instance containing SparseTensor + static Value CreateSparseTensor(const OrtMemoryInfo* info, void* p_data, const Shape& dense_shape, + const Shape& values_shape, ONNXTensorElementDataType type); + + /// + /// This is a simple forwarding method to the below CreateSparseTensor. + /// This helps to specify data type enum in terms of C++ data type. + /// Use CreateSparseTensor + /// + /// numeric data type only. String data enum must be specified explicitly. + /// allocator to use + /// a would be dense shape of the tensor + /// Ort::Value + template + static Value CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape); + + /// + /// Creates an instance of OrtValue containing sparse tensor. The created instance has no data. + /// The data must be supplied by on of the FillSparseTensor() methods that take both non-zero values + /// and indices. The data will be copied into a buffer that would be allocated using the supplied allocator. + /// Use this API to create OrtValues that contain sparse tensors with all supported data types including + /// strings. + /// + /// allocator to use. The allocator lifespan must eclipse that of the resulting OrtValue + /// a would be dense shape of the tensor + /// data type + /// an instance of Ort::Value + static Value CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape, ONNXTensorElementDataType type); + +#endif // !defined(DISABLE_SPARSE_TENSORS) +}; + +/// +/// Represents native memory allocation coming from one of the +/// OrtAllocators registered with OnnxRuntime. +/// Use it to wrap an allocation made by an allocator +/// so it can be automatically released when no longer needed. +/// +struct MemoryAllocation { + MemoryAllocation(OrtAllocator* allocator, void* p, size_t size); + ~MemoryAllocation(); + MemoryAllocation(const MemoryAllocation&) = delete; + MemoryAllocation& operator=(const MemoryAllocation&) = delete; + MemoryAllocation(MemoryAllocation&&) noexcept; + MemoryAllocation& operator=(MemoryAllocation&&) noexcept; + + void* get() { return p_; } + size_t size() const { return size_; } + + private: + OrtAllocator* allocator_; + void* p_; + size_t size_; +}; + +namespace detail { +template +struct AllocatorImpl : Base { + using B = Base; + using B::B; + + void* Alloc(size_t size); + MemoryAllocation GetAllocation(size_t size); + void Free(void* p); + ConstMemoryInfo GetInfo() const; +}; + +} // namespace detail + +/** \brief Wrapper around ::OrtAllocator default instance that is owned by Onnxruntime + * + */ +struct AllocatorWithDefaultOptions : detail::AllocatorImpl> { + explicit AllocatorWithDefaultOptions(std::nullptr_t) {} ///< Convenience to create a class member and then replace with an instance + AllocatorWithDefaultOptions(); +}; + +/** \brief Wrapper around ::OrtAllocator + * + */ +struct Allocator : detail::AllocatorImpl { + explicit Allocator(std::nullptr_t) {} ///< Convenience to create a class member and then replace with an instance + Allocator(const Session& session, const OrtMemoryInfo*); +}; + +using UnownedAllocator = detail::AllocatorImpl>; + +namespace detail { +namespace binding_utils { +// Bring these out of template +std::vector GetOutputNamesHelper(const OrtIoBinding* binding, OrtAllocator*); +std::vector GetOutputValuesHelper(const OrtIoBinding* binding, OrtAllocator*); +} // namespace binding_utils + +template +struct ConstIoBindingImpl : Base { + using B = Base; + using B::B; + + std::vector GetOutputNames() const; + std::vector GetOutputNames(OrtAllocator*) const; + std::vector GetOutputValues() const; + std::vector GetOutputValues(OrtAllocator*) const; +}; + +template +struct IoBindingImpl : ConstIoBindingImpl { + using B = ConstIoBindingImpl; + using B::B; + + void BindInput(const char* name, const Value&); + void BindOutput(const char* name, const Value&); + void BindOutput(const char* name, const OrtMemoryInfo*); + void ClearBoundInputs(); + void ClearBoundOutputs(); + void SynchronizeInputs(); + void SynchronizeOutputs(); +}; + +} // namespace detail + +using ConstIoBinding = detail::ConstIoBindingImpl>; +using UnownedIoBinding = detail::IoBindingImpl>; + +/** \brief Wrapper around ::OrtIoBinding + * + */ +struct IoBinding : detail::IoBindingImpl { + explicit IoBinding(std::nullptr_t) {} ///< Create an empty object for convenience. Sometimes, we want to initialize members later. + explicit IoBinding(Session& session); + ConstIoBinding GetConst() const { return ConstIoBinding{this->p_}; } + UnownedIoBinding GetUnowned() const { return UnownedIoBinding{this->p_}; } +}; + +/*! \struct Ort::ArenaCfg + * \brief it is a structure that represents the configuration of an arena based allocator + * \details Please see docs/C_API.md for details + */ +struct ArenaCfg : detail::Base { + explicit ArenaCfg(std::nullptr_t) {} ///< Create an empty ArenaCfg object, must be assigned a valid one to be used + /** + * Wraps OrtApi::CreateArenaCfg + * \param max_mem - use 0 to allow ORT to choose the default + * \param arena_extend_strategy - use -1 to allow ORT to choose the default, 0 = kNextPowerOfTwo, 1 = kSameAsRequested + * \param initial_chunk_size_bytes - use -1 to allow ORT to choose the default + * \param max_dead_bytes_per_chunk - use -1 to allow ORT to choose the default + * See docs/C_API.md for details on what the following parameters mean and how to choose these values + */ + ArenaCfg(size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk); +}; + +// +// Custom OPs (only needed to implement custom OPs) +// + +/// +/// This struct provides life time management for custom op attribute +/// +struct OpAttr : detail::Base { + OpAttr(const char* name, const void* data, int len, OrtOpAttrType type); +}; + +/// +/// This class wraps a raw pointer OrtKernelContext* that is being passed +/// to the custom kernel Compute() method. Use it to safely access context +/// attributes, input and output parameters with exception safety guarantees. +/// See usage example in onnxruntime/test/testdata/custom_op_library/custom_op_library.cc +/// +struct KernelContext { + explicit KernelContext(OrtKernelContext* context); + size_t GetInputCount() const; + size_t GetOutputCount() const; + ConstValue GetInput(size_t index) const; + UnownedValue GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const; + UnownedValue GetOutput(size_t index, const std::vector& dims) const; + void* GetGPUComputeStream() const; + + private: + OrtKernelContext* ctx_; +}; + +struct KernelInfo; + +namespace detail { +namespace attr_utils { +void GetAttr(const OrtKernelInfo* p, const char* name, float&); +void GetAttr(const OrtKernelInfo* p, const char* name, int64_t&); +void GetAttr(const OrtKernelInfo* p, const char* name, std::string&); +void GetAttrs(const OrtKernelInfo* p, const char* name, std::vector&); +void GetAttrs(const OrtKernelInfo* p, const char* name, std::vector&); +} // namespace attr_utils + +template +struct KernelInfoImpl : Base { + using B = Base; + using B::B; + + KernelInfo Copy() const; + + template // R is only implemented for float, int64_t, and string + R GetAttribute(const char* name) const { + R val; + attr_utils::GetAttr(this->p_, name, val); + return val; + } + + template // R is only implemented for std::vector, std::vector + std::vector GetAttributes(const char* name) const { + std::vector result; + attr_utils::GetAttrs(this->p_, name, result); + return result; + } + + Value GetTensorAttribute(const char* name, OrtAllocator* allocator) const; + + size_t GetInputCount() const; + size_t GetOutputCount() const; + + std::string GetInputName(size_t index) const; + std::string GetOutputName(size_t index) const; + + TypeInfo GetInputTypeInfo(size_t index) const; + TypeInfo GetOutputTypeInfo(size_t index) const; +}; + +} // namespace detail + +using ConstKernelInfo = detail::KernelInfoImpl>; + +/// +/// This struct owns the OrtKernInfo* pointer when a copy is made. +/// For convenient wrapping of OrtKernelInfo* passed to kernel constructor +/// and query attributes, warp the pointer with Ort::Unowned instance +/// so it does not destroy the pointer the kernel does not own. +/// +struct KernelInfo : detail::KernelInfoImpl { + explicit KernelInfo(std::nullptr_t) {} ///< Create an empty instance to initialize later + explicit KernelInfo(OrtKernelInfo* info); ///< Take ownership of the instance + ConstKernelInfo GetConst() const { return ConstKernelInfo{this->p_}; } +}; + +/// +/// Create and own custom defined operation. +/// +struct Op : detail::Base { + explicit Op(std::nullptr_t) {} ///< Create an empty Operator object, must be assigned a valid one to be used + + explicit Op(OrtOp*); ///< Take ownership of the OrtOp + + static Op Create(const OrtKernelInfo* info, const char* op_name, const char* domain, + int version, const char** type_constraint_names, + const ONNXTensorElementDataType* type_constraint_values, + size_t type_constraint_count, + const OpAttr* attr_values, + size_t attr_count, + size_t input_count, size_t output_count); + + void Invoke(const OrtKernelContext* context, + const Value* input_values, + size_t input_count, + Value* output_values, + size_t output_count); + + // For easier refactoring + void Invoke(const OrtKernelContext* context, + const OrtValue* const* input_values, + size_t input_count, + OrtValue* const* output_values, + size_t output_count); +}; + +/// +/// This entire structure is deprecated, but we not marking +/// it as a whole yet since we want to preserve for the next release. +/// +struct CustomOpApi { + CustomOpApi(const OrtApi& api) : api_(api) {} + + /** \deprecated use Ort::Value::GetTensorTypeAndShape() + * [[deprecated]] + * This interface produces a pointer that must be released. Not exception safe. + */ + [[deprecated("use Ort::Value::GetTensorTypeAndShape()")]] OrtTensorTypeAndShapeInfo* GetTensorTypeAndShape(_In_ const OrtValue* value); + + /** \deprecated use Ort::TensorTypeAndShapeInfo::GetElementCount() + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::TensorTypeAndShapeInfo::GetElementCount()")]] size_t GetTensorShapeElementCount(_In_ const OrtTensorTypeAndShapeInfo* info); + + /** \deprecated use Ort::TensorTypeAndShapeInfo::GetElementType() + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::TensorTypeAndShapeInfo::GetElementType()")]] ONNXTensorElementDataType GetTensorElementType(const OrtTensorTypeAndShapeInfo* info); + + /** \deprecated use Ort::TensorTypeAndShapeInfo::GetDimensionsCount() + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::TensorTypeAndShapeInfo::GetDimensionsCount()")]] size_t GetDimensionsCount(_In_ const OrtTensorTypeAndShapeInfo* info); + + /** \deprecated use Ort::TensorTypeAndShapeInfo::GetShape() + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::TensorTypeAndShapeInfo::GetShape()")]] void GetDimensions(_In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, size_t dim_values_length); + + /** \deprecated + * [[deprecated]] + * This interface sets dimensions to TensorTypeAndShapeInfo, but has no effect on the OrtValue. + */ + [[deprecated("Do not use")]] void SetDimensions(OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count); + + /** \deprecated use Ort::Value::GetTensorMutableData() + * [[deprecated]] + * This interface is redundant. + */ + template + [[deprecated("use Ort::Value::GetTensorMutableData()")]] T* GetTensorMutableData(_Inout_ OrtValue* value); + + /** \deprecated use Ort::Value::GetTensorData() + * [[deprecated]] + * This interface is redundant. + */ + template + [[deprecated("use Ort::Value::GetTensorData()")]] const T* GetTensorData(_Inout_ const OrtValue* value); + + /** \deprecated use Ort::Value::GetTensorMemoryInfo() + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::Value::GetTensorMemoryInfo()")]] const OrtMemoryInfo* GetTensorMemoryInfo(_In_ const OrtValue* value); + + /** \deprecated use Ort::TensorTypeAndShapeInfo::GetShape() + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::TensorTypeAndShapeInfo::GetShape()")]] std::vector GetTensorShape(const OrtTensorTypeAndShapeInfo* info); + + /** \deprecated use TensorTypeAndShapeInfo instances for automatic ownership. + * [[deprecated]] + * This interface is not exception safe. + */ + [[deprecated("use TensorTypeAndShapeInfo")]] void ReleaseTensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* input); + + /** \deprecated use Ort::KernelContext::GetInputCount + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::KernelContext::GetInputCount")]] size_t KernelContext_GetInputCount(const OrtKernelContext* context); + + /** \deprecated use Ort::KernelContext::GetInput + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::KernelContext::GetInput")]] const OrtValue* KernelContext_GetInput(const OrtKernelContext* context, _In_ size_t index); + + /** \deprecated use Ort::KernelContext::GetOutputCount + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::KernelContext::GetOutputCount")]] size_t KernelContext_GetOutputCount(const OrtKernelContext* context); + + /** \deprecated use Ort::KernelContext::GetOutput + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::KernelContext::GetOutput")]] OrtValue* KernelContext_GetOutput(OrtKernelContext* context, _In_ size_t index, _In_ const int64_t* dim_values, size_t dim_count); + + /** \deprecated use Ort::KernelContext::GetGPUComputeStream + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::KernelContext::GetGPUComputeStream")]] void* KernelContext_GetGPUComputeStream(const OrtKernelContext* context); + + /** \deprecated use Ort::ThrowOnError() + * [[deprecated]] + * This interface is redundant. + */ + [[deprecated("use Ort::ThrowOnError()")]] void ThrowOnError(OrtStatus* result); + + /** \deprecated use Ort::OpAttr + * [[deprecated]] + * This interface is not exception safe. + */ + [[deprecated("use Ort::OpAttr")]] OrtOpAttr* CreateOpAttr(_In_ const char* name, + _In_ const void* data, + _In_ int len, + _In_ OrtOpAttrType type); + + /** \deprecated use Ort::OpAttr + * [[deprecated]] + * This interface is not exception safe. + */ + [[deprecated("use Ort::OpAttr")]] void ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr); + + /** \deprecated use Ort::Op + * [[deprecated]] + * This interface is not exception safe. + */ + [[deprecated("use Ort::Op")]] OrtOp* CreateOp(_In_ const OrtKernelInfo* info, + _In_ const char* op_name, + _In_ const char* domain, + _In_ int version, + _In_opt_ const char** type_constraint_names, + _In_opt_ const ONNXTensorElementDataType* type_constraint_values, + _In_opt_ int type_constraint_count, + _In_opt_ const OrtOpAttr* const* attr_values, + _In_opt_ int attr_count, + _In_ int input_count, + _In_ int output_count); + + /** \deprecated use Ort::Op::Invoke + * [[deprecated]] + * This interface is redundant + */ + [[deprecated("use Ort::Op::Invoke")]] void InvokeOp(_In_ const OrtKernelContext* context, + _In_ const OrtOp* ort_op, + _In_ const OrtValue* const* input_values, + _In_ int input_count, + _Inout_ OrtValue* const* output_values, + _In_ int output_count); + + /** \deprecated use Ort::Op for automatic lifespan management. + * [[deprecated]] + * This interface is not exception safe. + */ + [[deprecated("use Ort::Op")]] void ReleaseOp(_Frees_ptr_opt_ OrtOp* ort_op); + + /** \deprecated use Ort::KernelInfo for automatic lifespan management or for + * querying attributes + * [[deprecated]] + * This interface is redundant + */ + template // T is only implemented for std::vector, std::vector, float, int64_t, and string + [[deprecated("use Ort::KernelInfo::GetAttribute")]] T KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name); + + /** \deprecated use Ort::KernelInfo::Copy + * querying attributes + * [[deprecated]] + * This interface is not exception safe + */ + [[deprecated("use Ort::KernelInfo::Copy")]] OrtKernelInfo* CopyKernelInfo(_In_ const OrtKernelInfo* info); + + /** \deprecated use Ort::KernelInfo for lifespan management + * querying attributes + * [[deprecated]] + * This interface is not exception safe + */ + [[deprecated("use Ort::KernelInfo")]] void ReleaseKernelInfo(_Frees_ptr_opt_ OrtKernelInfo* info_copy); + + private: + const OrtApi& api_; +}; + +template +struct CustomOpBase : OrtCustomOp { + CustomOpBase() { + OrtCustomOp::version = ORT_API_VERSION; + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info) { return static_cast(this_)->CreateKernel(*api, info); }; + OrtCustomOp::GetName = [](const OrtCustomOp* this_) { return static_cast(this_)->GetName(); }; + + OrtCustomOp::GetExecutionProviderType = [](const OrtCustomOp* this_) { return static_cast(this_)->GetExecutionProviderType(); }; + + OrtCustomOp::GetInputTypeCount = [](const OrtCustomOp* this_) { return static_cast(this_)->GetInputTypeCount(); }; + OrtCustomOp::GetInputType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputType(index); }; + OrtCustomOp::GetInputMemoryType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputMemoryType(index); }; + + OrtCustomOp::GetOutputTypeCount = [](const OrtCustomOp* this_) { return static_cast(this_)->GetOutputTypeCount(); }; + OrtCustomOp::GetOutputType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetOutputType(index); }; + + OrtCustomOp::KernelCompute = [](void* op_kernel, OrtKernelContext* context) { static_cast(op_kernel)->Compute(context); }; +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +#pragma warning(disable : 26409) +#endif + OrtCustomOp::KernelDestroy = [](void* op_kernel) { delete static_cast(op_kernel); }; +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(pop) +#endif + OrtCustomOp::GetInputCharacteristic = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputCharacteristic(index); }; + OrtCustomOp::GetOutputCharacteristic = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetOutputCharacteristic(index); }; + + OrtCustomOp::GetVariadicInputMinArity = [](const OrtCustomOp* this_) { return static_cast(this_)->GetVariadicInputMinArity(); }; + OrtCustomOp::GetVariadicInputHomogeneity = [](const OrtCustomOp* this_) { return static_cast(static_cast(this_)->GetVariadicInputHomogeneity()); }; + OrtCustomOp::GetVariadicOutputMinArity = [](const OrtCustomOp* this_) { return static_cast(this_)->GetVariadicOutputMinArity(); }; + OrtCustomOp::GetVariadicOutputHomogeneity = [](const OrtCustomOp* this_) { return static_cast(static_cast(this_)->GetVariadicOutputHomogeneity()); }; + } + + // Default implementation of GetExecutionProviderType that returns nullptr to default to the CPU provider + const char* GetExecutionProviderType() const { return nullptr; } + + // Default implementations of GetInputCharacteristic() and GetOutputCharacteristic() below + // (inputs and outputs are required by default) + OrtCustomOpInputOutputCharacteristic GetInputCharacteristic(size_t /*index*/) const { + return OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED; + } + + OrtCustomOpInputOutputCharacteristic GetOutputCharacteristic(size_t /*index*/) const { + return OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED; + } + + // Default implemention of GetInputMemoryType() that returns OrtMemTypeDefault + OrtMemType GetInputMemoryType(size_t /*index*/) const { + return OrtMemTypeDefault; + } + + // Default implementation of GetVariadicInputMinArity() returns 1 to specify that a variadic input + // should expect at least 1 argument. + int GetVariadicInputMinArity() const { + return 1; + } + + // Default implementation of GetVariadicInputHomegeneity() returns true to specify that all arguments + // to a variadic input should be of the same type. + bool GetVariadicInputHomogeneity() const { + return true; + } + + // Default implementation of GetVariadicOutputMinArity() returns 1 to specify that a variadic output + // should produce at least 1 output value. + int GetVariadicOutputMinArity() const { + return 1; + } + + // Default implementation of GetVariadicOutputHomegeneity() returns true to specify that all output values + // produced by a variadic output should be of the same type. + bool GetVariadicOutputHomogeneity() const { + return true; + } + + // Declare list of session config entries used by this Custom Op. + // Implement this function in order to get configs from CustomOpBase::GetSessionConfigs(). + // This default implementation returns an empty vector of config entries. + std::vector GetSessionConfigKeys() const { + return std::vector{}; + } + + protected: + // Helper function that returns a map of session config entries specified by CustomOpBase::GetSessionConfigKeys. + void GetSessionConfigs(std::unordered_map& out, ConstSessionOptions options) const; +}; + +} // namespace Ort + +#include "onnxruntime_cxx_inline.h" diff --git a/cpp/external/onnxruntime/include/onnxruntime_cxx_inline.h b/cpp/external/onnxruntime/include/onnxruntime_cxx_inline.h new file mode 100644 index 0000000..6d391ad --- /dev/null +++ b/cpp/external/onnxruntime/include/onnxruntime_cxx_inline.h @@ -0,0 +1,1874 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Do not include this file directly. Please include "onnxruntime_cxx_api.h" instead. +// If interested in trying out features of the new experimental C++ API, include "experimental_onnxruntime_cxx_api.h" instead. +// +// These are the inline implementations of the C++ header APIs. They're in this separate file as to not clutter +// the main C++ file with implementation details. + +namespace Ort { + +namespace detail { +inline void ThrowStatus(const Status& st) { + std::string error_message = st.GetErrorMessage(); + OrtErrorCode error_code = st.GetErrorCode(); + ORT_CXX_API_THROW(std::move(error_message), error_code); +} +} // namespace detail + +inline void ThrowOnError(OrtStatus* ort_status) { + if (ort_status) { + Ort::Status st(ort_status); + detail::ThrowStatus(st); + } +} + +inline void ThrowOnError(const Status& st) { + if (st) { + detail::ThrowStatus(st); + } +} + +inline Status::Status(OrtStatus* status) : Base{status} { +} + +inline Status::Status(const std::exception& e) { + p_ = GetApi().CreateStatus(ORT_FAIL, e.what()); +} + +inline Status::Status(const Exception& e) { + p_ = GetApi().CreateStatus(e.GetOrtErrorCode(), e.what()); +} + +inline std::string Status::GetErrorMessage() const { + std::string message(GetApi().GetErrorMessage(p_)); + return message; +} + +inline OrtErrorCode Status::GetErrorCode() const { + return GetApi().GetErrorCode(p_); +} + +// This template converts a C++ type into it's ONNXTensorElementDataType +template +struct TypeToTensorType; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL; +}; + +inline MemoryAllocation::MemoryAllocation(OrtAllocator* allocator, void* p, size_t size) + : allocator_(allocator), p_(p), size_(size) { +} + +inline MemoryAllocation::~MemoryAllocation() { + if (p_ != nullptr) { + // We do not throw out of destructor + auto ret = GetApi().AllocatorFree(allocator_, p_); + static_cast(ret); + } +} + +inline MemoryAllocation::MemoryAllocation(MemoryAllocation&& o) noexcept : allocator_(nullptr), p_(nullptr), size_(0) { + *this = std::move(o); +} + +inline MemoryAllocation& MemoryAllocation::operator=(MemoryAllocation&& o) noexcept { + OrtAllocator* alloc = nullptr; + void* p = nullptr; + size_t sz = 0; + + // Swap out this + std::swap(alloc, allocator_); + std::swap(p, p_); + std::swap(sz, size_); + + // Swap with incoming + std::swap(allocator_, o.allocator_); + std::swap(p_, o.p_); + std::swap(size_, o.size_); + + // Destroy this instance if needed + MemoryAllocation this_alloc(alloc, p, sz); + return *this; +} + +namespace detail { + +template +inline void* AllocatorImpl::Alloc(size_t size) { + void* out; + ThrowOnError(GetApi().AllocatorAlloc(this->p_, size, &out)); + return out; +} + +template +inline MemoryAllocation AllocatorImpl::GetAllocation(size_t size) { + void* out; + ThrowOnError(GetApi().AllocatorAlloc(this->p_, size, &out)); + MemoryAllocation result(this->p_, out, size); + return result; +} + +template +inline void AllocatorImpl::Free(void* p) { + ThrowOnError(GetApi().AllocatorFree(this->p_, p)); +} + +template +inline ConstMemoryInfo AllocatorImpl::GetInfo() const { + const OrtMemoryInfo* out; + ThrowOnError(GetApi().AllocatorGetInfo(this->p_, &out)); + return ConstMemoryInfo{out}; +} + +} // namespace detail + +inline AllocatorWithDefaultOptions::AllocatorWithDefaultOptions() { + ThrowOnError(GetApi().GetAllocatorWithDefaultOptions(&this->p_)); +} + +inline Allocator::Allocator(const Session& sess, const OrtMemoryInfo* mem_info) { + ThrowOnError(GetApi().CreateAllocator(sess, mem_info, &this->p_)); +} + +namespace detail { + +template +inline std::string MemoryInfoImpl::GetAllocatorName() const { + const char* name = nullptr; + ThrowOnError(GetApi().MemoryInfoGetName(this->p_, &name)); + return std::string(name); +} + +template +inline OrtAllocatorType MemoryInfoImpl::GetAllocatorType() const { + OrtAllocatorType type; + ThrowOnError(GetApi().MemoryInfoGetType(this->p_, &type)); + return type; +} + +template +inline int MemoryInfoImpl::GetDeviceId() const { + int id = 0; + ThrowOnError(GetApi().MemoryInfoGetId(this->p_, &id)); + return id; +} + +template +inline OrtMemoryInfoDeviceType MemoryInfoImpl::GetDeviceType() const { + OrtMemoryInfoDeviceType type; + GetApi().MemoryInfoGetDeviceType(this->p_, &type); + return type; +} + +template +inline OrtMemType MemoryInfoImpl::GetMemoryType() const { + OrtMemType type; + ThrowOnError(GetApi().MemoryInfoGetMemType(this->p_, &type)); + return type; +} + +template +template +inline bool MemoryInfoImpl::operator==(const MemoryInfoImpl& o) const { + int comp_result = 0; + ThrowOnError(Ort::GetApi().CompareMemoryInfo(this->p_, o, &comp_result)); + return comp_result == 0; +} + +} // namespace detail + +inline MemoryInfo MemoryInfo::CreateCpu(OrtAllocatorType type, OrtMemType mem_type) { + OrtMemoryInfo* p; + ThrowOnError(GetApi().CreateCpuMemoryInfo(type, mem_type, &p)); + return MemoryInfo(p); +} + +inline MemoryInfo::MemoryInfo(const char* name, OrtAllocatorType type, int id, OrtMemType mem_type) { + ThrowOnError(GetApi().CreateMemoryInfo(name, type, id, mem_type, &this->p_)); +} + +namespace detail { +template +inline std::vector ConstIoBindingImpl::GetOutputNames() const { + AllocatorWithDefaultOptions allocator; + return binding_utils::GetOutputNamesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputNames(OrtAllocator* allocator) const { + return binding_utils::GetOutputNamesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputValues() const { + AllocatorWithDefaultOptions allocator; + return binding_utils::GetOutputValuesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputValues(OrtAllocator* allocator) const { + return binding_utils::GetOutputValuesHelper(this->p_, allocator); +} + +template +inline void IoBindingImpl::BindInput(const char* name, const Value& value) { + ThrowOnError(GetApi().BindInput(this->p_, name, value)); +} + +template +inline void IoBindingImpl::BindOutput(const char* name, const Value& value) { + ThrowOnError(GetApi().BindOutput(this->p_, name, value)); +} + +template +inline void IoBindingImpl::BindOutput(const char* name, const OrtMemoryInfo* mem_info) { + ThrowOnError(GetApi().BindOutputToDevice(this->p_, name, mem_info)); +} + +template +inline void IoBindingImpl::ClearBoundInputs() { + GetApi().ClearBoundInputs(this->p_); +} + +template +inline void IoBindingImpl::ClearBoundOutputs() { + GetApi().ClearBoundOutputs(this->p_); +} + +template +inline void IoBindingImpl::SynchronizeInputs() { + ThrowOnError(GetApi().SynchronizeBoundInputs(this->p_)); +} + +template +inline void IoBindingImpl::SynchronizeOutputs() { + ThrowOnError(GetApi().SynchronizeBoundOutputs(this->p_)); +} + +namespace binding_utils { +inline std::vector GetOutputNamesHelper(const OrtIoBinding* binding, OrtAllocator* allocator) { + std::vector result; + auto free_fn = detail::AllocatedFree(allocator); + using Ptr = std::unique_ptr; + + char* buffer = nullptr; + size_t* lengths = nullptr; + size_t count = 0; + ThrowOnError(GetApi().GetBoundOutputNames(binding, allocator, &buffer, &lengths, &count)); + + if (count == 0) { + return result; + } + + Ptr buffer_g(buffer, free_fn); + Ptr lengths_g(lengths, free_fn); + + result.reserve(count); + for (size_t i = 0; i < count; ++i) { + auto sz = *lengths; + result.emplace_back(buffer, sz); + buffer += sz; + ++lengths; + } + return result; +} + +inline std::vector GetOutputValuesHelper(const OrtIoBinding* binding, OrtAllocator* allocator) { + std::vector result; + size_t owned = 0; + size_t output_count = 0; + // Lambda to release the buffer when no longer needed and + // make sure that we destroy all instances on exception + auto free_fn = [&owned, &output_count, allocator](OrtValue** buffer) { + if (buffer) { + while (owned < output_count) { + auto* p = buffer + owned++; + GetApi().ReleaseValue(*p); + } + allocator->Free(allocator, buffer); + } + }; + using Ptr = std::unique_ptr; + + OrtValue** output_buffer = nullptr; + ThrowOnError(GetApi().GetBoundOutputValues(binding, allocator, &output_buffer, &output_count)); + if (output_count == 0) { + return result; + } + + Ptr buffer_g(output_buffer, free_fn); + + result.reserve(output_count); + for (size_t i = 0; i < output_count; ++i) { + result.emplace_back(output_buffer[i]); + ++owned; + } + return result; +} + +} // namespace binding_utils +} // namespace detail + +inline IoBinding::IoBinding(Session& session) { + ThrowOnError(GetApi().CreateIoBinding(session, &this->p_)); +} + +inline ArenaCfg::ArenaCfg(size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk) { + ThrowOnError(GetApi().CreateArenaCfg(max_mem, arena_extend_strategy, initial_chunk_size_bytes, max_dead_bytes_per_chunk, &p_)); +} + +inline ThreadingOptions::ThreadingOptions() { + ThrowOnError(GetApi().CreateThreadingOptions(&p_)); +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalIntraOpNumThreads(int intra_op_num_threads) { + ThrowOnError(GetApi().SetGlobalIntraOpNumThreads(p_, intra_op_num_threads)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalInterOpNumThreads(int inter_op_num_threads) { + ThrowOnError(GetApi().SetGlobalInterOpNumThreads(p_, inter_op_num_threads)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalSpinControl(int allow_spinning) { + ThrowOnError(GetApi().SetGlobalSpinControl(p_, allow_spinning)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalDenormalAsZero() { + ThrowOnError(GetApi().SetGlobalDenormalAsZero(p_)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn) { + ThrowOnError(GetApi().SetGlobalCustomCreateThreadFn(p_, ort_custom_create_thread_fn)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomThreadCreationOptions(void* ort_custom_thread_creation_options) { + ThrowOnError(GetApi().SetGlobalCustomThreadCreationOptions(p_, ort_custom_thread_creation_options)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn) { + ThrowOnError(GetApi().SetGlobalCustomJoinThreadFn(p_, ort_custom_join_thread_fn)); + return *this; +} + +inline Env::Env(OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnv(logging_level, logid, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(OrtLoggingLevel logging_level, const char* logid, OrtLoggingFunction logging_function, void* logger_param) { + ThrowOnError(GetApi().CreateEnvWithCustomLogger(logging_function, logger_param, logging_level, logid, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(const OrtThreadingOptions* tp_options, OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnvWithGlobalThreadPools(logging_level, logid, tp_options, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(const OrtThreadingOptions* tp_options, OrtLoggingFunction logging_function, void* logger_param, + OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnvWithCustomLoggerAndGlobalThreadPools(logging_function, logger_param, logging_level, logid, tp_options, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env& Env::EnableTelemetryEvents() { + ThrowOnError(GetApi().EnableTelemetryEvents(p_)); + return *this; +} + +inline Env& Env::DisableTelemetryEvents() { + ThrowOnError(GetApi().DisableTelemetryEvents(p_)); + return *this; +} + +inline Env& Env::UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level) { + ThrowOnError(GetApi().UpdateEnvWithCustomLogLevel(p_, log_severity_level)); + return *this; +} + +inline Env& Env::CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg) { + ThrowOnError(GetApi().CreateAndRegisterAllocator(p_, mem_info, arena_cfg)); + return *this; +} + +inline CustomOpDomain::CustomOpDomain(const char* domain) { + ThrowOnError(GetApi().CreateCustomOpDomain(domain, &p_)); +} + +inline void CustomOpDomain::Add(const OrtCustomOp* op) { + ThrowOnError(GetApi().CustomOpDomain_Add(p_, op)); +} + +inline RunOptions::RunOptions() { + ThrowOnError(GetApi().CreateRunOptions(&p_)); +} + +inline RunOptions& RunOptions::SetRunLogVerbosityLevel(int level) { + ThrowOnError(GetApi().RunOptionsSetRunLogVerbosityLevel(p_, level)); + return *this; +} + +inline RunOptions& RunOptions::SetRunLogSeverityLevel(int level) { + ThrowOnError(GetApi().RunOptionsSetRunLogSeverityLevel(p_, level)); + return *this; +} + +inline int RunOptions::GetRunLogVerbosityLevel() const { + int out; + ThrowOnError(GetApi().RunOptionsGetRunLogVerbosityLevel(p_, &out)); + return out; +} + +inline int RunOptions::GetRunLogSeverityLevel() const { + int out; + ThrowOnError(GetApi().RunOptionsGetRunLogSeverityLevel(p_, &out)); + return out; +} + +inline RunOptions& RunOptions::SetRunTag(const char* run_tag) { + ThrowOnError(GetApi().RunOptionsSetRunTag(p_, run_tag)); + return *this; +} + +inline const char* RunOptions::GetRunTag() const { + const char* out; + ThrowOnError(GetApi().RunOptionsGetRunTag(p_, &out)); + return out; +} + +inline RunOptions& RunOptions::AddConfigEntry(const char* config_key, const char* config_value) { + ThrowOnError(GetApi().AddRunConfigEntry(p_, config_key, config_value)); + return *this; +} + +inline RunOptions& RunOptions::SetTerminate() { + ThrowOnError(GetApi().RunOptionsSetTerminate(p_)); + return *this; +} + +inline RunOptions& RunOptions::UnsetTerminate() { + ThrowOnError(GetApi().RunOptionsUnsetTerminate(p_)); + return *this; +} + +namespace detail { + +template +inline Ort::SessionOptions ConstSessionOptionsImpl::Clone() const { + OrtSessionOptions* out; + ThrowOnError(GetApi().CloneSessionOptions(this->p_, &out)); + return SessionOptions{out}; +} + +template +inline std::string ConstSessionOptionsImpl::GetConfigEntry(const char* config_key) const { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().GetSessionConfigEntry(this->p_, config_key, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().GetSessionConfigEntry(this->p_, config_key, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline bool ConstSessionOptionsImpl::HasConfigEntry(const char* config_key) const { + int out = 0; + Ort::ThrowOnError(GetApi().HasSessionConfigEntry(this->p_, config_key, &out)); + return static_cast(out); +} + +template +inline std::string ConstSessionOptionsImpl::GetConfigEntryOrDefault(const char* config_key, const std::string& def) { + if (!this->HasConfigEntry(config_key)) { + return def; + } + + return this->GetConfigEntry(config_key); +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetIntraOpNumThreads(int intra_op_num_threads) { + ThrowOnError(GetApi().SetIntraOpNumThreads(this->p_, intra_op_num_threads)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetInterOpNumThreads(int inter_op_num_threads) { + ThrowOnError(GetApi().SetInterOpNumThreads(this->p_, inter_op_num_threads)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level) { + ThrowOnError(GetApi().SetSessionGraphOptimizationLevel(this->p_, graph_optimization_level)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_filepath) { + ThrowOnError(GetApi().SetOptimizedModelFilePath(this->p_, optimized_model_filepath)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableProfiling(const ORTCHAR_T* profile_file_prefix) { + ThrowOnError(GetApi().EnableProfiling(this->p_, profile_file_prefix)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableProfiling() { + ThrowOnError(GetApi().DisableProfiling(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableOrtCustomOps() { + ThrowOnError(GetApi().EnableOrtCustomOps(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableMemPattern() { + ThrowOnError(GetApi().EnableMemPattern(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableMemPattern() { + ThrowOnError(GetApi().DisableMemPattern(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableCpuMemArena() { + ThrowOnError(GetApi().EnableCpuMemArena(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableCpuMemArena() { + ThrowOnError(GetApi().DisableCpuMemArena(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetExecutionMode(ExecutionMode execution_mode) { + ThrowOnError(GetApi().SetSessionExecutionMode(this->p_, execution_mode)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetLogId(const char* logid) { + ThrowOnError(GetApi().SetSessionLogId(this->p_, logid)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetLogSeverityLevel(int level) { + ThrowOnError(GetApi().SetSessionLogSeverityLevel(this->p_, level)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::Add(OrtCustomOpDomain* custom_op_domain) { + ThrowOnError(GetApi().AddCustomOpDomain(this->p_, custom_op_domain)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddConfigEntry(const char* config_key, const char* config_value) { + ThrowOnError(GetApi().AddSessionConfigEntry(this->p_, config_key, config_value)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddInitializer(const char* name, const OrtValue* ort_val) { + ThrowOnError(GetApi().AddInitializer(this->p_, name, ort_val)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisablePerSessionThreads() { + ThrowOnError(GetApi().DisablePerSessionThreads(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddExternalInitializers(const std::vector& names, + const std::vector& ort_values) { + const size_t inputs_num = names.size(); + if (inputs_num != ort_values.size()) { + ORT_CXX_API_THROW("Expecting names and ort_values to have the same length", ORT_INVALID_ARGUMENT); + } + std::vector names_ptr; + std::vector ort_values_ptrs; + names_ptr.reserve(inputs_num); + ort_values_ptrs.reserve(inputs_num); + for (size_t i = 0; i < inputs_num; ++i) { + names_ptr.push_back(names[i].c_str()); + ort_values_ptrs.push_back(ort_values[i]); + } + ThrowOnError(GetApi().AddExternalInitializers(this->p_, names_ptr.data(), ort_values_ptrs.data(), inputs_num)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CUDA(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CUDA_V2(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_ROCM(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_TensorRT(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_TensorRT_V2(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_MIGraphX(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CANN(const OrtCANNProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CANN(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider( + const std::string& provider_name, + const std::unordered_map& provider_options) { + auto num_entries = provider_options.size(); + std::vector keys, values; + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + + for (const auto& entry : provider_options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider(this->p_, provider_name.c_str(), + keys.data(), values.data(), num_entries)); + + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn) { + ThrowOnError(GetApi().SessionOptionsSetCustomCreateThreadFn(this->p_, ort_custom_create_thread_fn)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomThreadCreationOptions(void* ort_custom_thread_creation_options) { + ThrowOnError(GetApi().SessionOptionsSetCustomThreadCreationOptions(this->p_, ort_custom_thread_creation_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn) { + ThrowOnError(GetApi().SessionOptionsSetCustomJoinThreadFn(this->p_, ort_custom_join_thread_fn)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_OpenVINO(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::RegisterCustomOpsLibrary(const ORTCHAR_T* library_name, + const CustomOpConfigs& custom_op_configs) { + // Add custom op config entries before registering the custom op library. Otherwise, the config entries _may_ be ignored by + // the custom op library. + for (const auto& config_iter : custom_op_configs.GetFlattenedConfigs()) { + AddConfigEntry(config_iter.first.c_str(), config_iter.second.c_str()); + } + + ThrowOnError(GetApi().RegisterCustomOpsLibrary_V2(this->p_, library_name)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::RegisterCustomOpsUsingFunction(const char* registration_function_name) { + ThrowOnError(GetApi().RegisterCustomOpsUsingFunction(this->p_, registration_function_name)); + return *this; +} + +/// Session +template +inline size_t ConstSessionImpl::GetInputCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetInputCount(this->p_, &out)); + return out; +} + +template +inline size_t ConstSessionImpl::GetOutputCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetOutputCount(this->p_, &out)); + return out; +} + +template +inline size_t ConstSessionImpl::GetOverridableInitializerCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetOverridableInitializerCount(this->p_, &out)); + return out; +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetInputNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetInputName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetOutputNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetOutputName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetOverridableInitializerNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetOverridableInitializerName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline uint64_t ConstSessionImpl::GetProfilingStartTimeNs() const { + uint64_t out; + ThrowOnError(GetApi().SessionGetProfilingStartTimeNs(this->p_, &out)); + return out; +} + +template +inline ModelMetadata ConstSessionImpl::GetModelMetadata() const { + OrtModelMetadata* out; + ThrowOnError(GetApi().SessionGetModelMetadata(this->p_, &out)); + return ModelMetadata{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetInputTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetInputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetOutputTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetOutputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetOverridableInitializerTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetOverridableInitializerTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline std::vector SessionImpl::Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, size_t output_count) { + std::vector output_values; + output_values.reserve(output_count); + for (size_t i = 0; i < output_count; i++) + output_values.emplace_back(nullptr); + Run(run_options, input_names, input_values, input_count, output_names, output_values.data(), output_count); + return output_values; +} + +template +inline void SessionImpl::Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count) { + static_assert(sizeof(Value) == sizeof(OrtValue*), "Value is really just an array of OrtValue* in memory, so we can reinterpret_cast safely"); + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + ThrowOnError(GetApi().Run(this->p_, run_options, input_names, ort_input_values, input_count, output_names, output_count, ort_output_values)); +} + +template +inline void SessionImpl::Run(const RunOptions& run_options, const IoBinding& io_binding) { + ThrowOnError(GetApi().RunWithBinding(this->p_, run_options, io_binding)); +} + +template +inline AllocatedStringPtr SessionImpl::EndProfilingAllocated(OrtAllocator* allocator) { + char* out = nullptr; + ThrowOnError(GetApi().SessionEndProfiling(this->p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +} // namespace detail + +inline SessionOptions::SessionOptions() { + ThrowOnError(GetApi().CreateSessionOptions(&this->p_)); +} + +/// CustomOpConfigs +inline std::string detail::MakeCustomOpConfigEntryKey(const char* custom_op_name, const char* config) { + std::string config_key = "custom_op."; + + config_key += custom_op_name; + config_key += "."; + config_key += config; + + return config_key; +} + +inline CustomOpConfigs& CustomOpConfigs::AddConfig(const char* custom_op_name, const char* config_key, const char* config_value) { + const std::string full_flat_key = detail::MakeCustomOpConfigEntryKey(custom_op_name, config_key); + flat_configs_[full_flat_key] = config_value; + return *this; +} + +inline const std::unordered_map& CustomOpConfigs::GetFlattenedConfigs() const { + return flat_configs_; +} + +inline Session::Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options) { + ThrowOnError(GetApi().CreateSession(env, model_path, options, &this->p_)); +} + +inline Session::Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container) { + ThrowOnError(GetApi().CreateSessionWithPrepackedWeightsContainer(env, model_path, options, prepacked_weights_container, &this->p_)); +} + +inline Session::Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options) { + ThrowOnError(GetApi().CreateSessionFromArray(env, model_data, model_data_length, options, &this->p_)); +} + +inline Session::Session(const Env& env, const void* model_data, size_t model_data_length, + const SessionOptions& options, OrtPrepackedWeightsContainer* prepacked_weights_container) { + ThrowOnError(GetApi().CreateSessionFromArrayWithPrepackedWeightsContainer(env, model_data, model_data_length, options, + prepacked_weights_container, &this->p_)); +} + +inline AllocatedStringPtr ModelMetadata::GetProducerNameAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetProducerName(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetGraphNameAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetGraphName(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetDomainAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetDomain(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr Ort::ModelMetadata::GetDescriptionAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetDescription(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetGraphDescriptionAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetGraphDescription(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::LookupCustomMetadataMapAllocated(const char* key, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataLookupCustomMetadataMap(p_, allocator, key, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline std::vector ModelMetadata::GetCustomMetadataMapKeysAllocated(OrtAllocator* allocator) const { + auto deletor = detail::AllocatedFree(allocator); + std::vector result; + + char** out = nullptr; + int64_t num_keys = 0; + ThrowOnError(GetApi().ModelMetadataGetCustomMetadataMapKeys(p_, allocator, &out, &num_keys)); + if (num_keys <= 0) { + return result; + } + + // array of pointers will be freed + std::unique_ptr array_guard(out, deletor); + // reserve may throw + auto strings_deletor = [&deletor, num_keys](char** out) { for(int64_t i = 0; i < num_keys; ++i) deletor(out[i]); }; + std::unique_ptr strings_guard(out, strings_deletor); + result.reserve(static_cast(num_keys)); + strings_guard.release(); + for (int64_t i = 0; i < num_keys; ++i) { + result.push_back(AllocatedStringPtr(out[i], deletor)); + } + + return result; +} + +inline int64_t ModelMetadata::GetVersion() const { + int64_t out; + ThrowOnError(GetApi().ModelMetadataGetVersion(p_, &out)); + return out; +} + +namespace detail { + +template +inline ONNXTensorElementDataType TensorTypeAndShapeInfoImpl::GetElementType() const { + ONNXTensorElementDataType out; + ThrowOnError(GetApi().GetTensorElementType(this->p_, &out)); + return out; +} + +template +inline size_t TensorTypeAndShapeInfoImpl::GetElementCount() const { + size_t out; + ThrowOnError(GetApi().GetTensorShapeElementCount(this->p_, &out)); + return static_cast(out); +} + +template +inline size_t TensorTypeAndShapeInfoImpl::GetDimensionsCount() const { + size_t out; + ThrowOnError(GetApi().GetDimensionsCount(this->p_, &out)); + return out; +} + +template +inline void TensorTypeAndShapeInfoImpl::GetDimensions(int64_t* values, size_t values_count) const { + ThrowOnError(GetApi().GetDimensions(this->p_, values, values_count)); +} + +template +inline void TensorTypeAndShapeInfoImpl::GetSymbolicDimensions(const char** values, size_t values_count) const { + ThrowOnError(GetApi().GetSymbolicDimensions(this->p_, values, values_count)); +} + +template +inline std::vector TensorTypeAndShapeInfoImpl::GetShape() const { + std::vector out(GetDimensionsCount(), 0); + ThrowOnError(GetApi().GetDimensions(this->p_, out.data(), out.size())); + return out; +} + +} // namespace detail + +namespace detail { +template +inline ConstTensorTypeAndShapeInfo TypeInfoImpl::GetTensorTypeAndShapeInfo() const { + const OrtTensorTypeAndShapeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToTensorInfo(this->p_, &out)); + return ConstTensorTypeAndShapeInfo{out}; +} + +template +inline ConstSequenceTypeInfo TypeInfoImpl::GetSequenceTypeInfo() const { + const OrtSequenceTypeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToSequenceTypeInfo(this->p_, &out)); + return ConstSequenceTypeInfo{out}; +} + +template +inline ConstMapTypeInfo TypeInfoImpl::GetMapTypeInfo() const { + const OrtMapTypeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToMapTypeInfo(this->p_, &out)); + return ConstMapTypeInfo{out}; +} + +template +inline ONNXType TypeInfoImpl::GetONNXType() const { + ONNXType out; + ThrowOnError(GetApi().GetOnnxTypeFromTypeInfo(this->p_, &out)); + return out; +} + +} // namespace detail + +namespace detail { +template +inline TypeInfo SequenceTypeInfoImpl::GetSequenceElementType() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetSequenceElementType(this->p_, &output)); + return TypeInfo{output}; +} + +} // namespace detail + +namespace detail { +template +inline ONNXTensorElementDataType MapTypeInfoImpl::GetMapKeyType() const { + ONNXTensorElementDataType out; + ThrowOnError(GetApi().GetMapKeyType(this->p_, &out)); + return out; +} + +template +inline TypeInfo MapTypeInfoImpl::GetMapValueType() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetMapValueType(this->p_, &output)); + return TypeInfo{output}; +} +} // namespace detail + +namespace detail { + +template +template +inline void ConstValueImpl::GetOpaqueData(const char* domain, const char* type_name, R& out) const { + ThrowOnError(GetApi().GetOpaqueValue(domain, type_name, this->p_, &out, sizeof(R))); +} + +template +inline bool ConstValueImpl::IsTensor() const { + int out; + ThrowOnError(GetApi().IsTensor(this->p_, &out)); + return out != 0; +} + +template +inline bool ConstValueImpl::HasValue() const { + int out; + ThrowOnError(GetApi().HasValue(this->p_, &out)); + return out != 0; +} + +template +inline size_t ConstValueImpl::GetCount() const { + size_t out; + ThrowOnError(GetApi().GetValueCount(this->p_, &out)); + return out; +} + +template +inline Value ConstValueImpl::GetValue(int index, OrtAllocator* allocator) const { + OrtValue* out; + ThrowOnError(GetApi().GetValue(this->p_, index, allocator, &out)); + return Value{out}; +} + +template +inline size_t ConstValueImpl::GetStringTensorDataLength() const { + size_t out; + ThrowOnError(GetApi().GetStringTensorDataLength(this->p_, &out)); + return out; +} + +template +inline size_t ConstValueImpl::GetStringTensorElementLength(size_t element_index) const { + size_t out; + ThrowOnError(GetApi().GetStringTensorElementLength(this->p_, element_index, &out)); + return out; +} + +template +template +inline const R* ConstValueImpl::GetTensorData() const { + R* out; + ThrowOnError(GetApi().GetTensorMutableData(const_cast(this->p_), (void**)&out)); + return out; +} + +template +inline const void* ConstValueImpl::GetTensorRawData() const { + void* out; + ThrowOnError(GetApi().GetTensorMutableData(const_cast(this->p_), &out)); + return out; +} + +template +inline TypeInfo ConstValueImpl::GetTypeInfo() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetTypeInfo(this->p_, &output)); + return TypeInfo{output}; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetTensorTypeAndShapeInfo() const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetTensorTypeAndShape(this->p_, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +inline ConstMemoryInfo ConstValueImpl::GetTensorMemoryInfo() const { + const OrtMemoryInfo* mem_info; + ThrowOnError(GetApi().GetTensorMemoryInfo(this->p_, &mem_info)); + return ConstMemoryInfo(mem_info); +} + +template +inline void ConstValueImpl::GetStringTensorElement(size_t buffer_length, size_t element_index, void* buffer) const { + ThrowOnError(GetApi().GetStringTensorElement(this->p_, buffer_length, element_index, buffer)); +} + +template +inline void ConstValueImpl::GetStringTensorContent(void* buffer, size_t buffer_length, size_t* offsets, size_t offsets_count) const { + ThrowOnError(GetApi().GetStringTensorContent(this->p_, buffer, buffer_length, offsets, offsets_count)); +} + +#if !defined(DISABLE_SPARSE_TENSORS) +template +inline OrtSparseFormat ConstValueImpl::GetSparseFormat() const { + OrtSparseFormat format; + ThrowOnError(GetApi().GetSparseTensorFormat(this->p_, &format)); + return format; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetSparseTensorValuesTypeAndShapeInfo() const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetSparseTensorValuesTypeAndShape(this->p_, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetSparseTensorIndicesTypeShapeInfo(OrtSparseIndicesFormat indices_format) const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetSparseTensorIndicesTypeShape(this->p_, indices_format, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +template +inline const R* ConstValueImpl::GetSparseTensorIndicesData(OrtSparseIndicesFormat indices_format, size_t& num_indices) const { + const void* out; + ThrowOnError(GetApi().GetSparseTensorIndices(this->p_, indices_format, &num_indices, &out)); + return reinterpret_cast(out); +} + +template +inline bool ConstValueImpl::IsSparseTensor() const { + int out; + ThrowOnError(GetApi().IsSparseTensor(this->p_, &out)); + return out != 0; +} + +template +template +inline const R* ConstValueImpl::GetSparseTensorValues() const { + const void* out; + ThrowOnError(GetApi().GetSparseTensorValues(this->p_, &out)); + return reinterpret_cast(out); +} + +#endif + +template +void ValueImpl::FillStringTensor(const char* const* s, size_t s_len) { + ThrowOnError(GetApi().FillStringTensor(this->p_, s, s_len)); +} + +template +void ValueImpl::FillStringTensorElement(const char* s, size_t index) { + ThrowOnError(GetApi().FillStringTensorElement(this->p_, s, index)); +} + +template +void* ValueImpl::GetTensorMutableRawData() { + void* out; + ThrowOnError(GetApi().GetTensorMutableData(this->p_, &out)); + return out; +} + +template +template +R* ValueImpl::GetTensorMutableData() { + R* out; + ThrowOnError(GetApi().GetTensorMutableData(this->p_, (void**)&out)); + return out; +} + +template +template +R& ValueImpl::At(const std::vector& location) { + static_assert(!std::is_same::value, "this api does not support std::string"); + R* out; + ThrowOnError(GetApi().TensorAt(this->p_, location.data(), location.size(), (void**)&out)); + return *out; +} + +#if !defined(DISABLE_SPARSE_TENSORS) +template +void ValueImpl::UseCooIndices(int64_t* indices_data, size_t indices_num) { + ThrowOnError(GetApi().UseCooIndices(this->p_, indices_data, indices_num)); +} + +template +void ValueImpl::UseCsrIndices(int64_t* inner_data, size_t inner_num, int64_t* outer_data, size_t outer_num) { + ThrowOnError(GetApi().UseCsrIndices(this->p_, inner_data, inner_num, outer_data, outer_num)); +} + +template +void ValueImpl::UseBlockSparseIndices(const Shape& indices_shape, int32_t* indices_data) { + ThrowOnError(GetApi().UseBlockSparseIndices(this->p_, indices_shape.shape, indices_shape.shape_len, indices_data)); +} + +template +void ValueImpl::FillSparseTensorCoo(const OrtMemoryInfo* mem_info, const OrtSparseValuesParam& values_param, + const int64_t* indices_data, size_t indices_num) { + ThrowOnError(GetApi().FillSparseTensorCoo(this->p_, mem_info, values_param.values_shape, + values_param.values_shape_len, values_param.data.p_data, + indices_data, indices_num)); +} + +template +void ValueImpl::FillSparseTensorCsr(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const int64_t* inner_indices_data, size_t inner_indices_num, + const int64_t* outer_indices_data, size_t outer_indices_num) { + ThrowOnError(GetApi().FillSparseTensorCsr(this->p_, data_mem_info, values.values_shape, values.values_shape_len, values.data.p_data, + inner_indices_data, inner_indices_num, + outer_indices_data, outer_indices_num)); +} + +template +void ValueImpl::FillSparseTensorBlockSparse(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const Shape& indices_shape, + const int32_t* indices_data) { + ThrowOnError(GetApi().FillSparseTensorBlockSparse(this->p_, data_mem_info, values.values_shape, values.values_shape_len, values.data.p_data, + indices_shape.shape, indices_shape.shape_len, + indices_data)); +} + +#endif // !defined(DISABLE_SPARSE_TENSORS) + +} // namespace detail + +template +inline Value Value::CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len) { + return CreateTensor(info, p_data, p_data_element_count * sizeof(T), shape, shape_len, TypeToTensorType::type); +} + +inline Value Value::CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateTensorWithDataAsOrtValue(info, p_data, p_data_byte_count, shape, shape_len, type, &out)); + return Value{out}; +} + +template +inline Value Value::CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len) { + return CreateTensor(allocator, shape, shape_len, TypeToTensorType::type); +} + +inline Value Value::CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateTensorAsOrtValue(allocator, shape, shape_len, type, &out)); + return Value{out}; +} + +#if !defined(DISABLE_SPARSE_TENSORS) + +template +inline Value Value::CreateSparseTensor(const OrtMemoryInfo* info, T* p_data, const Shape& dense_shape, + const Shape& values_shape) { + return CreateSparseTensor(info, p_data, dense_shape, values_shape, TypeToTensorType::type); +} + +inline Value Value::CreateSparseTensor(const OrtMemoryInfo* info, void* p_data, const Shape& dense_shape, + const Shape& values_shape, ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateSparseTensorWithValuesAsOrtValue(info, p_data, dense_shape.shape, dense_shape.shape_len, + values_shape.shape, values_shape.shape_len, type, &out)); + return Value{out}; +} + +template +inline Value Value::CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape) { + return CreateSparseTensor(allocator, dense_shape, TypeToTensorType::type); +} + +inline Value Value::CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape, + ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateSparseTensorAsOrtValue(allocator, dense_shape.shape, dense_shape.shape_len, type, &out)); + return Value{out}; +} +#endif // !defined(DISABLE_SPARSE_TENSORS) + +inline Value Value::CreateMap(Value& keys, Value& values) { + OrtValue* out; + OrtValue* inputs[2] = {keys, values}; + ThrowOnError(GetApi().CreateValue(inputs, 2, ONNX_TYPE_MAP, &out)); + return Value{out}; +} + +inline Value Value::CreateSequence(std::vector& values) { + OrtValue* out; + std::vector values_ort{values.data(), values.data() + values.size()}; + ThrowOnError(GetApi().CreateValue(values_ort.data(), values_ort.size(), ONNX_TYPE_SEQUENCE, &out)); + return Value{out}; +} + +template +inline Value Value::CreateOpaque(const char* domain, const char* type_name, const T& data_container) { + OrtValue* out; + ThrowOnError(GetApi().CreateOpaqueValue(domain, type_name, &data_container, sizeof(T), &out)); + return Value{out}; +} + +// +// Custom OP Inlines +// +inline KernelContext::KernelContext(OrtKernelContext* context) : ctx_(context) { +} + +inline size_t KernelContext::GetInputCount() const { + size_t out = 0; + Ort::ThrowOnError(GetApi().KernelContext_GetInputCount(ctx_, &out)); + return out; +} + +inline size_t KernelContext::GetOutputCount() const { + size_t out = 0; + Ort::ThrowOnError(GetApi().KernelContext_GetOutputCount(ctx_, &out)); + return out; +} + +inline ConstValue KernelContext::GetInput(size_t index) const { + const OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetInput(ctx_, index, &out)); + return ConstValue{out}; +} + +inline UnownedValue KernelContext::GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const { + OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetOutput(ctx_, index, dim_values, dim_count, &out)); + return UnownedValue(out); +} + +inline UnownedValue KernelContext::GetOutput(size_t index, const std::vector& dims) const { + OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetOutput(ctx_, index, dims.data(), dims.size(), &out)); + return UnownedValue(out); +} + +inline void* KernelContext::GetGPUComputeStream() const { + void* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetGPUComputeStream(ctx_, &out)); + return out; +} + +inline OpAttr::OpAttr(const char* name, const void* data, int len, OrtOpAttrType type) { + Ort::ThrowOnError(GetApi().CreateOpAttr(name, data, len, type, &p_)); +} + +namespace detail { +template +inline KernelInfo KernelInfoImpl::Copy() const { + OrtKernelInfo* info_copy = nullptr; + Ort::ThrowOnError(GetApi().CopyKernelInfo(this->p_, &info_copy)); + return KernelInfo{info_copy}; +} + +template +inline size_t KernelInfoImpl::GetInputCount() const { + size_t out = 0; + ThrowOnError(GetApi().KernelInfo_GetInputCount(this->p_, &out)); + return out; +} + +template +inline size_t KernelInfoImpl::GetOutputCount() const { + size_t out = 0; + ThrowOnError(GetApi().KernelInfo_GetOutputCount(this->p_, &out)); + return out; +} + +template +inline std::string KernelInfoImpl::GetInputName(size_t index) const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetInputName(this->p_, index, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetInputName(this->p_, index, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline std::string KernelInfoImpl::GetOutputName(size_t index) const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetOutputName(this->p_, index, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetOutputName(this->p_, index, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline TypeInfo KernelInfoImpl::GetInputTypeInfo(size_t index) const { + OrtTypeInfo* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetInputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo KernelInfoImpl::GetOutputTypeInfo(size_t index) const { + OrtTypeInfo* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetOutputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline Value KernelInfoImpl::GetTensorAttribute(const char* name, OrtAllocator* allocator) const { + OrtValue* out = nullptr; + ThrowOnError(GetApi().KernelInfoGetAttribute_tensor(this->p_, name, allocator, &out)); + return Value{out}; +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, float& out) { + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_float(p, name, &out)); +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, int64_t& out) { + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_int64(p, name, &out)); +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, std::string& result) { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the string attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_string(p, name, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_string(p, name, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + out.swap(result); +} + +inline void attr_utils::GetAttrs(const OrtKernelInfo* p, const char* name, std::vector& result) { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_float(p, name, nullptr, &size)); + + std::vector out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_float(p, name, out.data(), &size)); + out.swap(result); +} + +inline void attr_utils::GetAttrs(const OrtKernelInfo* p, const char* name, std::vector& result) { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_int64(p, name, nullptr, &size)); + + std::vector out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_int64(p, name, out.data(), &size)); + out.swap(result); +} +} // namespace detail + +inline KernelInfo::KernelInfo(OrtKernelInfo* info) : detail::KernelInfoImpl{info} {} + +inline Op::Op(OrtOp* p) : Base(p) {} + +inline Op Op::Create(const OrtKernelInfo* info, const char* op_name, const char* domain, int version, + const char** type_constraint_names, + const ONNXTensorElementDataType* type_constraint_values, + size_t type_constraint_count, + const OpAttr* attr_values, size_t attr_count, + size_t input_count, size_t output_count) { + static_assert(sizeof(OpAttr) == sizeof(OrtOpAttr*), + "OpAttr's is expected to be just an array of OrtOpAttr in memory so we can reinterpret safely"); + auto attr_input_values = reinterpret_cast(attr_values); + OrtOp* op; + Ort::ThrowOnError(GetApi().CreateOp(info, op_name, domain, version, type_constraint_names, type_constraint_values, + static_cast(type_constraint_count), + attr_input_values, + static_cast(attr_count), + static_cast(input_count), + static_cast(output_count), &op)); + return Op{op}; +} + +inline void Op::Invoke(const OrtKernelContext* context, + const Value* input_values, + size_t input_count, + Value* output_values, + size_t output_count) { + static_assert(sizeof(Value) == sizeof(OrtValue*), + "Value is really just an array of OrtValue* in memory, so we can reinterpret_cast safely"); + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + Ort::ThrowOnError(GetApi().InvokeOp(context, p_, ort_input_values, static_cast(input_count), + ort_output_values, static_cast(output_count))); +} + +inline void Op::Invoke(const OrtKernelContext* context, + const OrtValue* const* input_values, + size_t input_count, + OrtValue* const* output_values, + size_t output_count) { + Ort::ThrowOnError(GetApi().InvokeOp(context, p_, input_values, static_cast(input_count), + output_values, static_cast(output_count))); +} + +inline void CustomOpApi::ThrowOnError(OrtStatus* status) { + Ort::ThrowOnError(status); +} + +template <> +inline float CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) { + float out; + Ort::ThrowOnError(api_.KernelInfoGetAttribute_float(info, name, &out)); + return out; +} + +template <> +inline int64_t CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) { + int64_t out; + Ort::ThrowOnError(api_.KernelInfoGetAttribute_int64(info, name, &out)); + return out; +} + +template <> +inline std::string CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) { + size_t size = 0; + std::string out; + + // Feed nullptr for the data buffer to query the true size of the string attribute + OrtStatus* status = api_.KernelInfoGetAttribute_string(info, name, nullptr, &size); + + if (status == nullptr) { + out.resize(size); + Ort::ThrowOnError(api_.KernelInfoGetAttribute_string(info, name, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + } else { + Ort::ThrowOnError(status); + } + return out; +} + +template <> +inline std::vector CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) { + size_t size = 0; + std::vector out; + + // Feed nullptr for the data buffer to query the true size of the attribute + OrtStatus* status = api_.KernelInfoGetAttributeArray_float(info, name, nullptr, &size); + + if (status == nullptr) { + out.resize(size); + Ort::ThrowOnError(api_.KernelInfoGetAttributeArray_float(info, name, out.data(), &size)); + } else { + Ort::ThrowOnError(status); + } + return out; +} + +template <> +inline std::vector CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) { + size_t size = 0; + std::vector out; + + // Feed nullptr for the data buffer to query the true size of the attribute + OrtStatus* status = api_.KernelInfoGetAttributeArray_int64(info, name, nullptr, &size); + + if (status == nullptr) { + out.resize(size); + Ort::ThrowOnError(api_.KernelInfoGetAttributeArray_int64(info, name, out.data(), &size)); + } else { + Ort::ThrowOnError(status); + } + return out; +} +inline OrtTensorTypeAndShapeInfo* CustomOpApi::GetTensorTypeAndShape(_In_ const OrtValue* value) { + OrtTensorTypeAndShapeInfo* out; + Ort::ThrowOnError(api_.GetTensorTypeAndShape(value, &out)); + return out; +} + +inline size_t CustomOpApi::GetTensorShapeElementCount(_In_ const OrtTensorTypeAndShapeInfo* info) { + size_t out; + Ort::ThrowOnError(api_.GetTensorShapeElementCount(info, &out)); + return out; +} + +inline ONNXTensorElementDataType CustomOpApi::GetTensorElementType(const OrtTensorTypeAndShapeInfo* info) { + ONNXTensorElementDataType out; + Ort::ThrowOnError(api_.GetTensorElementType(info, &out)); + return out; +} + +inline size_t CustomOpApi::GetDimensionsCount(_In_ const OrtTensorTypeAndShapeInfo* info) { + size_t out; + Ort::ThrowOnError(api_.GetDimensionsCount(info, &out)); + return out; +} + +inline void CustomOpApi::GetDimensions(_In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, size_t dim_values_length) { + Ort::ThrowOnError(api_.GetDimensions(info, dim_values, dim_values_length)); +} + +inline void CustomOpApi::SetDimensions(OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count) { + Ort::ThrowOnError(api_.SetDimensions(info, dim_values, dim_count)); +} + +template +inline T* CustomOpApi::GetTensorMutableData(_Inout_ OrtValue* value) { + T* data; + Ort::ThrowOnError(api_.GetTensorMutableData(value, reinterpret_cast(&data))); + return data; +} + +inline const OrtMemoryInfo* CustomOpApi::GetTensorMemoryInfo(_In_ const OrtValue* value) { + const OrtMemoryInfo* mem_info; + Ort::ThrowOnError(api_.GetTensorMemoryInfo(value, &mem_info)); + return mem_info; +} + +template +inline const T* CustomOpApi::GetTensorData(_Inout_ const OrtValue* value) { + T* data = nullptr; + Ort::ThrowOnError(api_.GetTensorMutableData(const_cast(value), reinterpret_cast(&data))); + return data; +} + +inline std::vector CustomOpApi::GetTensorShape(const OrtTensorTypeAndShapeInfo* info) { + size_t out; + Ort::ThrowOnError(api_.GetDimensionsCount(info, &out)); + std::vector output(out); + Ort::ThrowOnError(api_.GetDimensions(info, output.data(), out)); + return output; +} + +inline void CustomOpApi::ReleaseTensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* input) { + api_.ReleaseTensorTypeAndShapeInfo(input); +} + +inline size_t CustomOpApi::KernelContext_GetInputCount(const OrtKernelContext* context) { + size_t out; + Ort::ThrowOnError(api_.KernelContext_GetInputCount(context, &out)); + return out; +} + +inline const OrtValue* CustomOpApi::KernelContext_GetInput(const OrtKernelContext* context, _In_ size_t index) { + const OrtValue* out; + Ort::ThrowOnError(api_.KernelContext_GetInput(context, index, &out)); + return out; +} + +inline size_t CustomOpApi::KernelContext_GetOutputCount(const OrtKernelContext* context) { + size_t out; + Ort::ThrowOnError(api_.KernelContext_GetOutputCount(context, &out)); + return out; +} + +inline OrtValue* CustomOpApi::KernelContext_GetOutput(OrtKernelContext* context, _In_ size_t index, + _In_ const int64_t* dim_values, size_t dim_count) { + OrtValue* out; + Ort::ThrowOnError(api_.KernelContext_GetOutput(context, index, dim_values, dim_count, &out)); + return out; +} + +inline void* CustomOpApi::KernelContext_GetGPUComputeStream(const OrtKernelContext* context) { + void* out; + Ort::ThrowOnError(api_.KernelContext_GetGPUComputeStream(context, &out)); + return out; +} + +inline OrtOpAttr* CustomOpApi::CreateOpAttr(_In_ const char* name, + _In_ const void* data, + _In_ int len, + _In_ OrtOpAttrType type) { + OrtOpAttr* op_attr{}; + Ort::ThrowOnError(api_.CreateOpAttr(name, data, len, type, &op_attr)); + return op_attr; +} + +inline void CustomOpApi::ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr) { + api_.ReleaseOpAttr(op_attr); +} + +inline OrtOp* CustomOpApi::CreateOp(_In_ const OrtKernelInfo* info, + _In_ const char* op_name, + _In_ const char* domain, + _In_ int version, + _In_opt_ const char** type_constraint_names, + _In_opt_ const ONNXTensorElementDataType* type_constraint_values, + _In_opt_ int type_constraint_count, + _In_opt_ const OrtOpAttr* const* attr_values, + _In_opt_ int attr_count, + _In_ int input_count, + _In_ int output_count) { + OrtOp* ort_op{}; + Ort::ThrowOnError(api_.CreateOp(info, op_name, domain, version, type_constraint_names, type_constraint_values, + type_constraint_count, attr_values, attr_count, input_count, output_count, &ort_op)); + return ort_op; +} + +inline void CustomOpApi::InvokeOp(_In_ const OrtKernelContext* context, + _In_ const OrtOp* ort_op, + _In_ const OrtValue* const* input_values, + _In_ int input_count, + _Inout_ OrtValue* const* output_values, + _In_ int output_count) { + Ort::ThrowOnError(api_.InvokeOp(context, ort_op, input_values, input_count, output_values, output_count)); +} + +inline void CustomOpApi::ReleaseOp(_Frees_ptr_opt_ OrtOp* ort_op) { + api_.ReleaseOp(ort_op); +} + +inline OrtKernelInfo* CustomOpApi::CopyKernelInfo(_In_ const OrtKernelInfo* info) { + OrtKernelInfo* info_copy{}; + Ort::ThrowOnError(api_.CopyKernelInfo(info, &info_copy)); + return info_copy; +} + +inline void CustomOpApi::ReleaseKernelInfo(_Frees_ptr_opt_ OrtKernelInfo* info_copy) { + api_.ReleaseKernelInfo(info_copy); +} + +inline std::vector GetAvailableProviders() { + int len; + char** providers; + ThrowOnError(GetApi().GetAvailableProviders(&providers, &len)); + std::vector available_providers(providers, providers + len); + ThrowOnError(GetApi().ReleaseAvailableProviders(providers, len)); + return available_providers; +} + +SessionOptions& AddInitializer(const char* name, const OrtValue* ort_val); + +template +void CustomOpBase::GetSessionConfigs(std::unordered_map& out, + ConstSessionOptions options) const { + const TOp* derived = static_cast(this); + std::vector keys = derived->GetSessionConfigKeys(); + + out.reserve(keys.size()); + + std::string config_entry_key = detail::MakeCustomOpConfigEntryKey(derived->GetName(), ""); + const size_t prefix_size = config_entry_key.length(); + + for (const auto& key : keys) { + config_entry_key.resize(prefix_size); + config_entry_key.append(key); + out[key] = options.GetConfigEntryOrDefault(config_entry_key.c_str(), ""); + } +} + +} // namespace Ort diff --git a/cpp/external/onnxruntime/include/onnxruntime_run_options_config_keys.h b/cpp/external/onnxruntime/include/onnxruntime_run_options_config_keys.h new file mode 100644 index 0000000..1f5fcd5 --- /dev/null +++ b/cpp/external/onnxruntime/include/onnxruntime_run_options_config_keys.h @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +/* + * This file defines RunOptions Config Keys and format of the Config Values. + * + * The Naming Convention for a RunOptions Config Key, + * "[Area][.[SubArea1].[SubArea2]...].[Keyname]" + * Such as "ep.cuda.use_arena" + * The Config Key cannot be empty + * The maximum length of the Config Key is 128 + * + * The string format of a RunOptions Config Value is defined individually for each Config. + * The maximum length of the Config Value is 1024 + */ + +// Key for enabling shrinkages of user listed device memory arenas. +// Expects a list of semi-colon separated key value pairs separated by colon in the following format: +// "device_0:device_id_0;device_1:device_id_1" +// No white-spaces allowed in the provided list string. +// Currently, the only supported devices are : "cpu", "gpu" (case sensitive). +// If "cpu" is included in the list, DisableCpuMemArena() API must not be called (i.e.) arena for cpu should be enabled. +// Example usage: "cpu:0;gpu:0" (or) "gpu:0" +// By default, the value for this key is empty (i.e.) no memory arenas are shrunk +static const char* const kOrtRunOptionsConfigEnableMemoryArenaShrinkage = "memory.enable_memory_arena_shrinkage"; + +// Set to '1' to not synchronize execution providers with CPU at the end of session run. +// Per default it will be set to '0' +// Taking CUDA EP as an example, it omit triggering cudaStreamSynchronize on the compute stream. +static const char* const kOrtRunOptionsConfigDisableSynchronizeExecutionProviders = "disable_synchronize_execution_providers"; diff --git a/cpp/external/onnxruntime/include/onnxruntime_session_options_config_keys.h b/cpp/external/onnxruntime/include/onnxruntime_session_options_config_keys.h new file mode 100644 index 0000000..92482d7 --- /dev/null +++ b/cpp/external/onnxruntime/include/onnxruntime_session_options_config_keys.h @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +/* + * This file defines SessionOptions Config Keys and format of the Config Values. + * + * The Naming Convention for a SessionOptions Config Key, + * "[Area][.[SubArea1].[SubArea2]...].[Keyname]" + * Such as "ep.cuda.use_arena" + * The Config Key cannot be empty + * The maximum length of the Config Key is 128 + * + * The string format of a SessionOptions Config Value is defined individually for each Config. + * The maximum length of the Config Value is 1024 + */ + +// Key for disable PrePacking, +// If the config value is set to "1" then the prepacking is disabled, otherwise prepacking is enabled (default value) +static const char* const kOrtSessionOptionsConfigDisablePrepacking = "session.disable_prepacking"; + +// A value of "1" means allocators registered in the env will be used. "0" means the allocators created in the session +// will be used. Use this to override the usage of env allocators on a per session level. +static const char* const kOrtSessionOptionsConfigUseEnvAllocators = "session.use_env_allocators"; + +// Set to 'ORT' (case sensitive) to load an ORT format model. +// If unset, model type will default to ONNX unless inferred from filename ('.ort' == ORT format) or bytes to be ORT +static const char* const kOrtSessionOptionsConfigLoadModelFormat = "session.load_model_format"; + +// Set to 'ORT' (case sensitive) to save optimized model in ORT format when SessionOptions.optimized_model_path is set. +// If unset, format will default to ONNX unless optimized_model_filepath ends in '.ort'. +static const char* const kOrtSessionOptionsConfigSaveModelFormat = "session.save_model_format"; + +// If a value is "1", flush-to-zero and denormal-as-zero are applied. The default is "0". +// When multiple sessions are created, a main thread doesn't override changes from succeeding session options, +// but threads in session thread pools follow option changes. +// When ORT runs with OpenMP, the same rule is applied, i.e. the first session option to flush-to-zero and +// denormal-as-zero is only applied to global OpenMP thread pool, which doesn't support per-session thread pool. +// Note that an alternative way not using this option at runtime is to train and export a model without denormals +// and that's recommended because turning this option on may hurt model accuracy. +static const char* const kOrtSessionOptionsConfigSetDenormalAsZero = "session.set_denormal_as_zero"; + +// It controls to run quantization model in QDQ (QuantizelinearDeQuantizelinear) format or not. +// "0": enable. ORT does fusion logic for QDQ format. +// "1": disable. ORT doesn't do fusion logic for QDQ format. +// Its default value is "0" +static const char* const kOrtSessionOptionsDisableQuantQDQ = "session.disable_quant_qdq"; + +// It controls whether to enable Double QDQ remover and Identical Children Consolidation +// "0": not to disable. ORT does remove the middle 2 Nodes from a Q->(QD->Q)->QD pairs +// "1": disable. ORT doesn't remove the middle 2 Nodes from a Q->(QD->Q)->QD pairs +// Its default value is "0" +static const char* const kOrtSessionOptionsDisableDoubleQDQRemover = "session.disable_double_qdq_remover"; + +// If set to "1", enables the removal of QuantizeLinear/DequantizeLinear node pairs once all QDQ handling has been +// completed. e.g. If after all QDQ handling has completed and we have -> FloatOp -> Q -> DQ -> FloatOp -> the +// Q -> DQ could potentially be removed. This will provide a performance benefit by avoiding going from float to +// 8-bit and back to float, but could impact accuracy. The impact on accuracy will be model specific and depend on +// other factors like whether the model was created using Quantization Aware Training or Post Training Quantization. +// As such, it's best to test to determine if enabling this works well for your scenario. +// The default value is "0" +// Available since version 1.11. +static const char* const kOrtSessionOptionsEnableQuantQDQCleanup = "session.enable_quant_qdq_cleanup"; + +// Enable or disable gelu approximation in graph optimization. "0": disable; "1": enable. The default is "0". +// GeluApproximation has side effects which may change the inference results. It is disabled by default due to this. +static const char* const kOrtSessionOptionsEnableGeluApproximation = "optimization.enable_gelu_approximation"; + +#ifdef ENABLE_TRAINING +// Specifies a list of op types for memory footprint reduction. +// The value should be a ","-delimited list of pair of +// . +// For example, "Gelu+Cast+:1:0,Dropout+:1:1". +// A valid "subgraph string" should be one subgraph representation output by ORT graph transformations. +// "optimization strategy" currently has valid values: 0 - disabled, 1 - recompute. +// "number of subgraph to apply" is used to control how many subgraphs to apply optimization, to avoid "oversaving" +// the memory. +static const char* const kOrtSessionOptionsMemoryOptimizerEnabler = "optimization.enable_memory_optimizer"; + +// Specifies the level for detecting subgraphs for memory footprint reduction. +// The value should be an integer. The default value is 0. +static const char* const kOrtSessionOptionsMemoryOptimizerProbeLevel = "optimization.enable_memory_probe_recompute_level"; +#endif + +// Enable or disable using device allocator for allocating initialized tensor memory. "1": enable; "0": disable. The default is "0". +// Using device allocators means the memory allocation is made using malloc/new. +static const char* const kOrtSessionOptionsUseDeviceAllocatorForInitializers = "session.use_device_allocator_for_initializers"; + +// Configure whether to allow the inter_op/intra_op threads spinning a number of times before blocking +// "0": thread will block if found no job to run +// "1": default, thread will spin a number of times before blocking +static const char* const kOrtSessionOptionsConfigAllowInterOpSpinning = "session.inter_op.allow_spinning"; +static const char* const kOrtSessionOptionsConfigAllowIntraOpSpinning = "session.intra_op.allow_spinning"; + +// Key for using model bytes directly for ORT format +// If a session is created using an input byte array contains the ORT format model data, +// By default we will copy the model bytes at the time of session creation to ensure the model bytes +// buffer is valid. +// Setting this option to "1" will disable copy the model bytes, and use the model bytes directly. The caller +// has to guarantee that the model bytes are valid until the ORT session using the model bytes is destroyed. +static const char* const kOrtSessionOptionsConfigUseORTModelBytesDirectly = "session.use_ort_model_bytes_directly"; + +/// +/// Key for using the ORT format model flatbuffer bytes directly for initializers. +/// This avoids copying the bytes and reduces peak memory usage during model loading and initialization. +/// Requires `session.use_ort_model_bytes_directly` to be true. +/// If set, the flatbuffer bytes provided when creating the InferenceSession MUST remain valid for the entire +/// duration of the InferenceSession. +/// +static const char* const kOrtSessionOptionsConfigUseORTModelBytesForInitializers = + "session.use_ort_model_bytes_for_initializers"; + +// This should only be specified when exporting an ORT format model for use on a different platform. +// If the ORT format model will be used on ARM platforms set to "1". For other platforms set to "0" +// Available since version 1.11. +static const char* const kOrtSessionOptionsQDQIsInt8Allowed = "session.qdqisint8allowed"; + +// x64 SSE4.1/AVX2/AVX512(with no VNNI) has overflow problem with quantizied matrix multiplication with U8S8. +// To avoid this we need to use slower U8U8 matrix multiplication instead. This option, if +// turned on, use slower U8U8 matrix multiplications. Only effective with AVX2 or AVX512 +// platforms. +static const char* const kOrtSessionOptionsAvx2PrecisionMode = "session.x64quantprecision"; + +// Specifies how minimal build graph optimizations are handled in a full build. +// These optimizations are at the extended level or higher. +// Possible values and their effects are: +// "save": Save runtime optimizations when saving an ORT format model. +// "apply": Only apply optimizations available in a minimal build. +// ""/: Apply optimizations available in a full build. +// Available since version 1.11. +static const char* const kOrtSessionOptionsConfigMinimalBuildOptimizations = + "optimization.minimal_build_optimizations"; + +// Note: The options specific to an EP should be specified prior to appending that EP to the session options object in +// order for them to take effect. + +// Specifies a list of stop op types. Nodes of a type in the stop op types and nodes downstream from them will not be +// run by the NNAPI EP. +// The value should be a ","-delimited list of op types. For example, "Add,Sub". +// If not specified, the default set of stop ops is used. To specify an empty stop ops types list and disable stop op +// exclusion, set the value to "". +static const char* const kOrtSessionOptionsConfigNnapiEpPartitioningStopOps = "ep.nnapi.partitioning_stop_ops"; + +// Enabling dynamic block-sizing for multithreading. +// With a positive value, thread pool will split a task of N iterations to blocks of size starting from: +// N / (num_of_threads * dynamic_block_base) +// As execution progresses, the size will decrease according to the diminishing residual of N, +// meaning the task will be distributed in smaller granularity for better parallelism. +// For some models, it helps to reduce the variance of E2E inference latency and boost performance. +// The feature will not function by default, specify any positive integer, e.g. "4", to enable it. +// Available since version 1.11. +static const char* const kOrtSessionOptionsConfigDynamicBlockBase = "session.dynamic_block_base"; + +// This option allows to decrease CPU usage between infrequent +// requests and forces any TP threads spinning stop immediately when the last of +// concurrent Run() call returns. +// Spinning is restarted on the next Run() call. +// Applies only to internal thread-pools +static const char* const kOrtSessionOptionsConfigForceSpinningStop = "session.force_spinning_stop"; + +// "1": all inconsistencies encountered during shape and type inference +// will result in failures. +// "0": in some cases warnings will be logged but processing will continue. The default. +// May be useful to expose bugs in models. +static const char* const kOrtSessionOptionsConfigStrictShapeTypeInference = "session.strict_shape_type_inference"; + +// The file saves configuration for partitioning node among logic streams +static const char* const kNodePartitionConfigFile = "session.node_partition_config_file"; + +// This Option allows setting affinities for intra op threads. +// Affinity string follows format: +// logical_processor_id,logical_processor_id;logical_processor_id,logical_processor_id +// Semicolon isolates configurations among threads, while comma split processors where ith thread expected to attach to. +// e.g.1,2,3;4,5 +// specifies affinities for two threads, with the 1st thread attach to the 1st, 2nd, and 3rd processor, and 2nd thread to the 4th and 5th. +// To ease the configuration, an "interval" is also allowed: +// e.g. 1-8;8-16;17-24 +// orders that the 1st thread runs on first eight processors, 2nd thread runs on next eight processors, and so forth. +// Note: +// 1. Once set, the number of thread affinities must equal to intra_op_num_threads - 1, since ort does not set affinity on the main thread which +// is started and managed by the calling app; +// 2. For windows, ort will infer the group id from a logical processor id, for example, assuming there are two groups with each has 64 logical processors, +// an id of 64 will be inferred as the last processor of the 1st group, while 65 will be interpreted as the 1st processor of the second group. +// Hence 64-65 is an invalid configuration, because a windows thread cannot be attached to processors across group boundary. +static const char* const kOrtSessionOptionsConfigIntraOpThreadAffinities = "session.intra_op_thread_affinities"; diff --git a/cpp/external/onnxruntime/include/provider_options.h b/cpp/external/onnxruntime/include/provider_options.h new file mode 100644 index 0000000..aab13e8 --- /dev/null +++ b/cpp/external/onnxruntime/include/provider_options.h @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include +#include +#include + +namespace onnxruntime { + +// data types for execution provider options + +using ProviderOptions = std::unordered_map; +using ProviderOptionsVector = std::vector; +using ProviderOptionsMap = std::unordered_map; + +} // namespace onnxruntime diff --git a/cpp/source/constants.h b/cpp/source/constants.h new file mode 100644 index 0000000..4b0062c --- /dev/null +++ b/cpp/source/constants.h @@ -0,0 +1,26 @@ + +#pragma once + +static constexpr int NUM_HARMONICS = 8; +static constexpr int NUM_FREQ_IN = 264; +static constexpr int NUM_FREQ_OUT = 88; +static constexpr double BASIC_PITCH_SAMPLE_RATE = 22050.0; + +static constexpr int MIDI_OFFSET = 21; +static constexpr int FFT_HOP = 256; +static constexpr int AUDIO_SAMPLE_RATE = 22050; +static constexpr int MAX_NOTE_IDX = 87; +// duration in seconds of training examples - original 1 +static constexpr int AUDIO_WINDOW_LENGTH = 2; + +// lowest key on a piano +static constexpr float ANNOTATIONS_BASE_FREQUENCY = 27.5; +static constexpr int CONTOURS_BINS_PER_SEMITONE = 3; + +static constexpr int MIN_MIDI_NOTE = 21; +static constexpr int MAX_MIDI_NOTE = 108; + +struct BinaryBlob { + uint8_t *data; + size_t num_bytes; +}; \ No newline at end of file diff --git a/cpp/source/features.cpp b/cpp/source/features.cpp new file mode 100644 index 0000000..7ef178f --- /dev/null +++ b/cpp/source/features.cpp @@ -0,0 +1,41 @@ + +#include "features.h" +#include "constants.h" + +Features::Features(BinaryBlob features_model_ort) + : memory_info(nullptr), session(nullptr) { + + memory_info = Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeCPU); + + session_options.SetInterOpNumThreads(1); + session_options.SetIntraOpNumThreads(1); + + session = Ort::Session(env, features_model_ort.data, + features_model_ort.num_bytes, session_options); +} + +const float *Features::compute_features(float *in_audio, size_t in_num_samples, + size_t &out_num_frames) { + input_shape[0] = 1; + input_shape[1] = static_cast(in_num_samples); + input_shape[2] = 1; + + input.clear(); + input.push_back(Ort::Value::CreateTensor( + memory_info, in_audio, in_num_samples, input_shape.data(), + input_shape.size())); + + output = + session.Run(run_options, input_names, input.data(), 1, output_names, 1); + + const auto out_shape = output[0].GetTensorTypeAndShapeInfo().GetShape(); + + assert(out_shape[0] == 1 && out_shape[2] == NUM_FREQ_IN && + out_shape[3] == NUM_HARMONICS); + + out_num_frames = static_cast(out_shape[1]); + + input.clear(); + + return output[0].GetTensorData(); +} diff --git a/cpp/source/features.h b/cpp/source/features.h new file mode 100644 index 0000000..418c0dd --- /dev/null +++ b/cpp/source/features.h @@ -0,0 +1,42 @@ + +#pragma once + +#include +#include + +#include "constants.h" + +class Features { + public: + explicit Features(BinaryBlob features_model_ort); + + ~Features() = default; + + /** + * Compute features for full audio signal + * @param in_audio Input audio. Should contain inNumSamples + * @param in_num_samples Number of samples in inAudio + * @param out_num_frames Number of frames that have been computed. + * @return Pointer to features. + */ + const float *compute_features(float *in_audio, size_t in_num_samples, + size_t &out_num_frames); + + private: + // ONNX Runtime Data + std::vector input; + std::vector output; + + std::array input_shape{}; + + // Input and output names of model + const char *input_names[1] = {"input_1"}; + const char *output_names[1] = {"harmonic_stacking"}; + + // ONNX Runtime + Ort::MemoryInfo memory_info; + Ort::SessionOptions session_options; + Ort::Env env; + Ort::Session session; + Ort::RunOptions run_options; +}; diff --git a/cpp/source/lib.cpp b/cpp/source/lib.cpp new file mode 100644 index 0000000..6183325 --- /dev/null +++ b/cpp/source/lib.cpp @@ -0,0 +1,66 @@ + + +#include "neural_pitch.h" +#include "pitch_detector.h" + +extern "C" { + +BinaryBlob binary_file_to_blob(BinaryFile file) { + return { + .data = file.data, + .num_bytes = static_cast(file.num_bytes), + }; +} + +PitchDetectorModelFiles convert_mf_types(ModelFiles mfs) { + return { + .features_model_ort = binary_file_to_blob(mfs.features_model_ort), + .cnn_contour_model_json = + binary_file_to_blob(mfs.cnn_contour_model_json), + .cnn_note_model_json = binary_file_to_blob(mfs.cnn_note_model_json), + .cnn_onset_1_model_json = + binary_file_to_blob(mfs.cnn_onset_1_model_json), + .cnn_onset_2_model_json = + binary_file_to_blob(mfs.cnn_onset_2_model_json), + }; +} + +PitchDetector *pitch_detector_create(ModelFiles model_files) { + return new PitchDetector(convert_mf_types(model_files)); +} + +void pitch_detector_reset(PitchDetector *detector) { detector->reset(); } + +void pitch_detector_transcribe_to_midi(PitchDetector *detector, float *audio, + int num_samples) { + detector->transcribe_to_midi(audio, num_samples); +} + +void pitch_detector_get_note_events(PitchDetector *detector, + NoteEvent **out_events, + int *out_num_events) { + auto &events = detector->latest_note_events(); + auto *target_buffer = new NoteEvent[events.size()]; + for (auto i = 0; i < events.size(); ++i) { + auto &event = events[i]; + target_buffer[i] = NoteEvent{ + .start_time = event.start_time, + .end_time = event.end_time, + .midi_note = event.midi_note_number, + .amplitude = event.amplitude, + }; + } + *out_events = target_buffer; + *out_num_events = static_cast(events.size()); +} + +void pitch_detector_set_parameters(PitchDetector *detector, + float note_sensibility, + float split_sensibility, + float min_note_duration_ms) { + detector->set_parameters(note_sensibility, split_sensibility, + min_note_duration_ms); +} + +void pitch_detector_destroy(PitchDetector *detector) { delete detector; } +} \ No newline at end of file diff --git a/cpp/source/neural_pitch.h b/cpp/source/neural_pitch.h new file mode 100644 index 0000000..c65c813 --- /dev/null +++ b/cpp/source/neural_pitch.h @@ -0,0 +1,56 @@ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +// ============================================================================= + +typedef struct PitchDetector PitchDetector; + +typedef struct { + unsigned char *data; + unsigned long long num_bytes; +} BinaryFile; + +typedef struct { + BinaryFile features_model_ort; + BinaryFile cnn_contour_model_json; + BinaryFile cnn_note_model_json; + BinaryFile cnn_onset_1_model_json; + BinaryFile cnn_onset_2_model_json; +} ModelFiles; + +typedef struct { + double start_time; + double end_time; + int midi_note; + double amplitude; +} NoteEvent; + +// ============================================================================= + +PitchDetector *pitch_detector_create(ModelFiles model_files); + +void pitch_detector_reset(PitchDetector *detector); + +void pitch_detector_set_parameters(PitchDetector *detector, + float note_sensibility, + float split_sensibility, + float min_note_duration_ms); + +void pitch_detector_transcribe_to_midi(PitchDetector *detector, float *audio, + int num_samples); + +void pitch_detector_get_note_events(PitchDetector *detector, + NoteEvent **out_events, + int *out_num_events); + +void pitch_detector_destroy(PitchDetector *detector); + +// ============================================================================= + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/cpp/source/notes.cpp b/cpp/source/notes.cpp new file mode 100644 index 0000000..cae4545 --- /dev/null +++ b/cpp/source/notes.cpp @@ -0,0 +1,277 @@ + +#include "notes.h" + +bool Notes::Event::operator==(const Notes::Event &other) const { + return this->start_time == other.start_time && + this->end_time == other.end_time && + this->start_frame == other.start_frame && + this->end_frame == other.end_frame && + this->midi_note_number == other.midi_note_number && + this->amplitude == other.amplitude && this->bends == other.bends; +} + +std::vector +Notes::convert(const std::vector> ¬es_posteriorgrams, + const std::vector> &onsets_posteriorgrams, + const std::vector> &contours_posteriorgrams, + ConvertParams convert_params) { + std::vector events; + events.reserve(1000); + + auto n_frames = notes_posteriorgrams.size(); + if (n_frames == 0) { + return events; + } + + auto n_notes = notes_posteriorgrams[0].size(); + assert(n_frames == onsets_posteriorgrams.size()); + assert(n_frames == contours_posteriorgrams.size()); + assert(n_notes == onsets_posteriorgrams[0].size()); + + std::vector> inferred_onsets; + auto onsets_ptr = &onsets_posteriorgrams; + if (convert_params.infer_onsets) { + inferred_onsets = Notes::inferred_onsets(onsets_posteriorgrams, + notes_posteriorgrams); + onsets_ptr = &inferred_onsets; + } + auto &onsets = *onsets_ptr; + + // deep copy + auto remaining_energy = notes_posteriorgrams; + + // to-be-sorted index of remaining_energy + std::vector remaining_energy_index; + if (convert_params.melodia_trick) { + remaining_energy_index.reserve(n_frames * n_notes); + } + + const auto frame_threshold = convert_params.frame_threshold; + // TODO: infer frame_threshold if < 0, can be merged with inferredOnsets. + + // constrain frequencies + const auto max_note_idx = static_cast( + (convert_params.max_frequency < 0) + ? n_notes - 1 + : ((ftom(convert_params.max_frequency) - MIDI_OFFSET))); + + const auto min_note_idx = static_cast( + (convert_params.min_frequency < 0) + ? 0 + : ((ftom(convert_params.min_frequency) - MIDI_OFFSET))); + + // stop 1 frame early to prevent edge case + // as per + // https://github.com/spotify/basic-pitch/blob/f85a8e9ade1f297b8adb39b155c483e2312e1aca/basic_pitch/note_creation.py#L399 + int last_frame = static_cast(n_frames) - 1; + + // Go backwards in time + for (int frame_idx = last_frame - 1; frame_idx >= 0; frame_idx--) { + for (int note_idx = max_note_idx; note_idx >= min_note_idx; + note_idx--) { + auto onset = onsets[frame_idx][note_idx]; + + if (convert_params.melodia_trick) { + remaining_energy_index.emplace_back( + PosteriorgramIndex{&remaining_energy[frame_idx][note_idx], + frame_idx, note_idx}); + } + + // equivalent to argrelmax logic + auto prev = + (frame_idx <= 0) ? onset : onsets[frame_idx - 1][note_idx]; + auto next = (frame_idx >= last_frame) + ? onset + : onsets[frame_idx + 1][note_idx]; + + if ((onset < convert_params.onset_threshold) || (onset < prev) || + (onset < next)) { + continue; + } + + // find time index at this frequency band where the frames drop + // below an energy threshold + int i = frame_idx + 1; + int k = 0; // number of frames since energy dropped below threshold + while (i < last_frame && k < convert_params.energy_threshold) { + if (remaining_energy[i][note_idx] < frame_threshold) { + k++; + } else { + k = 0; + } + i++; + } + + i -= k; // go back to frame above threshold + + // if the note is too short, skip it + if ((i - frame_idx) <= convert_params.min_note_len_frames) { + continue; + } + + double amplitude = 0.0; + for (int f = frame_idx; f < i; f++) { + amplitude += remaining_energy[f][note_idx]; + remaining_energy[f][note_idx] = 0; + + if (note_idx < MAX_NOTE_IDX) { + remaining_energy[f][note_idx + 1] = 0; + } + if (note_idx > 0) { + remaining_energy[f][note_idx - 1] = 0; + } + } + amplitude /= (i - frame_idx); + + events.push_back(Notes::Event{ + model_frame_to_seconds(frame_idx) /* startTime */, + model_frame_to_seconds(i) /* endTime */, + frame_idx /* startFrame */, + i /* endFrame */, + note_idx + MIDI_OFFSET /* pitch */, + amplitude /* amplitude */, + }); + } + } + + if (convert_params.melodia_trick) { + std::sort(remaining_energy_index.begin(), remaining_energy_index.end(), + [](const PosteriorgramIndex &a, const PosteriorgramIndex &b) { + return *a.value > *b.value; + }); + + // loop through each remaining note probability in descending order + // until reaching frame_threshold. + for (auto rei : remaining_energy_index) { + auto &frame_idx = rei.frame_index; + auto ¬e_idx = rei.note_index; + auto &energy = *rei.value; + + // skip those that have already been zeroed + if (energy == 0) { + continue; + } + + if (energy <= frame_threshold) { + break; + } + energy = 0; + + // this inhibit function zeroes out neighbor notes and keeps track + // (with k) on how many consecutive frames were below + // frame_threshold. + auto inhibit = [](std::vector> &pg, + int frame_idx, int note_idx, + float frame_threshold, int k) { + if (pg[frame_idx][note_idx] < frame_threshold) { + k++; + } else { + k = 0; + } + + pg[frame_idx][note_idx] = 0; + if (note_idx < MAX_NOTE_IDX) { + pg[frame_idx][note_idx + 1] = 0; + } + if (note_idx > 0) { + pg[frame_idx][note_idx - 1] = 0; + } + return k; + }; + + // forward pass + int i = frame_idx + 1; + int k = 0; + while (i < last_frame && k < convert_params.energy_threshold) { + k = inhibit(remaining_energy, i, note_idx, frame_threshold, k); + i++; + } + + auto i_end = i - 1 - k; + + // backward pass + i = frame_idx - 1; + k = 0; + while (i > 0 && k < convert_params.energy_threshold) { + k = inhibit(remaining_energy, i, note_idx, frame_threshold, k); + i--; + } + + auto i_start = i + 1 + k; + + // if the note is too short, skip it + if (i_end - i_start <= convert_params.min_note_len_frames) { + continue; + } + + double amplitude = 0.0; + for (int i = i_start; i < i_end; i++) { + amplitude += notes_posteriorgrams[i][note_idx]; + } + amplitude /= (i_end - i_start); + + events.push_back(Notes::Event{ + model_frame_to_seconds(i_start /* startTime */), + model_frame_to_seconds(i_end) /* endTime */, + i_start /* startFrame */, + i_end /* endFrame */, + note_idx + MIDI_OFFSET /* pitch */, + amplitude /* amplitude */, + }); + } + } + + sort_events(events); + + if (convert_params.pitch_bend != NoPitchBend) { + add_pitch_bends(events, contours_posteriorgrams); + if (convert_params.pitch_bend == SinglePitchBend) { + drop_overlapping_pitch_bends(events); + } + } + + return events; +} + +void Notes::add_pitch_bends( + std::vector &target_events, + const std::vector> &contour_posteriorgram_matrix, + int num_bins_tolerance) { + auto window_length = num_bins_tolerance * 2 + 1; + for (auto &event : target_events) { + // midi_pitch_to_contour_bin + int note_idx = + CONTOURS_BINS_PER_SEMITONE * + (event.midi_note_number - 69 + + 12 * std::round(std::log2(440.0 / ANNOTATIONS_BASE_FREQUENCY))); + + static constexpr int N_FREQ_BINS_CONTOURS = + NUM_FREQ_OUT * CONTOURS_BINS_PER_SEMITONE; + int note_start_idx = std::max(note_idx - num_bins_tolerance, 0); + int note_end_idx = + std::min(N_FREQ_BINS_CONTOURS, note_idx + num_bins_tolerance + 1); + + int gauss_start = std::max(0, num_bins_tolerance - note_idx); + auto pb_shift = + num_bins_tolerance - std::max(0, num_bins_tolerance - note_idx); + + for (int i = event.start_frame; i < event.end_frame; i++) { + int bend = 0; + float max = 0; + for (int j = note_start_idx; j < note_end_idx; j++) { + int k = j - note_start_idx; + float x = gauss_start + k; + float n = x - num_bins_tolerance; + static constexpr float std = 5.0; + // Gaussian + float w = std::exp(-(n * n) / (2.0 * std * std)); + w *= contour_posteriorgram_matrix[i][j]; + if (w > max) { + bend = k; + max = w; + } + } + event.bends.emplace_back(bend - pb_shift); + } + } +} \ No newline at end of file diff --git a/cpp/source/notes.h b/cpp/source/notes.h new file mode 100644 index 0000000..74eb6c7 --- /dev/null +++ b/cpp/source/notes.h @@ -0,0 +1,287 @@ + +#include +#include +#include + +#include "constants.h" + +enum PitchBendModes { NoPitchBend = 0, SinglePitchBend, MultiPitchBend }; + +NLOHMANN_JSON_SERIALIZE_ENUM(PitchBendModes, { + {NoPitchBend, nullptr}, + {SinglePitchBend, "single"}, + {MultiPitchBend, "multi"}, + }) + +/** + * Class to extract note events from posteriorgrams (outputs of basic pitch + * cnn). + */ +class Notes { + public: + typedef struct Event { + double start_time; + double end_time; + int start_frame; + int end_frame; + int midi_note_number; + double amplitude; + std::vector bends; // One vale of pitch bend per frame. Units is + // 1/3 of semitones. + + bool operator==(const struct Event &) const; + } Event; + + typedef struct ConvertParams { + /* Note segmentation (0.05 - 0.95, Split-Merge Notes) */ + float onset_threshold = 0.3; + /* Confidence threshold (0.05 to 0.95, More-Less notes) */ + float frame_threshold = 0.5; + /* Minimum note length in number of frames */ + int min_note_len_frames = 11; + bool infer_onsets = true; + float max_frequency = -1; // in Hz, -1 means unset + float min_frequency = -1; // in Hz, -1 means unset + bool melodia_trick = true; + enum PitchBendModes pitch_bend = NoPitchBend; + int energy_threshold = 11; + } ConvertParams; + + /** + * Create note events based on postegriorgram inputs + * @param notes_posteriorgrams Note posteriorgrams + * @param onsets_posteriorgrams Onset posteriorgrams + * @param contours_posteriorgrams Contour posteriorgrams + * @param convert_params input parameters + * @return + */ + static std::vector + convert(const std::vector> ¬es_posteriorgrams, + const std::vector> &onsets_posteriorgrams, + const std::vector> &contours_posteriorgrams, + ConvertParams convert_params); + + /** + * Inplace sort of note events. + * @param events + */ + static inline void sort_events(std::vector &events) { + std::sort(events.begin(), events.end(), + [](const Event &a, const Event &b) { + return a.start_frame < b.start_frame || + (a.start_frame == b.start_frame && + a.end_frame < b.end_frame); + }); + } + + /** + * drop_overlapping_pitch_bends sets bends to an empty array to all the note + * events that are overlapping in time. inOutEvents is expected to be + * sorted. + * @param events + */ + static void + drop_overlapping_pitch_bends(std::vector &events) { + for (int i = 0; i < int(events.size()) - 1; i++) { + auto &event = events[i]; + // if there is an overlap between events, remove pitch bends + for (int j = i + 1; j < events.size(); j++) { + auto &event2 = events[j]; + if (event2.start_frame >= event.end_frame) { + break; + } + event.bends = std::vector(); + event2.bends = std::vector(); + } + } + } + + /** + * mergeOverlappingNotes merges note events of same pitch that are + * overlapping in time. inOutEvents is expected to be sorted. + * @param events + */ + static void + merge_overlapping_notes_with_same_pitch(std::vector &events) { + sort_events(events); + for (int i = 0; i < int(events.size()) - 1; i++) { + auto &event = events[i]; + for (auto j = i + 1; j < events.size(); j++) { + auto &event2 = events[j]; + + // If notes don't overlap, break + if (event2.start_frame >= event.end_frame) { + break; + } + + // If notes overlap and have the same pitch: merge them + if (event.midi_note_number == event2.midi_note_number) { + event.end_time = event2.end_time; + event.end_frame = event2.end_frame; + events.erase(events.begin() + j); + } + } + } + } + + private: + typedef struct { + float *value; + int frame_index; + int note_index; + } PosteriorgramIndex; + + /** + * Add pitch bend vector to note events. + * @param target_events event vector (input and output) + * @param contour_posteriorgram_matrix Contour posteriorgram matrix + * @param num_bins_tolerance + */ + static void add_pitch_bends( + std::vector &target_events, + const std::vector> &contour_posteriorgram_matrix, + int num_bins_tolerance = 25); + + /** + * Get time in seconds given frame index. + * Different behaviour in test because of weirdness in basic-pitch code + * @param frame Index of frame. + * @return Corresponding time in seconds. + */ + static inline double model_frame_to_seconds(int frame) { + // The following are compile-time computed consts only used here. + // If they need to be used elsewhere, please move to Constants.h + + static constexpr int ANNOTATIONS_FPS = AUDIO_SAMPLE_RATE / FFT_HOP; + // number of frames in the time-frequency representations we compute + static constexpr int ANNOT_N_FRAMES = + ANNOTATIONS_FPS * AUDIO_WINDOW_LENGTH; + // number of samples in the (clipped) audio that we use as input to the + // models + static constexpr int AUDIO_N_SAMPLES = + AUDIO_SAMPLE_RATE * AUDIO_WINDOW_LENGTH - FFT_HOP; + // magic from Basic Pitch + static constexpr double WINDOW_OFFSET = + (double)FFT_HOP / AUDIO_SAMPLE_RATE * + (ANNOT_N_FRAMES - AUDIO_N_SAMPLES / (double)FFT_HOP) + + 0.0018; + + // Weird stuff from Basic Pitch. Use only in test so they can pass. +#if USE_TEST_NOTE_FRAME_TO_TIME + return (frame * FFT_HOP) / (double)(AUDIO_SAMPLE_RATE)-WINDOW_OFFSET * + (frame / ANNOT_N_FRAMES); +#else + return (frame * FFT_HOP) / (double)(AUDIO_SAMPLE_RATE); +#endif + } + + /** + * Return closest midi note number to frequency + * @param hz Input frequency + * @return Closest midi note number + */ + static inline int ftom(float hz) { + return (int)std::round(12.0 * (std::log2(hz) - std::log2(440.0)) + + 69.0); + } + + /** + * Returns a version of inOnsetsPG augmented by detecting differences in + * note posteriorgrams across frames separated by varying offsets (up to + * inNumDiffs). + * @tparam T + * @param onsets_posteriorgrams Onset posteriorgrams + * @param notes_posteriorgrams Note posteriorgrams + * @param inNumDiffs max varying offset. + * @return + */ + // TODO: change to float + template + static std::vector> + inferred_onsets(const std::vector> &onsets_posteriorgrams, + const std::vector> ¬es_posteriorgrams, + int inNumDiffs = 2) { + auto n_frames = notes_posteriorgrams.size(); + auto n_notes = notes_posteriorgrams[0].size(); + + // The algorithm starts by calculating a diff of note posteriorgrams, + // hence the name notes_diff. This same variable will later morph into + // the inferred onsets output notes_diff needs to be initialized to all + // 1 to not interfere with minima calculations, assuming all values in + // inNotesPG are probabilities < 1. + auto notes_diff = + std::vector>(n_frames, std::vector(n_notes, 1)); + + // max of minima of notes_diff + T max_min_notes_diff = 0; + // max of onsets + T max_onset = 0; + + // for each frame offset + for (int n = 0; n < inNumDiffs; n++) { + auto offset = n + 1; + // for each frame + for (int i = 0; i < n_frames; i++) { + // frame index slided back by offset + auto i_behind = i - offset; + // for each note + for (int j = 0; j < n_notes; j++) { + // calculate the difference in note probabilities between + // frame i and frame i_behind (the frame behind by offset). + auto diff = + notes_posteriorgrams[i][j] - + ((i_behind >= 0) ? notes_posteriorgrams[i_behind][j] : 0); + + // Basic Pitch calculates the minimum amongst positive and + // negative diffs instead of ignoring negative diffs (which + // mean "end of note") while we are only looking for "start + // of note" (aka onset). + // TODO: the zeroing of negative diff should probably happen + // before searching for minimum + auto &min = notes_diff[i][j]; + if (diff < min) { + diff = (diff < 0) ? 0 : diff; + // https://github.com/spotify/basic-pitch/blob/86fc60dab06e3115758eb670c92ead3b62a89b47/basic_pitch/note_creation.py#L298 + min = (i >= inNumDiffs) ? diff : 0; + } + + // if last diff, max_min_notes_diff can be computed + if (offset == inNumDiffs) { + auto onset = onsets_posteriorgrams[i][j]; + if (onset > max_onset) { + max_onset = onset; + } + if (min > max_min_notes_diff) { + max_min_notes_diff = min; + } + } + } + } + } + + // Rescale notes_diff in-place to match scale of original onsets + // and choose the element-wise max between it and the original onsets. + // This is where notes_diff morphs truly into the inferred onsets. + for (int i = 0; i < n_frames; i++) { + for (int j = 0; j < n_notes; j++) { + auto &inferred = notes_diff[i][j]; + inferred = max_onset * inferred / max_min_notes_diff; + auto orig = onsets_posteriorgrams[i][j]; + if (orig > inferred) { + inferred = orig; + } + } + } + + return notes_diff; + } +}; + +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Notes::Event, start_time, + end_time, start_frame, + end_frame, midi_note_number, + amplitude, bends) +NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT( + Notes::ConvertParams, onset_threshold, frame_threshold, min_note_len_frames, + infer_onsets, max_frequency, min_frequency, melodia_trick, pitch_bend, + energy_threshold) diff --git a/cpp/source/pitch_cnn.cpp b/cpp/source/pitch_cnn.cpp new file mode 100644 index 0000000..e6921a5 --- /dev/null +++ b/cpp/source/pitch_cnn.cpp @@ -0,0 +1,146 @@ + +#include "pitch_cnn.h" + +using json = nlohmann::json; + +PitchCnn::PitchCnn(BinaryBlob cnn_contour_model_json, + BinaryBlob cnn_note_model_json, + BinaryBlob cnn_onset_1_model_json, + BinaryBlob cnn_onset_2_model_json) { + const auto json_cnn_contour = json::parse( + cnn_contour_model_json.data, + cnn_contour_model_json.data + cnn_contour_model_json.num_bytes); + + cnn_contour.parseJson(json_cnn_contour); + + const auto json_cnn_note = + json::parse(cnn_note_model_json.data, + cnn_note_model_json.data + cnn_note_model_json.num_bytes); + + cnn_note.parseJson(json_cnn_note); + + const auto json_cnn_onset_input = json::parse( + cnn_onset_1_model_json.data, + cnn_onset_1_model_json.data + cnn_onset_1_model_json.num_bytes); + + cnn_onset_input.parseJson(json_cnn_onset_input); + + const auto json_cnn_onset_output = json::parse( + cnn_onset_2_model_json.data, + cnn_onset_2_model_json.data + cnn_onset_2_model_json.num_bytes); + + cnn_onset_output.parseJson(json_cnn_onset_output); +} + +void PitchCnn::reset() { + for (auto &array : contours_circular_buffer) { + array.fill(0.0f); + } + + for (auto &array : notes_circular_buffer) { + array.fill(0.0f); + } + + for (auto &array : concat_2_circular_buffer) { + array.fill(0.0f); + } + + cnn_contour.reset(); + cnn_note.reset(); + cnn_onset_input.reset(); + cnn_onset_output.reset(); + + note_index = 0; + contour_index = 0; + concat_2_index = 0; + + input_array.fill(0.0f); +} + +int PitchCnn::num_frames_lookahead() { return total_lookahead; } + +void PitchCnn::frame_inference(const float *in_data, + std::vector &out_contours, + std::vector &out_notes, + std::vector &out_onsets) { + // Checks on parameters + assert(out_contours.size() == NUM_FREQ_IN); + assert(out_notes.size() == NUM_FREQ_OUT); + assert(out_onsets.size() == NUM_FREQ_OUT); + + // Copy data in aligned input array for inference + std::copy(in_data, in_data + NUM_HARMONICS * NUM_FREQ_IN, + input_array.begin()); + + run_models(); + + // Fill output vectors + std::copy(cnn_onset_output.getOutputs(), + cnn_onset_output.getOutputs() + NUM_FREQ_OUT, out_onsets.begin()); + + std::copy(notes_circular_buffer[wrap_index(note_index + 1, num_note_stored)] + .begin(), + notes_circular_buffer[wrap_index(note_index + 1, num_note_stored)] + .end(), + out_notes.begin()); + + std::copy(contours_circular_buffer[wrap_index(contour_index + 1, + num_contour_stored)] + .begin(), + contours_circular_buffer[wrap_index(contour_index + 1, + num_contour_stored)] + .end(), + out_contours.begin()); + + // Increment index for different circular buffers + contour_index = + (contour_index == num_contour_stored - 1) ? 0 : contour_index + 1; + + note_index = (note_index == num_note_stored - 1) ? 0 : note_index + 1; + + concat_2_index = + (concat_2_index == num_concat_2_stored - 1) ? 0 : concat_2_index + 1; +} + +void PitchCnn::run_models() { + // Run models and push results in appropriate circular buffer + cnn_onset_input.forward(input_array.data()); + std::copy(cnn_onset_input.getOutputs(), + cnn_onset_input.getOutputs() + 32 * NUM_FREQ_OUT, + concat_2_circular_buffer[(size_t)concat_2_index].begin()); + + cnn_contour.forward(input_array.data()); + std::copy(cnn_contour.getOutputs(), cnn_contour.getOutputs() + NUM_FREQ_IN, + contours_circular_buffer[(size_t)contour_index].begin()); + + cnn_note.forward(cnn_contour.getOutputs()); + std::copy(cnn_note.getOutputs(), cnn_note.getOutputs() + NUM_FREQ_OUT, + notes_circular_buffer[(size_t)note_index].begin()); + + // Concat operation with correct frame shift + concat(); + + cnn_onset_output.forward(concat_array.data()); +} + +constexpr size_t PitchCnn::wrap_index(int index, int size) { + int wrapped_index = index % size; + + if (wrapped_index < 0) { + wrapped_index += size; + } + + return static_cast(wrapped_index); +} + +void PitchCnn::concat() { + auto concat2_index = + (size_t)wrap_index(concat_2_index + 1, num_concat_2_stored); + + for (size_t i = 0; i < NUM_FREQ_OUT; i++) { + concat_array[i * 33] = cnn_note.getOutputs()[i]; + std::copy(concat_2_circular_buffer[concat2_index].begin() + i * 32, + concat_2_circular_buffer[concat2_index].begin() + (i + 1) * 32, + concat_array.begin() + i * 33 + 1); + } +} \ No newline at end of file diff --git a/cpp/source/pitch_cnn.h b/cpp/source/pitch_cnn.h new file mode 100644 index 0000000..e0c2294 --- /dev/null +++ b/cpp/source/pitch_cnn.h @@ -0,0 +1,121 @@ + +#pragma once + +#include "RTNeural/RTNeural.h" +#include "json.hpp" + +#include "constants.h" + +class PitchCnn { + public: + PitchCnn(BinaryBlob cnn_contour_model_json, BinaryBlob cnn_note_model_json, + BinaryBlob cnn_onset_1_model_json, + BinaryBlob cnn_onset_2_model_json); + + /** + * Resets the internal state of the CNN. + */ + void reset(); + + /** + * @return The number of future lookahead of basic pitch cnn. + * It corresponds to the number of padded frames done left and right (in + * tensorflow for example) in order to have aligned input and output when + * running with valid padding. + */ + static int num_frames_lookahead(); + + /** + * Run inference for a single frame. inData should have 8 * 264 elements + * @param in_data input features (CQT harmonically stacked). + * @param out_contours output vector for contour posteriorgrams. Size should + * be 264 + * @param out_notes output vector for note posteriorgrams. Size should be 88 + * @param out_onsets output vector for onset posteriorgrams. Size should be + * 88 + */ + void frame_inference(const float *in_data, std::vector &out_contours, + std::vector &out_notes, + std::vector &out_onsets); + + private: + /** + * Run different sequential models with correct time offset ... + */ + void run_models(); + + /** + * Perform concat operation with correct time offset + */ + void concat(); + + /** + * Return in-range index for given size as if periodic. + * @param index maybe out of range index + * @param size Size of container + * @return Wrapped index (in-range) + */ + static constexpr size_t wrap_index(int index, int size); + + alignas(RTNEURAL_DEFAULT_ALIGNMENT) + std::array input_array{}; + + alignas(RTNEURAL_DEFAULT_ALIGNMENT) + std::array concat_array{}; + + static constexpr int lookahead_cnn_contour = 3; + static constexpr int lookahead_cnn_note = 6; + static constexpr int lookahead_cnn_onset_input = 2; + static constexpr int lookahead_cnn_onset_output = 1; + static constexpr int total_lookahead = + lookahead_cnn_contour + lookahead_cnn_note + lookahead_cnn_onset_output; + + static constexpr int num_contour_stored = + total_lookahead - lookahead_cnn_contour + 1; + static constexpr int num_note_stored = + total_lookahead - (lookahead_cnn_contour + lookahead_cnn_note) + 1; + static constexpr int num_concat_2_stored = lookahead_cnn_contour + + lookahead_cnn_note - + lookahead_cnn_onset_input + 1; + + std::array, num_contour_stored> + contours_circular_buffer{}; + std::array, num_note_stored> + notes_circular_buffer{}; // Also concat 1 + std::array, num_concat_2_stored> + concat_2_circular_buffer{}; + + int contour_index = 0; + int note_index = 0; + int concat_2_index = 0; + + using CnnContourModel = RTNeural::ModelT< + float, NUM_FREQ_IN * NUM_HARMONICS, NUM_FREQ_IN, + RTNeural::Conv2DT, + RTNeural::ReLuActivationT, + RTNeural::Conv2DT, + RTNeural::SigmoidActivationT>; + + using CnnNoteModel = RTNeural::ModelT< + float, NUM_FREQ_IN, NUM_FREQ_OUT, + RTNeural::Conv2DT, + RTNeural::ReLuActivationT, + RTNeural::Conv2DT, + RTNeural::SigmoidActivationT>; + + using CnnOnsetInputModel = RTNeural::ModelT< + float, NUM_FREQ_IN * NUM_HARMONICS, 32 * NUM_FREQ_OUT, + RTNeural::Conv2DT, + RTNeural::ReLuActivationT>; + + using CnnOnsetOutputModel = RTNeural::ModelT< + float, 33 * NUM_FREQ_OUT, NUM_FREQ_OUT, + RTNeural::Conv2DT, + RTNeural::SigmoidActivationT>; + + CnnContourModel cnn_contour; + CnnNoteModel cnn_note; + CnnOnsetInputModel cnn_onset_input; + CnnOnsetOutputModel cnn_onset_output; +}; diff --git a/cpp/source/pitch_detector.cpp b/cpp/source/pitch_detector.cpp new file mode 100644 index 0000000..33ac736 --- /dev/null +++ b/cpp/source/pitch_detector.cpp @@ -0,0 +1,98 @@ + +#include "pitch_detector.h" + +PitchDetector::PitchDetector(PitchDetectorModelFiles mf) + : features_calculator(mf.features_model_ort), + pitch_cnn(mf.cnn_contour_model_json, mf.cnn_note_model_json, + mf.cnn_onset_1_model_json, mf.cnn_onset_2_model_json) {} + +void PitchDetector::reset() { + pitch_cnn.reset(); + contours_posteriorgrams.clear(); + notes_posteriorgrams.clear(); + onsets_posteriorgrams.clear(); + note_events.clear(); + + num_frames = 0; +} + +void PitchDetector::set_parameters(float note_sensibility, + float split_sensibility, + float min_note_duration_ms) { + convert_params.frame_threshold = 1.0f - note_sensibility; + convert_params.onset_threshold = 1.0f - split_sensibility; + + convert_params.min_note_len_frames = static_cast( + std::round(min_note_duration_ms * FFT_HOP / BASIC_PITCH_SAMPLE_RATE)); + + convert_params.pitch_bend = MultiPitchBend; + convert_params.melodia_trick = true; + convert_params.infer_onsets = true; +} + +void PitchDetector::transcribe_to_midi(float *audio, int num_samples) { + const float *stacked_cqt = + features_calculator.compute_features(audio, num_samples, num_frames); + + onsets_posteriorgrams.resize(num_frames, + std::vector(NUM_FREQ_OUT, 0.0f)); + notes_posteriorgrams.resize(num_frames, + std::vector(NUM_FREQ_OUT, 0.0f)); + contours_posteriorgrams.resize(num_frames, + std::vector(NUM_FREQ_IN, 0.0f)); + + pitch_cnn.reset(); + + const size_t num_lh_frames = PitchCnn::num_frames_lookahead(); + + std::vector zero_stacked_cqt(NUM_HARMONICS * NUM_FREQ_IN, 0.0f); + + // Run the CNN with 0 input and discard output (only for num_lh_frames) + for (int i = 0; i < num_lh_frames; i++) { + pitch_cnn.frame_inference( + zero_stacked_cqt.data(), contours_posteriorgrams[0], + notes_posteriorgrams[0], onsets_posteriorgrams[0]); + } + + // Run the CNN with real inputs and discard outputs (only for num_lh_frames) + for (size_t frame_idx = 0; frame_idx < num_lh_frames; frame_idx++) { + pitch_cnn.frame_inference( + stacked_cqt + frame_idx * NUM_HARMONICS * NUM_FREQ_IN, + contours_posteriorgrams[0], notes_posteriorgrams[0], + onsets_posteriorgrams[0]); + } + + // Run the CNN with real inputs and correct outputs + for (size_t frame_idx = num_lh_frames; frame_idx < num_frames; + frame_idx++) { + pitch_cnn.frame_inference( + stacked_cqt + frame_idx * NUM_HARMONICS * NUM_FREQ_IN, + contours_posteriorgrams[frame_idx - num_lh_frames], + notes_posteriorgrams[frame_idx - num_lh_frames], + onsets_posteriorgrams[frame_idx - num_lh_frames]); + } + + // Run end with zeroes as input and last frames as output + for (size_t frame_idx = num_frames; frame_idx < num_frames + num_lh_frames; + frame_idx++) { + pitch_cnn.frame_inference( + zero_stacked_cqt.data(), + contours_posteriorgrams[frame_idx - num_lh_frames], + notes_posteriorgrams[frame_idx - num_lh_frames], + onsets_posteriorgrams[frame_idx - num_lh_frames]); + } + + note_events = + notes_creator.convert(notes_posteriorgrams, onsets_posteriorgrams, + contours_posteriorgrams, convert_params); +} + +void PitchDetector::update_midi() { + note_events = + notes_creator.convert(notes_posteriorgrams, onsets_posteriorgrams, + contours_posteriorgrams, convert_params); +} + +const std::vector &PitchDetector::latest_note_events() const { + return note_events; +} diff --git a/cpp/source/pitch_detector.h b/cpp/source/pitch_detector.h new file mode 100644 index 0000000..2cd57a0 --- /dev/null +++ b/cpp/source/pitch_detector.h @@ -0,0 +1,70 @@ +#pragma once + +#include "features.h" +#include "notes.h" +#include "pitch_cnn.h" + +struct PitchDetectorModelFiles { + BinaryBlob features_model_ort; + BinaryBlob cnn_contour_model_json; + BinaryBlob cnn_note_model_json; + BinaryBlob cnn_onset_1_model_json; + BinaryBlob cnn_onset_2_model_json; +}; + +class PitchDetector { + public: + explicit PitchDetector(PitchDetectorModelFiles model_files); + + /** + * Resets all states of model, clear the posteriorgrams vector computed by + * the CNN and the note event vector. + */ + void reset(); + + /** + * Set parameters for next transcription or midi update. + * @param note_sensibility Note sensibility threshold (0.05, 0.95). Higher + * gives more notes. + * @param split_sensibility Split sensibility threshold (0.05, 0.95). + * Higher will split note more, lower will merge close notes with same pitch + * @param min_note_duration_ms Minimum note duration to keep in ms. + */ + void set_parameters(float note_sensibility, float split_sensibility, + float min_note_duration_ms); + + /** + * Transcribe the input audio. The note event vector can be obtained after + * this with latest_note_events + * @param audio Pointer to raw audio (must be at 22050 Hz) + * @param num_samples Number of input samples available. + */ + void transcribe_to_midi(float *audio, int num_samples); + + /** + * Function to call to update the midi transcription with new parameters. + * The whole Features + CNN is not rerun for this. Only Notes::Convert is. + */ + void update_midi(); + + /** + * @return Note event vector. + */ + [[nodiscard]] const std::vector &latest_note_events() const; + + private: + // Posteriorgrams vector + std::vector> contours_posteriorgrams; + std::vector> notes_posteriorgrams; + std::vector> onsets_posteriorgrams; + + std::vector note_events; + + Notes::ConvertParams convert_params; + + size_t num_frames = 0; + + Features features_calculator; + PitchCnn pitch_cnn; + Notes notes_creator; +}; diff --git a/model_data/cnn_contour_model.json b/model_data/cnn_contour_model.json new file mode 100644 index 0000000..1aa9f77 --- /dev/null +++ b/model_data/cnn_contour_model.json @@ -0,0 +1,10327 @@ +{ + "in_shape": [ + 1, + null, + 264, + 8 + ], + "layers": [ + { + "type": "conv2d", + "activation": "relu", + "shape": [ + 1, + null, + 264, + 8 + ], + "kernel_size_time": 3, + "kernel_size_feature": 39, + "dilation": 1, + "strides": 1, + "num_filters_in": 8, + "num_features_in": 264, + "num_filters_out": 8, + "padding": "same", + "weights": [ + [ + [ + [ + [ + 0.022235464304685593, + 0.12644557654857635, + -0.019513731822371483, + 0.008993071503937244, + 0.005676493048667908, + -0.03184245526790619, + -0.003874695161357522, + 0.0017621004953980446 + ], + [ + -0.05232696980237961, + 0.05170194432139397, + -0.006704402156174183, + 0.061710067093372345, + -0.003483690321445465, + -0.021386953070759773, + 0.004079383332282305, + -0.04041877016425133 + ], + [ + 0.013914952985942364, + 0.03777508810162544, + -0.00270700897090137, + 0.07291053235530853, + 0.02247735485434532, + -0.013676331378519535, + 0.0036198899615556, + 0.01919560693204403 + ], + [ + 0.004582306835800409, + -0.025379642844200134, + -0.02947649545967579, + -0.024576930329203606, + 0.15691761672496796, + -0.02018500491976738, + -0.007045423146337271, + 0.01869312860071659 + ], + [ + -0.025012051686644554, + -0.041520364582538605, + 0.04374866560101509, + -0.03835153579711914, + -0.025467531755566597, + -0.002976842690259218, + -0.008783360943198204, + 0.060937389731407166 + ], + [ + 0.003583863377571106, + -0.02184070274233818, + -0.002791644772514701, + 0.05034444108605385, + 0.013469302095472813, + -0.012055132538080215, + -0.006561734713613987, + 0.006368257571011782 + ], + [ + -0.016420934349298477, + -0.029597068205475807, + -0.045799996703863144, + -0.023617858067154884, + 0.0018877382390201092, + -0.017183998599648476, + -0.0007590560126118362, + -0.0063958303071558475 + ], + [ + -0.037002015858888626, + -0.03119487129151821, + 0.0033363052643835545, + -0.05453155189752579, + -0.008176961913704872, + 0.01803756132721901, + 0.002405173610895872, + 0.07108523696660995 + ] + ], + [ + [ + 0.015560653991997242, + -0.028215713798999786, + -0.01019179169088602, + -0.006182027980685234, + 0.042752284556627274, + 0.00378150655888021, + -0.006398215889930725, + -0.006785248406231403 + ], + [ + -0.017630990594625473, + 0.03120465762913227, + 0.005011255387216806, + 0.0847846046090126, + -0.007034486159682274, + 0.004546181298792362, + 0.003564009442925453, + -0.040373120456933975 + ], + [ + 0.03380727767944336, + 0.00465942919254303, + -0.04390568286180496, + 0.02688531018793583, + 0.0508088655769825, + -0.028628448024392128, + -0.0012356945080682635, + -0.01194258127361536 + ], + [ + 0.029846712946891785, + -0.01329704187810421, + -0.019763626158237457, + 0.07735968381166458, + 0.1271095722913742, + 0.02257220260798931, + -0.002953483024612069, + -0.013235040009021759 + ], + [ + -0.0010791976237669587, + -0.0008485896978527308, + 0.01629459299147129, + 0.004993936512619257, + -0.0030903357546776533, + -0.001869024010375142, + 0.003238455858081579, + 0.03629472479224205 + ], + [ + -0.0013478194596245885, + -0.01382285077124834, + -0.01214813906699419, + 0.030711371451616287, + 0.05905970185995102, + 0.010752944275736809, + 0.000265252310782671, + -0.023287836462259293 + ], + [ + -0.0010589660378172994, + -0.0281875841319561, + -0.018244905397295952, + 0.06000158190727234, + 0.06102447956800461, + -0.01336828526109457, + -0.0006791662890464067, + -0.01892756298184395 + ], + [ + -0.03647073358297348, + -0.008094938471913338, + -0.0029176692478358746, + -0.05202382057905197, + 0.04304306209087372, + 0.008528396487236023, + 0.008362235501408577, + -0.04738091677427292 + ] + ], + [ + [ + -0.016823263838887215, + -0.004366897977888584, + -0.01823221705853939, + -0.037581443786621094, + 0.02694634348154068, + -0.017024731263518333, + 0.003985974472016096, + 0.0018107679206877947 + ], + [ + -0.011843329295516014, + 0.07504546642303467, + -0.01685096137225628, + 0.012750407680869102, + -0.022838294506072998, + 0.005926860496401787, + 0.0025199870578944683, + -0.0424792654812336 + ], + [ + 0.011060439981520176, + 0.058556199073791504, + -0.019469786435365677, + 0.036385055631399155, + 0.013489220291376114, + 0.0001548125728731975, + 0.0025923089124262333, + -0.004607853014022112 + ], + [ + 0.027755344286561012, + 0.029301518574357033, + 0.02607894130051136, + -0.0007426803931593895, + 0.047103673219680786, + 0.029597340151667595, + -0.0028491104021668434, + 0.03242543712258339 + ], + [ + -0.01581093668937683, + -0.016657091677188873, + 0.02387949638068676, + -0.009551185183227062, + -0.08178254216909409, + -0.006872786208987236, + 0.006394826341420412, + 0.10345522314310074 + ], + [ + -0.00016978765779640526, + -0.025133000686764717, + 0.01541024912148714, + -0.07947726547718048, + 0.00773949921131134, + 0.023387834429740906, + 0.00045220874017104506, + 0.04416127875447273 + ], + [ + 0.009047816507518291, + -0.006677203346043825, + 0.038462236523628235, + -0.05021427571773529, + 0.031809575855731964, + 0.004782309755682945, + -0.0027064906898885965, + -0.008594758808612823 + ], + [ + -0.013260701671242714, + -0.018810201436281204, + 0.011797698214650154, + 0.029345015063881874, + -0.023170992732048035, + 0.024784306064248085, + 0.007895532064139843, + -0.018747635185718536 + ] + ], + [ + [ + 0.0057707056403160095, + -0.0204930417239666, + 0.002769286511465907, + 0.010132224299013615, + 0.02334810607135296, + -0.010387936607003212, + -0.0006680868100374937, + 0.002129195723682642 + ], + [ + -0.013970589265227318, + -0.03278077766299248, + 0.010115734301507473, + 0.014573562890291214, + 0.002545877592638135, + -0.0030834111385047436, + -0.0009585557272657752, + -0.012784413993358612 + ], + [ + -0.0007548778085038066, + -0.06416552513837814, + -0.026276277378201485, + 0.060121145099401474, + -0.028378328308463097, + -0.05593034252524376, + 0.0012310013407841325, + -0.05229663476347923 + ], + [ + 0.033074457198381424, + 0.035842038691043854, + -0.014351144433021545, + 0.01621762476861477, + 0.0057068620808422565, + -0.012334870174527168, + -0.004315447062253952, + -0.010443567298352718 + ], + [ + -0.03354040905833244, + 0.022786710411310196, + 0.02577042579650879, + -0.02929891273379326, + -0.07407773286104202, + 0.014297251589596272, + 0.011030596680939198, + 0.02959544211626053 + ], + [ + -0.02282162569463253, + -0.005241031292825937, + -0.017921118065714836, + 0.008651603013277054, + 0.019511127844452858, + -0.0030766159761697054, + -0.007739419117569923, + 0.01616954244673252 + ], + [ + 0.0031913078855723143, + 0.0009484397014603019, + -0.03610454872250557, + 0.03282289579510689, + 0.003820748534053564, + -0.013024115934967995, + 0.0011526633752509952, + -0.03325885906815529 + ], + [ + 0.027511175721883774, + 0.0029972747433930635, + 0.00570986932143569, + -0.035369873046875, + -0.008223328739404678, + 0.023436594754457474, + -0.002204890362918377, + 0.03487518057227135 + ] + ], + [ + [ + 0.011303921230137348, + 0.028303783386945724, + 0.010019144043326378, + 0.02747066505253315, + -0.02193966880440712, + 0.0018709165742620826, + -0.006884337402880192, + -0.007487744092941284 + ], + [ + -0.003547257510945201, + -0.0032532508485019207, + 0.030139915645122528, + -0.04061159864068031, + -0.015734415501356125, + 0.015703555196523666, + -3.3762673410819843e-05, + 0.0008010396850295365 + ], + [ + 0.004342515487223864, + -0.022638238966464996, + 4.755840927828103e-05, + 0.058410074561834335, + -0.025339830666780472, + -0.04429657384753227, + 0.007314715534448624, + -0.019359422847628593 + ], + [ + 0.026940319687128067, + 0.04886886477470398, + -0.025590738281607628, + -0.00377338076941669, + 0.015572890639305115, + -0.018565692007541656, + -0.0016691256314516068, + -0.03703920915722847 + ], + [ + -0.04334361478686333, + -0.025176821276545525, + 0.07419151812791824, + -0.04973282292485237, + -0.07073139399290085, + -0.02166164480149746, + 0.013029152527451515, + -0.059011153876781464 + ], + [ + -0.039386872202157974, + 0.018117057159543037, + -0.00576524855569005, + -0.004947022069245577, + -0.039579689502716064, + 0.023693304508924484, + 0.002464504912495613, + 0.014489566907286644 + ], + [ + -0.015139085240662098, + 0.008358307182788849, + -0.024858159944415092, + 0.018372707068920135, + 0.03260691836476326, + 0.020735299214720726, + -0.003381146816536784, + 0.007735520601272583 + ], + [ + 0.00820154044777155, + -0.04142729938030243, + -0.025799978524446487, + -0.02855108678340912, + 0.03330245614051819, + 0.0038844163063913584, + -0.0030980417504906654, + -0.04071376472711563 + ] + ], + [ + [ + 0.007889635860919952, + 0.04295783489942551, + 0.0034598747733980417, + -0.05868241935968399, + 0.011131289415061474, + -0.011307686567306519, + 0.0051597352139651775, + 0.011460067704319954 + ], + [ + -0.01667891815304756, + 0.033943142741918564, + 0.0141826206818223, + -0.02169637754559517, + 0.025603437796235085, + 0.03426206856966019, + -0.0015753483166918159, + 0.005207948852330446 + ], + [ + 0.010059953667223454, + 0.002121220575645566, + -0.00618642196059227, + 0.02929786778986454, + 0.039950180798769, + 0.008554732427001, + -0.0004180255637038499, + 0.006468053907155991 + ], + [ + 0.010246681980788708, + 0.02913084626197815, + -0.003997581545263529, + -0.029581496492028236, + 0.0448671355843544, + -0.027189400047063828, + 0.005028913728892803, + 0.03533196076750755 + ], + [ + 0.034569788724184036, + 0.006752095650881529, + -0.0047640735283494, + -0.06725426763296127, + -0.032103702425956726, + 0.008698106743395329, + -0.00019600741507019848, + 0.044467389583587646 + ], + [ + -0.006730103399604559, + -0.02291121892631054, + -0.007513339165598154, + -0.04208074137568474, + -0.035711705684661865, + 0.011442085728049278, + -0.0021993762347847223, + 0.07475803047418594 + ], + [ + -0.0165804922580719, + -0.028416041284799576, + 0.03870989382266998, + -0.03871094807982445, + -0.012425223365426064, + 0.05496881902217865, + -0.005223952233791351, + 0.017976747825741768 + ], + [ + 0.0033240318298339844, + -0.018295997753739357, + -0.011653776280581951, + 0.05221997946500778, + -0.005206412635743618, + -0.010865059681236744, + -0.0013333753449842334, + -0.03887780383229256 + ] + ], + [ + [ + 0.01299725566059351, + -0.009790003299713135, + 0.010116975754499435, + -0.08255843073129654, + 0.008512875065207481, + -0.01789231412112713, + -0.003925927449017763, + 0.006162574049085379 + ], + [ + -0.0079413540661335, + -0.019605783745646477, + 0.021434606984257698, + -0.0029194799717515707, + -0.011883272789418697, + -0.017675170674920082, + 0.0019800704903900623, + -0.023192845284938812 + ], + [ + 0.03595408424735069, + -0.038897547870874405, + -0.0005803395179100335, + 0.025954095646739006, + 0.02673749066889286, + -0.011774351820349693, + -0.0026443200185894966, + -0.017563695088028908 + ], + [ + 0.009468981996178627, + 0.004766495898365974, + -0.012855788692831993, + -0.02593761868774891, + 0.04314328730106354, + -0.037367526441812515, + 0.00533562246710062, + -0.031118465587496758 + ], + [ + 0.00359335052780807, + -0.07114684581756592, + -0.0770656168460846, + -0.007933095097541809, + 0.05640508607029915, + -0.023698067292571068, + -0.0034948838874697685, + -0.011824805289506912 + ], + [ + -0.007358294911682606, + 0.0057081240229308605, + -0.008933493867516518, + 0.08766347914934158, + -0.015428909100592136, + 0.019965684041380882, + 0.004400032572448254, + -0.00037128786789253354 + ], + [ + 0.013578114099800587, + -0.011762567795813084, + -0.004543669056147337, + 0.024814430624246597, + -0.03604408726096153, + -0.012372205033898354, + -0.0006603982183150947, + 0.010370751842856407 + ], + [ + 0.018318068236112595, + -0.0069355713203549385, + 0.020939422771334648, + -0.02170470543205738, + -0.001145902439020574, + 0.010214881040155888, + -0.007656617555767298, + 0.01514099445194006 + ] + ], + [ + [ + -0.02564692497253418, + -0.0009123572381213307, + 0.024494672194123268, + -0.0028341023717075586, + -0.03667068108916283, + 0.0023433479946106672, + -0.0034248409792780876, + 0.013042906299233437 + ], + [ + -0.017497530207037926, + -0.02337179332971573, + 0.009679537266492844, + 0.01005761232227087, + -0.02555718459188938, + 0.024409744888544083, + -0.006808471865952015, + 0.0022560455836355686 + ], + [ + 0.044981662184000015, + 0.0038882421795278788, + 0.006299558561295271, + -0.004904119297862053, + -0.012430408969521523, + 0.019306616857647896, + -0.0014685897622257471, + -0.047424767166376114 + ], + [ + -0.00535705778747797, + 0.04303525388240814, + -0.01672915555536747, + 0.013650781475007534, + 0.01971958577632904, + -0.02712901122868061, + 0.0031558817718178034, + -0.09046825021505356 + ], + [ + -0.003289637388661504, + -0.02178281731903553, + -0.06271251291036606, + 0.04729741811752319, + 0.013853282667696476, + -0.00492807338014245, + -0.0020696590654551983, + -0.04912311211228371 + ], + [ + 9.613043221179396e-05, + -0.008868562988936901, + 0.04326125234365463, + 0.052340563386678696, + 0.027305399999022484, + -0.01956017315387726, + 0.005736886989325285, + -0.047495901584625244 + ], + [ + 0.006131057161837816, + 0.034303441643714905, + -0.0021111066453158855, + 0.034056104719638824, + -0.014085622504353523, + 0.02447618544101715, + -0.0025021263863891363, + 0.06804835051298141 + ], + [ + -0.025150826200842857, + -0.024552443996071815, + -0.007870230823755264, + -0.008334384299814701, + 0.004533487372100353, + -0.01332863699644804, + -0.0066953375935554504, + 0.009205751121044159 + ] + ], + [ + [ + -0.006551462225615978, + 0.011475191451609135, + -0.02238963358104229, + -0.05396297946572304, + -0.030397789552807808, + -0.018702758476138115, + -0.0031281281262636185, + 0.0005271499394439161 + ], + [ + -0.01701163686811924, + 0.0008293474675156176, + -0.00015612051356583834, + -0.0791376382112503, + -0.006719175260514021, + 0.018299249932169914, + 0.00018336280481889844, + -0.003697182983160019 + ], + [ + -0.017391664907336235, + -0.0120485695078969, + 0.041576217859983444, + -0.0493382103741169, + 0.013750803656876087, + -0.0041121309623122215, + -0.0033255063463002443, + 0.018538927659392357 + ], + [ + 0.00025515182642266154, + 0.0345531702041626, + -0.012106959708034992, + 0.006450527347624302, + -0.029608644545078278, + -0.02260645292699337, + 0.007478002924472094, + -0.004361065104603767 + ], + [ + 0.015987124294042587, + 0.011847319081425667, + 0.019011301919817924, + -0.020751236006617546, + 0.019520243629813194, + 0.002644637832418084, + -0.00025139813078567386, + 0.0424727201461792 + ], + [ + 0.027873557060956955, + 0.006367124617099762, + 0.030444661155343056, + 0.022303221747279167, + 0.010554761625826359, + 0.0338013619184494, + 0.00545452069491148, + 0.025910882279276848 + ], + [ + -0.027791636064648628, + -0.017398007214069366, + 0.035113804042339325, + -0.0086144944652915, + -0.01999053731560707, + 0.004517904948443174, + -0.0020812894217669964, + 0.05898110941052437 + ], + [ + -0.0097757987678051, + -0.03094254434108734, + -0.013558193109929562, + -0.053676143288612366, + 0.012116537429392338, + 0.008779252879321575, + 0.001232703449204564, + 0.027316709980368614 + ] + ], + [ + [ + -0.019064312800765038, + -0.032102763652801514, + -0.023698074743151665, + 0.026869015768170357, + -0.007107054814696312, + -0.01686258055269718, + 5.602967576123774e-05, + -0.0034729645121842623 + ], + [ + -0.039511580020189285, + -0.03923137113451958, + -0.029749397188425064, + 0.043385181576013565, + -0.010539100505411625, + -0.011326381005346775, + 0.004066178109496832, + -0.02529854327440262 + ], + [ + -0.024141840636730194, + -0.03681115433573723, + -0.017411483451724052, + 0.004290698561817408, + 0.07484297454357147, + -0.04703889042139053, + 0.002497951267287135, + -0.016598807647824287 + ], + [ + 0.030259234830737114, + -0.05595444142818451, + 0.03314133733510971, + 0.04178731143474579, + -0.0014475437346845865, + -0.023959040641784668, + 0.006222892086952925, + -0.003452085889875889 + ], + [ + 0.031579796224832535, + -0.019805708900094032, + -0.04957373067736626, + 0.0216908548027277, + 0.01818738505244255, + -0.004228613805025816, + -0.0005087238387204707, + -0.04097728058695793 + ], + [ + 0.021468600258231163, + -0.029785161837935448, + -0.04685544967651367, + -0.004856846295297146, + -0.001649131765589118, + -0.02552623301744461, + -0.003429814474657178, + -0.01705152913928032 + ], + [ + -0.02311214990913868, + 0.00046091637341305614, + 0.02002202719449997, + -0.04629921540617943, + -0.05296372249722481, + 0.0029424650128930807, + 0.006842109840363264, + -0.0407988615334034 + ], + [ + 0.0023608580231666565, + -0.0180065780878067, + -0.00627207662910223, + -0.0013127799611538649, + -0.009018034674227238, + 0.005110245198011398, + 0.003237388329580426, + 0.0329466387629509 + ] + ], + [ + [ + -0.01835530623793602, + -0.008089987561106682, + 0.003993176855146885, + 0.04339226707816124, + -0.031178642064332962, + -0.028623133897781372, + 0.0012194417649880052, + 0.005541378632187843 + ], + [ + -0.012605872005224228, + -0.030721288174390793, + -0.017791898921132088, + -0.02779308892786503, + -0.023006007075309753, + 0.025875940918922424, + 0.0005424357368610799, + -0.023963844403624535 + ], + [ + -0.0084352046251297, + 0.06838401407003403, + -0.04183843731880188, + 0.09145063161849976, + -0.004947497975081205, + -0.0034526053350418806, + 0.0006924367626197636, + -0.04278752580285072 + ], + [ + 0.0008905791328288615, + -0.003864163998514414, + 0.017941966652870178, + 0.034392647445201874, + -0.028962289914488792, + -0.02011922374367714, + 0.006482762284576893, + -0.03312624245882034 + ], + [ + 0.003818195080384612, + -0.010422424413263798, + -0.07099077850580215, + 0.024606801569461823, + -0.03701210394501686, + 0.00016984976537059993, + 0.0009947471553459764, + -0.09914976358413696 + ], + [ + 0.029687054455280304, + -0.016776321455836296, + -0.03506264090538025, + 0.04352445900440216, + 0.020676666870713234, + -0.033677052706480026, + 0.000619731203187257, + -0.006308916490525007 + ], + [ + 0.0007058251067064703, + -0.007873846217989922, + 0.010244021192193031, + -0.020188527181744576, + 0.029879268258810043, + -0.007714883890002966, + 0.004534406587481499, + 0.0005578184500336647 + ], + [ + 0.007710936013609171, + 0.02216540463268757, + -0.030730951577425003, + 0.041000768542289734, + -0.037250541150569916, + -0.012742152437567711, + 0.003823777660727501, + -0.00740682240575552 + ] + ], + [ + [ + -0.00702858017757535, + 0.005512475501745939, + -0.0235478263348341, + 0.02965281344950199, + -0.013506203889846802, + -0.012077094055712223, + 0.0023321250919252634, + 0.010860583744943142 + ], + [ + -0.013708779588341713, + 0.00023421405057888478, + 0.00047265092143788934, + -0.011336290277540684, + -0.0059189763851463795, + 0.03353799507021904, + -0.004360864404588938, + 0.00639130687341094 + ], + [ + 8.224845805671066e-05, + 0.03043152019381523, + 0.026983879506587982, + -0.02216101810336113, + -0.02136177383363247, + 0.020617762580513954, + -0.0012498976429924369, + 0.02961159497499466 + ], + [ + 0.008031469769775867, + -0.018099892884492874, + 0.023884059861302376, + -0.08260664343833923, + 0.0811632052063942, + 0.011863232590258121, + 0.0011160110589116812, + 0.025238581001758575 + ], + [ + 0.0017406046390533447, + -0.004376810975372791, + -0.019079366698861122, + -0.03884325921535492, + 0.01838478073477745, + -0.04414737597107887, + 0.0007696285028941929, + 0.007262398488819599 + ], + [ + 0.027545688673853874, + 0.023495176807045937, + 0.028669534251093864, + 0.01729307696223259, + 0.015200896188616753, + -0.007549470756202936, + -0.0002313519362360239, + 0.019949685782194138 + ], + [ + 0.0383465401828289, + -0.015054803341627121, + 0.0026421938091516495, + -0.0036642730701714754, + 0.03461287543177605, + 0.008846827782690525, + -0.002388979075476527, + 0.02814342826604843 + ], + [ + 0.003012412926182151, + -0.02310941554605961, + 0.04856410622596741, + 0.020769763737916946, + -0.03782738372683525, + 0.0015737027861177921, + 0.0017553620273247361, + -0.005003652535378933 + ] + ], + [ + [ + 0.0028403110336512327, + -0.0267125703394413, + -0.020615002140402794, + -0.003283717203885317, + -0.009698173962533474, + -0.030504990369081497, + 0.005806685891002417, + -0.006075989920645952 + ], + [ + -0.007253296207636595, + -0.04015545919537544, + 0.027508161962032318, + -0.015199803747236729, + -0.05051993578672409, + -0.004159131553024054, + 0.004413182381540537, + 0.01836898922920227 + ], + [ + -0.026632076129317284, + -0.07041507959365845, + 0.026808811351656914, + -0.016850048676133156, + -0.00822350475937128, + 0.0030515454709529877, + 0.0005790474824607372, + -0.020466642454266548 + ], + [ + 0.0018812237540259957, + -0.002007627161219716, + 0.011842492036521435, + -0.04964768514037132, + 0.07358335703611374, + -0.016321491450071335, + -0.008585081435739994, + -0.03084101527929306 + ], + [ + 0.005681124981492758, + -0.024501711130142212, + 0.015316341072320938, + 0.03402228280901909, + 0.01711939461529255, + -0.00587298022583127, + -0.00042709027184173465, + 0.019185518845915794 + ], + [ + 0.01424433570355177, + 0.019934706389904022, + -0.02005893550813198, + -0.0025457541923969984, + 0.007962919771671295, + -0.043680839240550995, + -0.0009455169201828539, + -0.017988944426178932 + ], + [ + 0.02490965835750103, + -0.0461127944290638, + -0.028151394799351692, + -0.022954236716032028, + -0.010462426580488682, + -0.00955620501190424, + -0.001648438978008926, + -0.024530455470085144 + ], + [ + 0.04222862049937248, + -0.021635083481669426, + 0.0189148411154747, + -0.01998710259795189, + -0.014566706493496895, + 0.01279832236468792, + -0.004455898888409138, + 0.007094039581716061 + ] + ], + [ + [ + -0.005113836843520403, + -0.03684377297759056, + -0.0056229704059660435, + 0.031198887154459953, + -0.030521210283041, + -0.019159968942403793, + 0.0024523038882762194, + -0.00649395352229476 + ], + [ + -0.013492259196937084, + -0.004579652566462755, + -0.0036230687983334064, + 0.0361771360039711, + -0.07502341270446777, + 0.0427078977227211, + -0.008125923573970795, + 0.025255661457777023 + ], + [ + 0.008091756142675877, + -0.0062435343861579895, + 0.0002125377650372684, + 0.03751135617494583, + -0.06228489428758621, + 0.017414934933185577, + -0.0024647319223731756, + -0.03216655179858208 + ], + [ + 0.0014933438505977392, + 0.03805873915553093, + -0.012956496328115463, + 0.05355922132730484, + -0.007566344924271107, + -0.0023036671336740255, + 0.0013013840653002262, + -0.040997155010700226 + ], + [ + 0.00970747321844101, + 0.008139340206980705, + 0.007930705323815346, + -0.0058319540694355965, + -0.027623048052191734, + -0.004362271632999182, + 0.0018949653021991253, + -0.010745068080723286 + ], + [ + 0.009179162792861462, + 0.014367690309882164, + -0.018432362005114555, + -0.009120112285017967, + -0.0010850197868421674, + -0.014168069697916508, + 0.0014544581063091755, + -0.0019432518165558577 + ], + [ + 0.012165888212621212, + 0.014038724824786186, + -0.005503388121724129, + 0.06495963037014008, + 0.014887501485645771, + -0.011752082966268063, + 0.001974117709323764, + -0.0365934818983078 + ], + [ + 0.018843118101358414, + -0.03378033638000488, + -0.06614726036787033, + -0.03885936364531517, + -0.016586733981966972, + 0.004830543417483568, + -0.0008090520277619362, + -0.02722693793475628 + ] + ], + [ + [ + 0.011096267029643059, + 0.002463543089106679, + -0.03369567543268204, + 0.025326287373900414, + -0.017030129209160805, + -0.025938833132386208, + -0.0005355315515771508, + -0.002528565935790539 + ], + [ + -0.07193358987569809, + 0.04789124056696892, + 0.03699028864502907, + 0.016608674079179764, + -0.05257345736026764, + 0.04768119379878044, + -0.003883429802954197, + 0.07116680592298508 + ], + [ + -0.021404290571808815, + 0.04720957577228546, + 0.03245756775140762, + -0.018813764676451683, + -0.0671902447938919, + 0.0338742733001709, + 0.002387960208579898, + 0.07454796135425568 + ], + [ + -0.0008500116528011858, + -0.011500389315187931, + -0.0018730086740106344, + 0.024664754047989845, + 0.02834327705204487, + 0.02641095593571663, + -0.00326456013135612, + 0.015561754815280437 + ], + [ + 0.02743368037045002, + -0.013530661351978779, + 0.021766429767012596, + -0.041475217789411545, + 0.05833788216114044, + 0.0037718508392572403, + -0.0006826737080700696, + 0.018615471199154854 + ], + [ + 0.009515209123492241, + -0.02395343966782093, + 0.028370752930641174, + -0.05109116807579994, + 0.04538363218307495, + -0.010927025228738785, + -0.0038037593476474285, + -0.007539236918091774 + ], + [ + 0.017294980585575104, + 0.022014044225215912, + 0.024777600541710854, + -0.021518561989068985, + 0.05194985121488571, + 0.0011628282954916358, + -0.0026660540606826544, + -0.008232304826378822 + ], + [ + -0.02059284597635269, + -0.008858388289809227, + -0.04237817972898483, + 0.08289200067520142, + 0.017494162544608116, + -0.0339827835559845, + -0.00645774370059371, + -0.036064475774765015 + ] + ], + [ + [ + -0.0017936640651896596, + -0.024200834333896637, + -0.05882785841822624, + 0.0011657659197226167, + -0.010709168389439583, + -0.018474487587809563, + 0.005439652595669031, + -0.04056774079799652 + ], + [ + 0.04473930224776268, + -0.029290365055203438, + 0.07042510062456131, + -0.016189919784665108, + -0.10109858959913254, + 0.019782941788434982, + -0.005963423755019903, + 0.008998609147965908 + ], + [ + -0.04267789050936699, + -0.004337817896157503, + 0.029328102245926857, + 0.03771814703941345, + -0.09369296580553055, + -0.010162025690078735, + -0.0017721661133691669, + 0.06113213673233986 + ], + [ + -0.007319124415516853, + -0.0230509452521801, + 0.014186984859406948, + 0.024228116497397423, + 0.029913710430264473, + -0.037697162479162216, + 0.002515278523787856, + 0.026720639318227768 + ], + [ + -0.025196591392159462, + 0.025278287008404732, + -0.014730632305145264, + 0.01803640089929104, + 0.0659201368689537, + -0.021524703130126, + -0.0030718576163053513, + -0.0018939422443509102 + ], + [ + 0.025813410058617592, + 0.004824167583137751, + 0.0013664207654073834, + 0.032371409237384796, + 0.04336687922477722, + -0.02109353430569172, + -0.0016540114302188158, + 0.0020546591840684414 + ], + [ + -0.004435519687831402, + -0.005118674132972956, + -0.010773041285574436, + 0.019072482362389565, + 0.009197943843901157, + -0.0033990442752838135, + -0.007563642226159573, + 0.011976007372140884 + ], + [ + 0.03284922242164612, + 0.01039752084761858, + 0.006667858920991421, + -0.0034051823895424604, + 0.03333090618252754, + -0.031377729028463364, + -0.003084589494392276, + 0.024296998977661133 + ] + ], + [ + [ + 0.030148455873131752, + -0.00864435639232397, + -0.05375289544463158, + -0.014680670574307442, + -0.020796896889805794, + -0.010513050481677055, + -0.0016474747098982334, + -0.06651037931442261 + ], + [ + 0.09882839769124985, + 0.02703351341187954, + 0.1489020735025406, + -0.08214478939771652, + -0.10652537643909454, + 0.07616814970970154, + 0.0035422558430582285, + 0.12067253887653351 + ], + [ + -0.00834409799426794, + 0.031742554157972336, + 0.018161652609705925, + -0.03539811447262764, + -0.08460931479930878, + 0.03173321112990379, + -0.0017724111676216125, + 0.10564067959785461 + ], + [ + 0.02007751353085041, + 0.0284567903727293, + 0.015325553715229034, + 0.05747886374592781, + -0.025592749938368797, + -0.0034981160424649715, + 0.010967481881380081, + -0.003012916771695018 + ], + [ + -0.03078330121934414, + 0.014911814592778683, + 0.0014165197499096394, + 0.027587739750742912, + 0.02573663927614689, + 0.019114622846245766, + 0.0007500678184442222, + -0.006231146864593029 + ], + [ + 0.030661262571811676, + 0.023174811154603958, + 0.0031534628942608833, + 0.015078706666827202, + 0.021301664412021637, + -0.023839561268687248, + 0.005871518049389124, + 0.042406920343637466 + ], + [ + -0.02105780318379402, + -0.028779448941349983, + -0.025709429755806923, + -0.0004717730334959924, + 0.018080782145261765, + -0.0354524701833725, + 0.006008810829371214, + -0.007720983121544123 + ], + [ + 0.05429144576191902, + -0.008666365407407284, + -0.03551860526204109, + 0.009427406825125217, + 0.02285725623369217, + -0.017079509794712067, + 0.00026889072614721954, + 0.02496388368308544 + ] + ], + [ + [ + 0.02781885489821434, + 0.0018768343143165112, + -0.039836522191762924, + -0.021861424669623375, + -0.023211324587464333, + -0.006453522946685553, + 0.004141750745475292, + -0.09007439017295837 + ], + [ + 0.004982838407158852, + 0.007989739067852497, + 0.08537696301937103, + -0.13103286921977997, + -0.13559892773628235, + -0.0731678158044815, + 0.0013012838317081332, + 0.15000535547733307 + ], + [ + -0.038516364991664886, + -0.03565213829278946, + 0.0013591994065791368, + -0.0613744743168354, + -0.05812767520546913, + -0.042250294238328934, + 0.007330593187361956, + 0.14563700556755066 + ], + [ + 0.0051372176967561245, + -0.005017885006964207, + -0.011037653312087059, + -0.06429912894964218, + -0.010301020927727222, + -0.014054377563297749, + 0.013740983791649342, + 0.0676840990781784 + ], + [ + -0.014096032828092575, + -0.025397853925824165, + -0.0049273185431957245, + -0.04990721866488457, + 0.00751075753942132, + -0.010869694873690605, + -0.001473587704822421, + 0.05941850319504738 + ], + [ + -0.028614502400159836, + -0.0038576717488467693, + 0.02520683966577053, + -0.04103272035717964, + 0.028035597875714302, + 0.0010174746857956052, + -0.002698564203456044, + 0.05821256712079048 + ], + [ + -0.0054826391860842705, + 0.0010778383584693074, + -0.026636548340320587, + -0.014158876612782478, + 0.03178582713007927, + 0.01879614032804966, + 0.0029575773514807224, + 0.021603316068649292 + ], + [ + -0.004924132954329252, + -0.04520997032523155, + -0.02424447610974312, + -0.025678567588329315, + 0.03774625062942505, + -0.023272186517715454, + -0.001842218916863203, + 0.06028072163462639 + ] + ], + [ + [ + 0.029509631916880608, + -0.04376767948269844, + -0.03909436613321304, + 0.017614202573895454, + -0.06183529645204544, + -0.07199552655220032, + -0.00214286963455379, + -0.03633756935596466 + ], + [ + -0.10305291414260864, + -0.04953385889530182, + 0.05717933177947998, + 0.012080973945558071, + -0.0004232772043906152, + -0.09002150595188141, + 0.020243467763066292, + 0.21153853833675385 + ], + [ + -0.01754043810069561, + -0.035948626697063446, + 0.013262792490422726, + 0.16174878180027008, + -0.0063409884460270405, + -0.0566931888461113, + 0.013227841816842556, + 0.06371674686670303 + ], + [ + -0.0080918213352561, + 0.015424764715135098, + 0.010038774460554123, + -0.061069078743457794, + -0.040020279586315155, + -0.027921613305807114, + 0.018687346950173378, + 0.018717996776103973 + ], + [ + 0.0190231092274189, + 0.00783687923103571, + -0.04061852768063545, + 0.05273864045739174, + 0.052126362919807434, + -0.02657187543809414, + 0.004607892595231533, + -0.0033029878977686167 + ], + [ + -0.0023713347036391497, + -0.007307725492864847, + 0.014031074941158295, + -0.020980075001716614, + 0.03876960650086403, + -0.014204996638000011, + 0.009711461141705513, + -0.04195787012577057 + ], + [ + 0.018701979890465736, + 0.010566899552941322, + -0.027094673365354538, + 0.08134369552135468, + -0.002072785748168826, + -0.028376508504152298, + 0.001953767379745841, + -0.03422284871339798 + ], + [ + -0.03244802728295326, + 0.01013082917779684, + 0.03250707685947418, + 0.009358251467347145, + 0.025600580498576164, + -0.02044057846069336, + -0.0010542672825977206, + 0.02102203108370304 + ] + ], + [ + [ + 0.017321303486824036, + -0.06413477659225464, + -0.06115972250699997, + 0.07949606329202652, + -0.04986269026994705, + -0.04505620896816254, + 0.0033408210147172213, + -0.014890485443174839 + ], + [ + -0.09125269949436188, + 0.07736203074455261, + 0.12280024588108063, + -0.023846304044127464, + 0.07942315191030502, + -0.11308924853801727, + 0.017987091094255447, + 0.025294525548815727 + ], + [ + -0.032439056783914566, + 0.006084774620831013, + 0.08589301258325577, + 0.10457293689250946, + 0.05005994439125061, + -0.07591217756271362, + 0.011012163944542408, + -0.08709149062633514 + ], + [ + -0.03284597396850586, + -0.030422713607549667, + 0.06616276502609253, + -0.08815494179725647, + -0.04062599316239357, + -0.03463836386799812, + 0.008589544333517551, + -0.06664149463176727 + ], + [ + -0.030295437201857567, + -0.02442793734371662, + 0.016200607642531395, + 0.03640361502766609, + -0.02871651016175747, + -0.02055424451828003, + 0.006568847224116325, + -0.04611688107252121 + ], + [ + 0.026517800986766815, + -0.01577404886484146, + 0.006866747979074717, + 0.02734300121665001, + -0.008837216533720493, + -0.006769601721316576, + 0.002073135692626238, + -0.020781852304935455 + ], + [ + 0.007285844534635544, + -0.016439635306596756, + 0.018294548615813255, + 0.05914950370788574, + -0.009468656964600086, + -0.0120975561439991, + 0.007334298919886351, + -0.007756736595183611 + ], + [ + 0.003266588319092989, + 0.01356316264718771, + 0.033725738525390625, + -0.0968233123421669, + 0.02488594688475132, + 0.01387367770075798, + 0.004182963166385889, + -0.07827442139387131 + ] + ], + [ + [ + -0.009028857573866844, + -0.040097612887620926, + -0.03335530683398247, + 0.031098786741495132, + -0.021318964660167694, + -0.035973504185676575, + 0.0021352949552237988, + -0.0055869463831186295 + ], + [ + -0.005789934657514095, + 0.16319429874420166, + 0.039049241691827774, + -0.08754780888557434, + 0.18935982882976532, + 0.07485946267843246, + 0.006714486982673407, + 0.0617864727973938 + ], + [ + 0.013323400169610977, + 0.08019065111875534, + 0.035635583102703094, + 0.026099583134055138, + 0.1721264123916626, + 0.050172895193099976, + 0.01221743505448103, + 0.057247281074523926 + ], + [ + 0.015249219723045826, + -0.01818089559674263, + -0.02721533179283142, + -0.056658387184143066, + 0.007047994993627071, + 0.01845673657953739, + 0.004721953067928553, + 0.020323367789387703 + ], + [ + 0.04382536560297012, + -0.019859984517097473, + 0.02667899988591671, + 0.034443777054548264, + 0.0021962022874504328, + 0.02478097751736641, + -0.0013193802442401648, + 0.0012128957314416766 + ], + [ + 0.037114907056093216, + -0.003309066640213132, + 0.005320486146956682, + -0.016965962946414948, + -0.026465080678462982, + 0.010018556378781796, + -0.0021883987355977297, + 0.01813485473394394 + ], + [ + 0.0456928014755249, + -0.011669783852994442, + 0.03657731041312218, + -0.01745733991265297, + -0.016790242865681648, + 0.02742769941687584, + 0.002379809506237507, + -0.004307745024561882 + ], + [ + 0.02736145816743374, + -0.007712895516306162, + -0.024750081822276115, + 0.02780979312956333, + 0.003106111893430352, + 0.003955588676035404, + -0.0009938975563272834, + 0.022406823933124542 + ] + ], + [ + [ + 0.006007181014865637, + -0.0793798640370369, + -0.022004736587405205, + 0.008776436559855938, + -0.006154397968202829, + -0.04735204204916954, + 0.003014405956491828, + 0.009456072002649307 + ], + [ + -0.042650096118450165, + -0.008920791558921337, + -0.04360422119498253, + -0.18445822596549988, + 0.24962477385997772, + -0.00669131800532341, + -0.0015378016978502274, + 0.054153140634298325 + ], + [ + -0.029509099200367928, + -0.024571465328335762, + -0.03434547409415245, + -0.07986897975206375, + 0.027085190638899803, + 0.002260953886434436, + -0.0012798354728147388, + -0.026897847652435303 + ], + [ + -0.00754946144297719, + -0.054637376219034195, + -0.08165226876735687, + -0.032315075397491455, + 0.04462827369570732, + -0.013978929258883, + 0.0009115959401242435, + -0.03236134722828865 + ], + [ + 0.012475861236453056, + -0.033302903175354004, + -0.046690307557582855, + -0.019278699532151222, + -0.005517739336937666, + -0.011918489821255207, + -0.0002506935561541468, + -0.029432734474539757 + ], + [ + 0.019501391798257828, + -0.03485596179962158, + -0.035716526210308075, + 0.02229304611682892, + -0.02720843069255352, + -0.009777804836630821, + -0.005110834259539843, + -0.03685935214161873 + ], + [ + 0.0030816690996289253, + -0.0034131009597331285, + -0.03789491206407547, + -0.06813221424818039, + -0.04504116624593735, + -0.009426170960068703, + -0.004116535652428865, + -0.019848033785820007 + ], + [ + 0.026778437197208405, + -0.033035676926374435, + -0.012619122862815857, + -0.04743068665266037, + 0.003595219226554036, + -0.007447108160704374, + -0.007843850180506706, + -0.0039643398486077785 + ] + ], + [ + [ + -0.0035392900463193655, + -0.005088335834443569, + -0.013706156983971596, + 0.04689578339457512, + 0.0019225148716941476, + -0.015270467847585678, + 0.0030583860352635384, + -0.004154577851295471 + ], + [ + 0.04130914434790611, + -0.09355935454368591, + -0.08720480650663376, + 0.08506705611944199, + 0.1390412598848343, + 0.02402966283261776, + 0.0016013052081689239, + 0.010080354288220406 + ], + [ + -0.00943001452833414, + -0.030709968879818916, + -0.045670416206121445, + 0.033716700971126556, + -0.03822609409689903, + 0.02853790670633316, + -0.0007508274866268039, + -0.041246719658374786 + ], + [ + 0.0010999365476891398, + 0.007578269578516483, + -0.051765259355306625, + 0.09290412068367004, + 0.02115662954747677, + -0.0027912924997508526, + 0.0006841446156613529, + -0.06701391190290451 + ], + [ + 0.007051353342831135, + 0.0073605007492005825, + -0.026751937344670296, + 0.037574686110019684, + -0.02326788194477558, + -0.010569948703050613, + 0.002994181588292122, + -0.01891464740037918 + ], + [ + -0.011359039694070816, + 0.0010105830151587725, + -0.0070452215149998665, + -0.001919457339681685, + -0.005338813178241253, + -0.02818641997873783, + -0.0017427279381081462, + -0.042424026876688004 + ], + [ + -0.016179488971829414, + -0.005342352669686079, + -0.028760675340890884, + 0.0002650187525432557, + -0.02017773501574993, + -0.02394545078277588, + -0.0014888664009049535, + -0.020623493939638138 + ], + [ + 0.010845501907169819, + -0.03710756078362465, + -0.04581858962774277, + 0.0009257964557036757, + -0.05303311347961426, + -0.012522363103926182, + 0.002940493170171976, + 0.0012283353134989738 + ] + ], + [ + [ + -0.01361575722694397, + 0.001788036897778511, + -0.008100580424070358, + -0.032479602843523026, + 0.0002521513670217246, + -0.017857279628515244, + -0.0006145825027488172, + -0.007156998384743929 + ], + [ + -0.009482594206929207, + 0.03651123121380806, + -0.0007460868218913674, + -0.09659106284379959, + 0.09153319150209427, + 0.04600735008716583, + -0.006763688288629055, + 0.01022733561694622 + ], + [ + -0.008568613789975643, + 0.019808340817689896, + 0.031919874250888824, + -0.08951947093009949, + -0.02277739904820919, + 0.021183816716074944, + 0.001014410168863833, + -0.004451190121471882 + ], + [ + 0.016587965190410614, + 0.03938861936330795, + 0.03249772638082504, + 0.01705648936331272, + 0.023173844441771507, + -0.0032108186278492212, + -0.0023149875923991203, + 0.018422551453113556 + ], + [ + 0.004334042780101299, + 0.02475845254957676, + 0.03137379139661789, + -0.05592537671327591, + 0.004248801153153181, + 0.002905499655753374, + 0.0012183854123577476, + -0.00802667997777462 + ], + [ + 0.024244964122772217, + 0.007999448105692863, + 0.030570337548851967, + -0.051721133291721344, + 0.04026414453983307, + -0.01367291808128357, + 0.0007309718057513237, + 0.025082049891352654 + ], + [ + 0.017571832984685898, + 0.042426206171512604, + 0.0202243123203516, + 0.04903385788202286, + 0.010459869168698788, + -0.017010398209095, + 0.0021308534778654575, + 0.00589166721329093 + ], + [ + -0.011219949461519718, + 0.03778315335512161, + 0.004707208834588528, + -0.009205994196236134, + -0.014284570701420307, + -0.0016406916547566652, + -0.0006578245083801448, + 0.046569060534238815 + ] + ], + [ + [ + -0.016376545652747154, + -0.039754290133714676, + -0.021503880620002747, + 0.05352792888879776, + -0.014503497630357742, + -0.0036725373938679695, + 0.0012732043396681547, + -0.026181170716881752 + ], + [ + -0.03353780135512352, + -0.03943168371915817, + -0.030919436365365982, + 0.03982216492295265, + 0.03917445242404938, + 0.0021502685267478228, + -0.006050342693924904, + 0.007355798967182636 + ], + [ + 0.013333536684513092, + -0.010897179134190083, + -0.03783715143799782, + -0.015298279002308846, + -0.021706996485590935, + 0.014799977652728558, + 0.0021620572078973055, + -0.035996370017528534 + ], + [ + 0.022118808701634407, + -0.007659084163606167, + -0.05516528710722923, + 0.06702879816293716, + 0.03846999257802963, + -0.02222575806081295, + -0.004068519454449415, + -0.06001220643520355 + ], + [ + 0.012962407432496548, + 0.01151991356164217, + -0.04321752116084099, + -0.027355166152119637, + 0.01429521944373846, + -0.03863951191306114, + -0.001678523258306086, + -0.03282380849123001 + ], + [ + -0.0282405037432909, + -0.007044041529297829, + -0.017288517206907272, + -0.042548295110464096, + -0.019121864810585976, + -0.004836145788431168, + -0.0066246348433196545, + 0.0052515179850161076 + ], + [ + 0.057624977082014084, + 0.007601036224514246, + -0.015514180064201355, + -0.008143983781337738, + -0.054190970957279205, + 0.01489365752786398, + 0.0017100468976423144, + 0.020674340426921844 + ], + [ + -0.026540720835328102, + -0.016407759860157967, + -0.007989992387592793, + -0.0634397566318512, + 0.01567765325307846, + -0.007900838740170002, + -0.0031799122225493193, + 0.05374807491898537 + ] + ], + [ + [ + 0.005898910108953714, + -0.021104956045746803, + -0.011627387255430222, + 0.004473726265132427, + -0.0006428448250517249, + 0.004197260364890099, + -0.001953550847247243, + -0.011679264716804028 + ], + [ + 0.0003372178180143237, + -0.03319251537322998, + -0.02542107366025448, + -0.021117208525538445, + 0.018732953816652298, + 0.03264530748128891, + -0.004858957603573799, + -0.012720385566353798 + ], + [ + -0.004182827193289995, + 0.007232206407934427, + -0.022011617198586464, + -0.01774243265390396, + -0.08121871948242188, + 0.014032304286956787, + 0.004277226980775595, + -0.04607727378606796 + ], + [ + -0.0038525015115737915, + 0.004936723504215479, + -0.0818343311548233, + 0.03130481392145157, + -0.007637481205165386, + -0.012133276090025902, + -0.0006358051323331892, + -0.11784104257822037 + ], + [ + -0.0012929674703627825, + 0.014758731238543987, + -0.02809973433613777, + 0.030513808131217957, + 0.011991468258202076, + 0.0024115913547575474, + -0.005955506581813097, + -0.017024915665388107 + ], + [ + -0.03182581439614296, + -0.001860841060988605, + 0.00029695293051190674, + 0.02498752251267433, + -0.010670364834368229, + 0.01328130904585123, + -0.0016839468153193593, + 0.0064654164016246796 + ], + [ + -0.005964308511465788, + -0.05137510597705841, + -0.011904079467058182, + 0.02796851098537445, + -0.0074960519559681416, + -0.013788249343633652, + 0.005681382026523352, + 0.07679128646850586 + ], + [ + 0.0052648624405264854, + 0.02194236032664776, + -0.04722492769360542, + 0.09563226997852325, + 0.009540356695652008, + -0.0015426736790686846, + -0.0037380224093794823, + -0.06985487043857574 + ] + ], + [ + [ + 0.013142564333975315, + 0.01750161498785019, + 0.004132880829274654, + 0.021695256233215332, + -0.01852998323738575, + 0.012978342361748219, + -0.007398843299597502, + 0.009055987000465393 + ], + [ + -0.00022947683464735746, + 0.031463831663131714, + 0.0047997054643929005, + -0.018824033439159393, + -0.015892844647169113, + 0.038359083235263824, + -0.005327050108462572, + 0.02625974640250206 + ], + [ + -0.024713359773159027, + -0.02787996083498001, + 0.0026817938778549433, + -0.015474238432943821, + -0.01670076511800289, + -0.008748471736907959, + 0.000777386303525418, + 0.018672356382012367 + ], + [ + 0.005801113322377205, + -0.004271801561117172, + -0.01889893040060997, + 0.017575375735759735, + -0.010973130352795124, + -0.009562008082866669, + -0.0025658104568719864, + -0.01086603756994009 + ], + [ + -0.01657452993094921, + -0.018590329214930534, + 0.015404308214783669, + 0.0018109462689608335, + 0.015596186742186546, + -0.006940584629774094, + -0.0070718456991016865, + 0.008664987981319427 + ], + [ + -0.010375645942986012, + 0.010492287576198578, + -0.00039021397242322564, + -0.004761490970849991, + 0.01883499138057232, + 0.010639801621437073, + 0.0006980517646297812, + 0.01789085380733013 + ], + [ + -0.04415551945567131, + 0.015712881460785866, + 0.016951683908700943, + -0.01630944013595581, + -0.021096661686897278, + 0.025866353884339333, + 0.0005202155443839729, + 0.014025659300386906 + ], + [ + 0.0055330898612737656, + 0.009820445440709591, + -0.0020605018362402916, + 0.10360436886548996, + -0.019353630021214485, + -0.011858363635838032, + 0.002548510441556573, + -0.02645721659064293 + ] + ], + [ + [ + -0.002717643277719617, + -0.036024440079927444, + 0.008816132321953773, + -0.006945063825696707, + -0.010295652784407139, + -0.022920707240700722, + -0.0012536688009276986, + -0.029919981956481934 + ], + [ + -0.029353715479373932, + -0.04745062068104744, + 0.0001117979409173131, + 0.01932831108570099, + 0.008515988476574421, + -0.02462596260011196, + 0.005941751878708601, + -0.012018777430057526 + ], + [ + 0.007290070876479149, + -0.030545946210622787, + -0.02105436660349369, + 0.03764719516038895, + 0.026653477922081947, + 0.000675741583108902, + 0.006240263115614653, + -0.037685833871364594 + ], + [ + 0.011341961100697517, + -0.004436252638697624, + -0.008462370373308659, + 0.051884718239307404, + 0.012532705441117287, + -0.036423202604055405, + -2.9369535695877858e-05, + -0.01874753087759018 + ], + [ + 0.013416334055364132, + -0.02068285271525383, + -0.018824037164449692, + -0.047680772840976715, + -0.0015649598790332675, + -0.009696434251964092, + -0.0030544644687324762, + 0.0026201391592621803 + ], + [ + -0.011718332767486572, + 0.02899770997464657, + -0.03537032753229141, + 0.02893485687673092, + -0.010716930963099003, + 0.021876806393265724, + 0.009727503173053265, + -0.03550545871257782 + ], + [ + -0.004743734374642372, + 0.011317994445562363, + 0.007668473292142153, + -0.02359725721180439, + 0.0008648823131807148, + -0.001484819920733571, + 0.0028161718510091305, + -0.07707846909761429 + ], + [ + 0.04013708233833313, + -0.03157418593764305, + 0.0406864769756794, + -0.039632756263017654, + 0.039011646062135696, + 0.009789115749299526, + -0.0027834484353661537, + 0.027378682047128677 + ] + ], + [ + [ + 0.003992538899183273, + -0.024282312020659447, + 0.03521653637290001, + -0.03540008142590523, + -0.01548567321151495, + -0.009696461260318756, + -0.0005981716094538569, + 0.004261058289557695 + ], + [ + -0.011119147762656212, + -0.034465570002794266, + -0.0002346354303881526, + 0.01863187365233898, + -0.006425297819077969, + -0.005833946168422699, + 0.0016418659361079335, + -0.030070964246988297 + ], + [ + -0.009139573201537132, + 0.02249818667769432, + -0.05241279676556587, + -0.03413619101047516, + -0.03036988154053688, + 0.026807677000761032, + 0.0018601096235215664, + -0.09710799157619476 + ], + [ + -0.004022710025310516, + -0.0071505713276565075, + -0.009538015350699425, + 0.004058562219142914, + -0.011348055675625801, + 0.0010216138325631618, + -0.0007484802044928074, + -0.026296064257621765 + ], + [ + 0.014692412689328194, + 0.03385847806930542, + 0.0005839724908582866, + 0.017131293192505836, + -0.0238761268556118, + 0.006317678838968277, + -0.0033509472850710154, + 0.05711374804377556 + ], + [ + 0.009671634063124657, + -0.029059575870633125, + 0.01651710458099842, + -0.019757717847824097, + -0.016252974048256874, + 0.001204245607368648, + -0.00014389313582796603, + -0.03063022717833519 + ], + [ + 0.009695366956293583, + 0.003639927366748452, + -0.026176685467362404, + 9.860256977844983e-05, + 0.016065916046500206, + 0.003917505498975515, + -0.0009130636462941766, + 0.02246440015733242 + ], + [ + -0.015604650601744652, + -0.043048471212387085, + -0.02723853476345539, + -0.050969198346138, + 0.012202349491417408, + 0.0023514297790825367, + -0.00854506716132164, + -0.005383154843002558 + ] + ], + [ + [ + 0.00040157680632546544, + 0.02129259519279003, + 0.0015632190043106675, + -0.029113130643963814, + 0.002023383742198348, + -0.010433297604322433, + 0.0041716513223946095, + -0.018578924238681793 + ], + [ + -0.007128266151994467, + 0.03215425834059715, + -0.0017713323468342423, + -0.061824947595596313, + -0.0030295245815068483, + 0.02635316550731659, + 0.0011827173875644803, + -0.01399894431233406 + ], + [ + 0.0039141541346907616, + 0.001285251579247415, + -0.039359886199235916, + 0.038631074130535126, + 0.010466761887073517, + -0.020123396068811417, + 0.005446953233331442, + -0.0009450945071876049 + ], + [ + 0.013785341754555702, + -0.023904193192720413, + 0.01601436175405979, + -0.03224816545844078, + 0.0035403843503445387, + 0.0008099959813989699, + -0.002048494527116418, + 0.025419408455491066 + ], + [ + -0.02498799003660679, + 0.002362275728955865, + 0.03142847120761871, + 0.00295807933434844, + -0.059215985238552094, + 0.007850936613976955, + 0.0009248165297321975, + 0.04535813629627228 + ], + [ + 0.020599139854311943, + 0.003563855541869998, + 0.0458180233836174, + -0.012519598007202148, + -0.03569488972425461, + 0.0062444438226521015, + 0.0028903570491820574, + 0.008220741525292397 + ], + [ + 0.01271554920822382, + -0.014647772535681725, + -0.0025687296874821186, + -0.0044232383370399475, + 0.0376615896821022, + 0.007906519807875156, + -0.0064039090648293495, + 0.010460537858307362 + ], + [ + -0.012960635125637054, + 0.02727828361093998, + -0.025612957775592804, + 0.02819317765533924, + -0.0073761302046477795, + -0.006716197822242975, + -0.0018940508598461747, + 0.06702262163162231 + ] + ], + [ + [ + 0.02795885130763054, + -0.017546050250530243, + -0.018369439989328384, + 0.007331667002290487, + -0.020879579707980156, + -0.03534386307001114, + 0.006447501014918089, + -0.011274963617324829 + ], + [ + -0.0048421514220535755, + -0.020176386460661888, + 0.00019153962784912437, + 0.02562103420495987, + -0.02132178097963333, + -0.03351036459207535, + 0.004000373184680939, + 0.0018595217261463404 + ], + [ + 0.02697288990020752, + -0.0767933577299118, + -0.010822524316608906, + 0.05487346276640892, + 0.012983106076717377, + -0.027789926156401634, + -0.00029530294705182314, + -0.008136505261063576 + ], + [ + -0.031038224697113037, + 0.021298378705978394, + 0.0014218812575563788, + -0.0041955700144171715, + -0.01679360307753086, + -0.01858697459101677, + -0.0022203484550118446, + 0.017866455018520355 + ], + [ + -0.03574793413281441, + -0.0037247613072395325, + 0.005961978808045387, + -0.010485490784049034, + -0.005107740871608257, + -0.001208026777021587, + 0.008456452749669552, + -0.05146345868706703 + ], + [ + 0.004190330859273672, + -0.01197721529752016, + -0.05248004198074341, + -0.08276401460170746, + -0.04422162100672722, + -0.0030356368515640497, + -0.0020566072780638933, + -0.0397442989051342 + ], + [ + 0.01229606382548809, + -0.05192750319838524, + -0.04660769924521446, + 0.06353597342967987, + 0.0033752943854779005, + -0.009442253969609737, + -0.005564114078879356, + -0.012329289689660072 + ], + [ + 0.0015914865070953965, + -0.02677479013800621, + 0.04146946221590042, + -0.0036283221561461687, + -0.013002106919884682, + 0.006330444477498531, + 0.00013648658932652324, + 0.09749321639537811 + ] + ], + [ + [ + 0.02643367275595665, + 0.02376185730099678, + -0.011922935955226421, + 0.005670730024576187, + -0.0076800561510026455, + -0.007699334528297186, + 0.00301837339065969, + -0.0036921382416039705 + ], + [ + 0.027720674872398376, + -0.00912806112319231, + -0.028843892738223076, + 0.08797967433929443, + -0.02951275184750557, + -0.0008374552708119154, + -0.00025857469881884754, + -0.007879376411437988 + ], + [ + 0.03261328861117363, + -0.014485800638794899, + -0.010214618407189846, + 0.020525075495243073, + 0.011113720014691353, + 8.335912571055815e-05, + 0.00020430010044947267, + -0.04673580080270767 + ], + [ + -0.025927625596523285, + 0.006059521343559027, + 0.0061348797753453255, + -0.019206563010811806, + -0.028083648532629013, + 0.010304628871381283, + 0.004785127006471157, + 0.024735227227211 + ], + [ + -0.0017592982621863484, + -0.016162758693099022, + 0.00790207739919424, + -0.023530907928943634, + -0.011087433435022831, + 0.008505881763994694, + 0.00430923281237483, + -0.019721776247024536 + ], + [ + -0.029353003948926926, + 0.00043745801667682827, + -0.02994466759264469, + 0.02997434139251709, + -0.020244119688868523, + -0.03255278244614601, + -0.00010153645416721702, + -0.010196808725595474 + ], + [ + -0.000702035496942699, + 0.021152058616280556, + -0.0011077916715294123, + -0.01984836719930172, + -0.027556655928492546, + 0.012868592515587807, + -0.006037835963070393, + 0.049428585916757584 + ], + [ + 0.01930440589785576, + -0.011416634544730186, + -0.023621825501322746, + 0.022121071815490723, + -0.02976379729807377, + -0.006532140076160431, + 0.004992068279534578, + -0.058094002306461334 + ] + ], + [ + [ + 0.017499102279543877, + 0.04581628367304802, + 0.0277546513825655, + -0.055101994425058365, + 0.08537370711565018, + -0.01675495132803917, + -0.0023068739101290703, + 0.009317639283835888 + ], + [ + 0.026507090777158737, + 0.035204626619815826, + 0.023703113198280334, + -0.021988950669765472, + 0.041123177856206894, + 0.0034460797905921936, + -0.0044802455231547356, + 0.058641791343688965 + ], + [ + -0.004136473871767521, + 0.008640822023153305, + 0.029827358201146126, + -0.042657915502786636, + -0.014877286739647388, + 0.015233127400279045, + -0.002110511064529419, + 0.02700236067175865 + ], + [ + -0.01875213347375393, + -0.00935500580817461, + -0.010168123058974743, + -0.06148868799209595, + -0.05856400728225708, + 0.0038254116661846638, + 0.004355683457106352, + 0.06737526506185532 + ], + [ + 0.013973659835755825, + 0.02120240032672882, + 0.007393413223326206, + -0.037546057254076004, + 0.030450209975242615, + 0.011616700328886509, + 0.0024166982620954514, + 0.02868053875863552 + ], + [ + 0.01912948116660118, + 0.01965058408677578, + 0.024939265102148056, + 0.008952860720455647, + 0.007888119667768478, + -0.010222881101071835, + -0.0010882540373131633, + 0.029199235141277313 + ], + [ + -0.006467668805271387, + -0.017481500282883644, + 0.01144382357597351, + -0.007669669110327959, + 0.006638977210968733, + -0.012831605039536953, + -0.00134558929130435, + 0.05762423574924469 + ], + [ + 0.028997836634516716, + 0.023221764713525772, + -0.020027661696076393, + -0.04051118344068527, + -0.07320909202098846, + 0.008588583208620548, + -0.0006037681014277041, + -0.08158788830041885 + ] + ], + [ + [ + -0.01909785345196724, + -0.02059527486562729, + 0.04270008206367493, + -0.00409022718667984, + 0.03724062442779541, + -0.019208742305636406, + -0.003998613450676203, + 0.014020929113030434 + ], + [ + 0.00161431182641536, + -0.04245728254318237, + 0.019393235445022583, + 0.010053792968392372, + 0.031622759997844696, + -0.010624203830957413, + -0.005394468083977699, + -0.01526116207242012 + ], + [ + 0.0015528929652646184, + 0.027383308857679367, + -0.017225338146090508, + -0.05063651502132416, + -0.013734085485339165, + -0.018484890460968018, + -0.01100222859531641, + -0.031573336571455 + ], + [ + -0.011290663853287697, + -0.007710059639066458, + -0.039759259670972824, + 0.09833025932312012, + 0.0017567637842148542, + 0.015833085402846336, + 0.005532299634069204, + -0.01222904585301876 + ], + [ + 0.01389816589653492, + -0.04135885462164879, + -0.04369537532329559, + -0.06653688102960587, + -0.017426623031497, + -0.023743871599435806, + -0.0020522535778582096, + -0.045079223811626434 + ], + [ + 0.0713033601641655, + 0.015955312177538872, + -0.006646857131272554, + 0.033904120326042175, + -0.01123032160103321, + -0.0009381925920024514, + 0.0004132907197345048, + 0.04343848302960396 + ], + [ + 0.018393298611044884, + 0.026430154219269753, + -0.043365478515625, + 0.0781613439321518, + 0.007138947956264019, + -0.0360729917883873, + -0.0005375480395741761, + -0.04935665801167488 + ], + [ + 0.06291136890649796, + -0.017557917162775993, + 0.04341656714677811, + -0.05805842950940132, + -0.030563542619347572, + -0.017399705946445465, + -0.006310869473963976, + 0.05087970197200775 + ] + ], + [ + [ + 0.0004447382816579193, + -0.004386397078633308, + 0.008821114897727966, + 0.014038103632628918, + -0.012709015049040318, + 0.00034197387867607176, + -0.006953168660402298, + -0.01899830996990204 + ], + [ + 0.001578022143803537, + -0.02162407524883747, + 0.004388004541397095, + 0.024478347972035408, + -0.04258778691291809, + -0.00704857986420393, + -0.0036664544604718685, + -0.031404104083776474 + ], + [ + 0.007227383088320494, + 0.03463605418801308, + -0.018084025010466576, + 0.026621907949447632, + -0.045132603496313095, + -6.761773693142459e-05, + -0.004385700915008783, + -0.022471833974123 + ], + [ + -0.0052924384362995625, + -0.04149025306105614, + 0.023794282227754593, + 0.05458718538284302, + -0.015883678570389748, + -0.022904783487319946, + 0.010059360414743423, + -0.04729205369949341 + ], + [ + 0.014974558725953102, + 0.012797228991985321, + -0.037745311856269836, + -0.0233783982694149, + -0.02252015471458435, + -0.026103558018803596, + 0.0016079518245533109, + -0.017812492325901985 + ], + [ + -0.01446443796157837, + -0.04172385111451149, + -0.010515674948692322, + -0.031094802543520927, + -0.048948027193546295, + 0.010647624731063843, + 0.002482972340658307, + 0.08021999150514603 + ], + [ + 0.015158555470407009, + 0.007924109697341919, + -0.0021903349552303553, + 0.06867896020412445, + -0.0303651113063097, + -0.010243814438581467, + -0.003049481427296996, + -0.03381290286779404 + ], + [ + 0.0050307889468967915, + -0.07134716212749481, + -0.08423495292663574, + -0.013588003814220428, + -0.029606113210320473, + -0.013033577241003513, + -0.005898215342313051, + -0.017672071233391762 + ] + ], + [ + [ + 0.0060718427412211895, + -0.019854720681905746, + -0.013292793184518814, + -0.06251529604196548, + 0.022326845675706863, + 0.022029070183634758, + 0.0005851666210219264, + -0.014693544246256351 + ], + [ + -0.003233099589124322, + -0.02820943482220173, + 0.015005163848400116, + -0.04788457974791527, + 0.012241607531905174, + 0.04476936534047127, + -0.006349232979118824, + -0.01953512616455555 + ], + [ + -0.015739401802420616, + -0.001957777887582779, + 0.017164895310997963, + -0.022466007620096207, + -0.05795599892735481, + 0.021230001002550125, + -0.004921807441860437, + 0.044734254479408264 + ], + [ + 0.02614787593483925, + 0.0015169987455010414, + 0.02381114475429058, + -0.04412663355469704, + 0.015300032682716846, + 0.03616116940975189, + 0.00460527278482914, + 0.021092327311635017 + ], + [ + 0.020666327327489853, + 0.020618796348571777, + 0.026991989463567734, + 0.015402701683342457, + -0.008411251939833164, + -0.005389300175011158, + -0.0008688889793120325, + 0.016048293560743332 + ], + [ + -0.04911161959171295, + 0.02179277315735817, + 0.03231910243630409, + -0.025327440351247787, + 0.0174326803535223, + -0.01584060862660408, + -0.000590043026022613, + 0.016375038772821426 + ], + [ + 0.017458723857998848, + -0.011067649349570274, + 0.04507347196340561, + 0.00236575398594141, + 0.017554206773638725, + 0.04458872228860855, + -0.0008350535063073039, + 0.02213863469660282 + ], + [ + -0.04372201859951019, + 0.03648972138762474, + -0.06983516365289688, + 0.0007637189701199532, + -0.07043685764074326, + -0.011675314977765083, + -0.0015686176484450698, + 0.13244615495204926 + ] + ], + [ + [ + 0.008428818546235561, + -0.09998466074466705, + 0.023613756522536278, + 0.004684499464929104, + 0.04319937154650688, + -0.0070672230795025826, + -0.001510395435616374, + 0.007011654786765575 + ], + [ + -0.017619138583540916, + -0.006482650991529226, + -0.015049690380692482, + 0.01865360140800476, + -0.07180187851190567, + -0.0236499160528183, + 0.0023413635790348053, + -0.03584384173154831 + ], + [ + -0.03128651902079582, + -0.027227528393268585, + 0.02612942084670067, + -0.003429725533351302, + -0.04747042432427406, + -0.007665604818612337, + -0.0062392158433794975, + 0.044083062559366226 + ], + [ + 0.01798432506620884, + -0.027103759348392487, + -0.03644976764917374, + -0.032621171325445175, + -0.032843101769685745, + -0.008617674000561237, + -0.0035885581746697426, + -0.025560695677995682 + ], + [ + -0.023069849237799644, + 0.0011161152506247163, + -0.02168533019721508, + 0.010652860626578331, + 0.026523571461439133, + -0.0016174552729353309, + -0.00341759342700243, + -0.003934325184673071 + ], + [ + 0.0012011175276711583, + 0.018595198169350624, + 0.01733183115720749, + -0.07200539857149124, + 0.03233800083398819, + 0.009580639190971851, + -0.0005684696370735765, + -0.08570310473442078 + ], + [ + 0.0011742967180907726, + -0.037803202867507935, + -0.05337223783135414, + -0.06499306112527847, + -0.015149539336562157, + -0.026007989421486855, + -0.004808143246918917, + 0.002303047338500619 + ], + [ + -0.02952693961560726, + -0.049518365412950516, + 0.013333001174032688, + -0.0021692330483347178, + 0.020110705867409706, + 0.008798555471003056, + -0.0033372354228049517, + 0.05487209931015968 + ] + ], + [ + [ + -0.0005591188673861325, + -0.05718311667442322, + 0.033161863684654236, + -0.046961646527051926, + -0.0003828643821179867, + 0.019626660272479057, + -0.004093860741704702, + 0.028527013957500458 + ], + [ + -0.012964743189513683, + -0.025845788419246674, + -0.019089512526988983, + -0.005850179120898247, + -0.11567653715610504, + 0.016433458775281906, + -0.005962203722447157, + -0.03472881764173508 + ], + [ + -0.0009482680470682681, + 0.024766510352492332, + 0.02017413079738617, + -0.02840499021112919, + -0.07204686105251312, + 0.030615687370300293, + 0.0061282869428396225, + 0.04537783935666084 + ], + [ + 0.014095732010900974, + -0.006632072851061821, + -0.01061874721199274, + 0.020387941971421242, + -0.04424198344349861, + -0.014970452524721622, + 0.004433169960975647, + -0.04411343112587929 + ], + [ + -0.030036643147468567, + -0.02357761189341545, + -1.3749807294516359e-05, + -8.057260856730863e-06, + -0.02115590125322342, + -0.004666578024625778, + 0.004630946088582277, + 0.023513352498412132 + ], + [ + 0.004898412618786097, + 0.0036397427320480347, + -0.022303957492113113, + 0.024766890332102776, + -0.01892733760178089, + 0.026814740151166916, + 0.00095053092809394, + 0.008640147745609283 + ], + [ + -0.010098660364747047, + 0.036478299647569656, + -0.025453345850110054, + 0.07485852390527725, + -0.023504871875047684, + -0.00878962129354477, + -0.0030162252951413393, + 0.052069999277591705 + ], + [ + 0.047721702605485916, + 0.015476119704544544, + -0.02184872142970562, + 0.04788801074028015, + -0.018688740208745003, + 0.001683799084275961, + -0.007366447243839502, + -0.14508022367954254 + ] + ], + [ + [ + -0.026537751778960228, + -0.05914111062884331, + 0.038982149213552475, + -0.07123607397079468, + 0.010244728066027164, + -0.010778295807540417, + -0.006107930559664965, + 0.0645059272646904 + ], + [ + -0.008812044747173786, + -0.017957916483283043, + -0.011636734940111637, + -0.004467382095754147, + -0.0408036895096302, + -0.013324531726539135, + -0.0055585759691894054, + 0.0115595031529665 + ], + [ + -0.020401332527399063, + -0.008152944967150688, + 0.022042738273739815, + -0.05620477348566055, + -0.0476926751434803, + 0.0033723320811986923, + -0.0011945049045607448, + 0.09105583280324936 + ], + [ + 0.02334972284734249, + 0.005365884397178888, + 0.024272071197628975, + -0.04905787482857704, + 0.026643693447113037, + 0.010946475900709629, + -0.003522598883137107, + 0.00029266157071106136 + ], + [ + -0.020140523090958595, + -0.0016408123774453998, + -0.0014707747614011168, + -0.01010986603796482, + -0.011081731878221035, + -0.014323420822620392, + 0.0012052619131281972, + 0.00971866026520729 + ], + [ + 0.022165920585393906, + -0.026754453778266907, + -0.014772986993193626, + 0.01649131067097187, + -0.00047961753443814814, + -0.024472001940011978, + -0.00929025188088417, + -0.004921439103782177 + ], + [ + -0.0057018818333745, + -0.007628202438354492, + 0.029892198741436005, + 0.007584621198475361, + 0.02746555581688881, + -0.008200138807296753, + 0.0011568913469091058, + 0.09321479499340057 + ], + [ + 0.004765355493873358, + 0.0012685843976214528, + -0.01205132994800806, + 0.08111895620822906, + -0.006965477950870991, + 0.019909130409359932, + -0.008540026843547821, + 0.029773404821753502 + ] + ] + ], + [ + [ + [ + 0.042998477816581726, + 0.19938364624977112, + 0.01489727757871151, + -0.029845448210835457, + 0.03243442624807358, + -0.0037655429914593697, + 0.0011453917250037193, + 0.040719110518693924 + ], + [ + -0.04034204035997391, + 0.1258695125579834, + 0.009282730519771576, + 0.04146720841526985, + -0.03710538521409035, + -0.01814665086567402, + 0.00977284274995327, + -0.0026151046622544527 + ], + [ + -0.006315178237855434, + 0.06932850927114487, + -0.0016915559535846114, + 0.017050879076123238, + 0.04116693139076233, + 0.010444620624184608, + 0.0006367245223373175, + 0.040617357939481735 + ], + [ + 0.02527259849011898, + -0.01996319182217121, + -0.029996467754244804, + -0.026180051267147064, + 0.16820059716701508, + -0.03049975447356701, + -0.0027326797135174274, + 0.0423969067633152 + ], + [ + -0.048929207026958466, + -0.04380697011947632, + 0.0038014117162674665, + 0.03389083966612816, + 0.0077115194872021675, + -0.007207234390079975, + -0.009458835236728191, + 0.041690509766340256 + ], + [ + -0.020313594490289688, + -0.02632625214755535, + -0.010308663360774517, + 0.07287666201591492, + -0.017852412536740303, + 0.0009790185140445828, + 0.0007506957626901567, + 0.018748553469777107 + ], + [ + -0.012823488563299179, + -0.022733047604560852, + -0.044957585632801056, + -0.029688259586691856, + 0.06076624244451523, + 0.009285208769142628, + 0.0037535973824560642, + -0.010971378535032272 + ], + [ + -0.02557508274912834, + -0.021146830171346664, + 0.047565117478370667, + -0.07057531923055649, + -0.008649416267871857, + 0.0014024502597749233, + 0.00015214273298624903, + 0.08306913822889328 + ] + ], + [ + [ + 0.010146784596145153, + 0.0345519483089447, + 0.022038588300347328, + 0.07622489333152771, + 0.04662046581506729, + 0.02388687990605831, + 0.003778307931497693, + 0.043019771575927734 + ], + [ + -0.00877960491925478, + 0.091257244348526, + -0.0039586266502738, + 0.029667379334568977, + -0.0013205945724621415, + -0.02074342779815197, + 0.0037162424996495247, + -0.014668748714029789 + ], + [ + 0.03760058805346489, + 0.047145336866378784, + -0.016808457672595978, + 0.08475124090909958, + 0.025039218366146088, + -0.004904455039650202, + 0.0043917507864534855, + 0.006390227936208248 + ], + [ + 0.019335780292749405, + -0.00991736724972725, + -0.0026827030815184116, + 0.10449156165122986, + 0.09388388693332672, + -0.0004804918135050684, + -0.005328092724084854, + 0.0004789171216543764 + ], + [ + 0.004947458393871784, + 0.013117589056491852, + 0.008636999875307083, + 0.0031920592300593853, + 0.04803544282913208, + 0.021251197904348373, + 0.002129462780430913, + 0.03787960112094879 + ], + [ + -0.004563733469694853, + -0.05002160370349884, + 0.010384531691670418, + 0.017230063676834106, + 0.003635741537436843, + 0.006658877246081829, + -0.0027939428109675646, + -0.01911754719913006 + ], + [ + -0.00056228949688375, + -0.05118267983198166, + -0.012451538816094398, + 0.03755904734134674, + 0.051179688423871994, + -0.006767935119569302, + 0.0023738050367683172, + -0.016169317066669464 + ], + [ + -0.04784543439745903, + -0.006650404538959265, + 0.013543469831347466, + -0.057491060346364975, + 0.010665916837751865, + 0.004435202572494745, + 0.005536895245313644, + -0.015831414610147476 + ] + ], + [ + [ + 0.00899673905223608, + 0.04667368158698082, + 0.0080463457852602, + 0.02453889325261116, + 0.06318219006061554, + -0.01538887619972229, + -0.00015053211245685816, + 0.050032973289489746 + ], + [ + -0.021342091262340546, + 0.10192017257213593, + -0.01473990362137556, + 0.08952081203460693, + -0.019976695999503136, + -0.003518846118822694, + 0.011244265362620354, + -0.020025739446282387 + ], + [ + 0.0273133534938097, + 0.09168317168951035, + -0.02468532882630825, + 0.019979795441031456, + 0.038684554398059845, + -0.0026693318504840136, + 0.005835226271301508, + -0.00032637614640407264 + ], + [ + 0.026978040114045143, + 0.028553511947393417, + 0.05166766047477722, + -0.08283241093158722, + 0.024588191881775856, + 0.00635948171839118, + 0.0007707785116508603, + 0.01992063783109188 + ], + [ + -0.020197950303554535, + -0.0034396497067064047, + 0.023127466440200806, + -0.05396741256117821, + -0.006124891806393862, + -0.013830358162522316, + 0.003929320722818375, + 0.09149187803268433 + ], + [ + -0.001936072134412825, + -0.041506119072437286, + 0.022493060678243637, + -0.07645458728075027, + 0.04316791892051697, + 0.021961789578199387, + -0.0004839620378334075, + 0.015350384637713432 + ], + [ + 0.02819751389324665, + -0.016644882038235664, + 0.023479336872696877, + -0.020696690306067467, + 0.019873103126883507, + 0.02722199819982052, + -0.005958935711532831, + -0.02184671349823475 + ], + [ + -0.0004636717203538865, + -0.016646409407258034, + -3.63886974810157e-05, + -0.035642389208078384, + -0.002334941178560257, + -0.0011401637457311153, + 0.00283991452306509, + -0.025397514924407005 + ] + ], + [ + [ + 0.020070921629667282, + 0.0289110466837883, + -0.0012013694504275918, + 0.05025898292660713, + 0.010643799789249897, + -0.005350594408810139, + 0.0027429889887571335, + 0.04382771626114845 + ], + [ + -0.019489560276269913, + 0.005677905865013599, + 0.0047510042786598206, + 0.10048939287662506, + -0.012338187545537949, + -0.0018468688940629363, + 0.0024690821301192045, + 0.02418486587703228 + ], + [ + -0.0187191404402256, + -0.02320234104990959, + -0.03108854964375496, + 0.07219633460044861, + -0.03695297613739967, + -0.07148773223161697, + 0.008526138961315155, + -0.03723624721169472 + ], + [ + 0.034574273973703384, + 0.05132600665092468, + -0.018545793369412422, + -0.0023505722638219595, + 0.008036565966904163, + 0.006616529077291489, + -0.00033168791560456157, + 0.003999536857008934 + ], + [ + -0.0639839693903923, + 0.018585868179798126, + 0.03743042051792145, + -0.04361371323466301, + -0.1389906406402588, + 0.0022773221135139465, + 0.019383033737540245, + 0.04425736889243126 + ], + [ + -0.05830403417348862, + 0.04491322487592697, + -0.013198145665228367, + -0.01967054232954979, + -0.005281790159642696, + 0.0017724739154800773, + -0.0007037022151052952, + -0.0010248369071632624 + ], + [ + -0.01653434894979, + 0.010560676455497742, + -0.032302118837833405, + -0.022391827777028084, + -0.010333656333386898, + -0.002979908837005496, + -0.001608734717592597, + -0.04419723525643349 + ], + [ + 0.018223127350211143, + 0.0009945192141458392, + 0.019003475084900856, + -0.025428587570786476, + 0.009895209223031998, + 0.032706085592508316, + 0.003396524814888835, + 0.021109573543071747 + ] + ], + [ + [ + 0.039966873824596405, + 0.03163120523095131, + 0.02498839609324932, + 0.03277754783630371, + 0.011409868486225605, + 0.005580452736467123, + -0.0008023420232348144, + 0.029606284573674202 + ], + [ + 0.003060384653508663, + 0.014347934164106846, + 0.029635343700647354, + 0.08225651830434799, + 0.0028218075167387724, + 0.014798951335251331, + 0.006548217963427305, + 0.010696595534682274 + ], + [ + -0.0027290477883070707, + -0.011024500243365765, + 0.006681413855403662, + 0.08051123470067978, + -0.008078908547759056, + -0.038818322122097015, + 0.007836900651454926, + -0.004556928761303425 + ], + [ + 0.04396064206957817, + 0.060399655252695084, + 0.007698867004364729, + 0.007841148413717747, + 0.027637818828225136, + -0.006317405495792627, + 0.003760657273232937, + -0.0010302637238055468 + ], + [ + -0.056850507855415344, + -0.025039900094270706, + 0.05937255918979645, + -0.02103959396481514, + -0.12152060121297836, + 0.0014400279615074396, + 0.009334187023341656, + -0.05901864916086197 + ], + [ + -0.055104948580265045, + 0.029785970225930214, + 0.015512790530920029, + -0.032713863998651505, + -0.0033829316962510347, + 0.03891250491142273, + -0.0031639481894671917, + 0.010717008262872696 + ], + [ + -0.0015849812189117074, + 0.020633162930607796, + -0.01592431031167507, + 0.02221294306218624, + -0.002160662319511175, + 0.00315401260741055, + -0.0017223904142156243, + -0.008813627064228058 + ], + [ + 0.0018570938846096396, + -0.058834005147218704, + -0.02788645587861538, + -0.052889540791511536, + 0.02528241090476513, + 0.00789792463183403, + -0.0019906964153051376, + -0.033881328999996185 + ] + ], + [ + [ + 0.026961592957377434, + 0.05391969159245491, + 0.012634225189685822, + 0.004973435774445534, + 0.023677218705415726, + 0.018059955909848213, + 0.0028578615747392178, + 0.01836898736655712 + ], + [ + 0.014194883406162262, + 0.07192608714103699, + 0.026228245347738266, + -0.0034124618396162987, + 0.00042242612107656896, + 0.029626239091157913, + -0.0035832813009619713, + 0.017860237509012222 + ], + [ + 0.01912047155201435, + 0.00485237454995513, + 0.01007548626512289, + -0.01254570484161377, + 0.0242884811013937, + -0.019539859145879745, + -0.0027030876372009516, + 0.03782839700579643 + ], + [ + 0.008771353401243687, + 0.043950509279966354, + 0.034593623131513596, + 0.01219031773507595, + 0.05664800852537155, + -0.03776297718286514, + 0.001415961072780192, + 0.042227424681186676 + ], + [ + 0.0055290814489126205, + 0.037210021167993546, + -0.011144105345010757, + -0.0547453835606575, + 0.011917514726519585, + 0.043971944600343704, + 0.006183322984725237, + 0.042700693011283875 + ], + [ + 0.0010990571463480592, + 0.012879887595772743, + 0.02371690794825554, + -0.020925790071487427, + -0.06379544734954834, + -0.002021254040300846, + 0.0029079867526888847, + 0.09720602631568909 + ], + [ + -0.022765284404158592, + -0.03909159451723099, + 0.04724951088428497, + -0.04943820834159851, + -0.01838153973221779, + 0.013652590103447437, + 0.00040995722520165145, + 0.016025453805923462 + ], + [ + 0.0012006252072751522, + -0.02362549677491188, + -0.0029725537169724703, + 0.010388168506324291, + -0.014519349671900272, + -0.030366774648427963, + 0.00099376926664263, + -0.04389309510588646 + ] + ], + [ + [ + 0.016804026439785957, + 0.02061847783625126, + 0.016981001943349838, + 0.03388063609600067, + -0.025866836309432983, + 0.013164502568542957, + -0.0013149222359061241, + 0.022166309878230095 + ], + [ + -0.012067471630871296, + 0.009525220841169357, + 0.019704284146428108, + -0.05160149186849594, + -0.002963688923045993, + -0.00016584074182901531, + 0.0017404468962922692, + 0.0024365398567169905 + ], + [ + 0.026040220633149147, + -0.027340088039636612, + -0.0015576438745483756, + 0.03623490780591965, + 0.006746015977114439, + -0.010310529731214046, + -0.0009047621279023588, + 0.007071762345731258 + ], + [ + 0.0027665847446769476, + 0.01873735338449478, + 0.005321215838193893, + -0.002172445645555854, + 0.04641091078519821, + -0.04755161330103874, + 0.004331229720264673, + -0.006594603415578604 + ], + [ + 0.007497329730540514, + -0.04636160656809807, + -0.0701950266957283, + -0.065707266330719, + 0.09320733696222305, + 0.027883345261216164, + -0.0049562412314116955, + -0.0032029172871261835 + ], + [ + -0.018624145537614822, + 0.015761859714984894, + 0.015330709517002106, + 0.0633082389831543, + -0.033996544778347015, + 0.00988477747887373, + 0.0016575015615671873, + 0.02046154998242855 + ], + [ + 0.01479823887348175, + -0.010843884199857712, + 0.010835022665560246, + -0.01854168064892292, + -0.050903692841529846, + -0.019758783280849457, + 0.005494390614330769, + -0.02036825753748417 + ], + [ + -0.0007188020972535014, + 0.01591777428984642, + 0.012740688398480415, + 0.04065856337547302, + -0.02491617016494274, + -0.004189751576632261, + 0.0020776137243956327, + 0.008516836911439896 + ] + ], + [ + [ + -0.0113237788900733, + 0.046003520488739014, + 0.013542743399739265, + 0.011191491037607193, + -0.0261113028973341, + 0.012981432490050793, + 0.00452449219301343, + 0.03824338689446449 + ], + [ + 0.0003946992219425738, + 0.022476086392998695, + 0.02478598989546299, + 0.04978647455573082, + -0.029387345537543297, + 0.019307676702737808, + -0.0028542685322463512, + 0.042179450392723083 + ], + [ + 0.037954576313495636, + -0.003447843249887228, + 0.019101785495877266, + -0.014221221208572388, + -0.01409358624368906, + 0.031001711264252663, + -0.0011146485339850187, + -0.010479996912181377 + ], + [ + -0.0009219914209097624, + 0.06213204190135002, + -0.020989956334233284, + 0.030223868787288666, + 0.013169931247830391, + -0.028489185497164726, + -0.0034090683329850435, + -0.06638463586568832 + ], + [ + 0.006640338804572821, + -0.01535496860742569, + -0.04293454438447952, + 0.03718996420502663, + 0.0022645913995802402, + -0.0035373622085899115, + -0.0005865826969966292, + -0.039046332240104675 + ], + [ + -0.02562563680112362, + -0.011415530927479267, + 0.03371668979525566, + 0.022444022819399834, + 0.004098269157111645, + -0.02864563837647438, + 0.008406173437833786, + -0.03900492191314697 + ], + [ + 0.015984928235411644, + 0.03573554754257202, + 0.01790614426136017, + 0.019627176225185394, + -0.022252874448895454, + 0.0029529232997447252, + -0.002007489325478673, + 0.05243372917175293 + ], + [ + -0.015516177751123905, + -0.023413406684994698, + -0.013292532414197922, + -0.030297962948679924, + -0.012633721344172955, + 0.020614078268408775, + 0.002953575225546956, + 0.004833463113754988 + ] + ], + [ + [ + 0.009538018144667149, + 0.06289735436439514, + -0.01042983029037714, + -0.06340009719133377, + -0.00039327831473201513, + -0.0018423472065478563, + 0.003112827194854617, + 0.01936090551316738 + ], + [ + -0.009032088331878185, + 0.06995902955532074, + 0.02044784650206566, + -0.001903949654661119, + -0.030952883884310722, + 0.019603507593274117, + -0.0047660935670137405, + 0.0418136790394783 + ], + [ + 0.014582008123397827, + 0.044685982167720795, + 0.04488970339298248, + -0.06523018330335617, + 0.011740508489310741, + 0.014156599529087543, + -0.006290786899626255, + 0.049392588436603546 + ], + [ + -0.012027175165712833, + 0.08577888458967209, + -0.017941320315003395, + 0.03519586846232414, + -0.040680624544620514, + -0.03207451105117798, + 0.0056480662897229195, + 0.007674936205148697 + ], + [ + 0.025097301229834557, + 0.02543996088206768, + 0.03178815171122551, + -0.06074165180325508, + 0.01626049540936947, + -0.0001887048128992319, + 0.0009878157870844007, + 0.05639766529202461 + ], + [ + 0.035954613238573074, + 0.02140561118721962, + 0.023585792630910873, + 0.029600488021969795, + 0.054056718945503235, + 0.02869025617837906, + 0.003914496395736933, + 0.027015024796128273 + ], + [ + -0.026777328923344612, + -0.017709435895085335, + 0.05295976251363754, + -0.013391369953751564, + -0.04332241788506508, + -0.0030386492144316435, + -0.0004162559343967587, + 0.06636087596416473 + ], + [ + -0.039115872234106064, + -0.034196462482213974, + 0.026665953919291496, + -0.06433174014091492, + -0.000949581153690815, + 0.026117784902453423, + -0.0012524885823950171, + 0.011681050062179565 + ] + ], + [ + [ + -0.002571266843006015, + 0.04995045065879822, + -0.0057260747998952866, + 0.024829132482409477, + -0.01279242429882288, + 0.003199429251253605, + -0.0006037906277924776, + 0.024502426385879517 + ], + [ + -0.021018562838435173, + 0.026878727599978447, + 0.009486324153840542, + 0.03302035853266716, + -0.03416866436600685, + 0.006650648545473814, + 0.005283081438392401, + 0.017746051773428917 + ], + [ + -0.02832367643713951, + 0.022198127582669258, + -0.0033807093277573586, + -0.07902909070253372, + 0.04812466353178024, + -0.017768217250704765, + 0.0003298724186606705, + 0.0051366486586630344 + ], + [ + 0.017035357654094696, + -0.02947331592440605, + 0.00851522572338581, + 0.042859531939029694, + -0.03827992081642151, + -0.027428632602095604, + 0.004149948246777058, + 0.015147535130381584 + ], + [ + 0.0344812236726284, + -0.02033172734081745, + -0.03038850985467434, + -0.014111828990280628, + 0.01449014712125063, + 0.016746273264288902, + -0.0061598848551511765, + -0.03445681557059288 + ], + [ + 0.02238285169005394, + -0.01930018700659275, + -0.033292267471551895, + -0.036732207983732224, + 0.010412262752652168, + -0.01256417203694582, + -0.00493326410651207, + -0.011485157534480095 + ], + [ + -0.013886249624192715, + -0.006918683182448149, + 0.013800827786326408, + -0.011365576647222042, + -0.031936995685100555, + 0.01813124306499958, + 0.0056534321047365665, + -0.019311513751745224 + ], + [ + -0.005504447501152754, + -0.0013594283955171704, + 0.03787052258849144, + -0.07605962455272675, + 0.001402215682901442, + 0.007047442253679037, + 0.006300472654402256, + 0.037195734679698944 + ] + ], + [ + [ + -0.00828264094889164, + 0.07036963850259781, + 0.0003257484931964427, + -0.001049395534209907, + 0.010908538475632668, + 0.005593464709818363, + 0.006677707191556692, + 0.03749193251132965 + ], + [ + 0.01259308960288763, + 0.043850336223840714, + -0.0025188755244016647, + 0.008874325081706047, + -0.03355869650840759, + 0.005296200048178434, + 0.0034398091956973076, + 0.006319589447230101 + ], + [ + 0.011704199016094208, + 0.13179051876068115, + -0.018410589545965195, + -0.023477021604776382, + 0.02908114530146122, + 0.010809099301695824, + -0.0005368026904761791, + -0.03635956719517708 + ], + [ + 0.031125012785196304, + -0.039942074567079544, + 0.0002608276845421642, + 0.06142652779817581, + -0.05349482223391533, + -0.01381279993802309, + 0.0031469478271901608, + -0.027409881353378296 + ], + [ + 0.013853168115019798, + -0.0031366576440632343, + -0.04405290260910988, + 0.03603782504796982, + 0.014451393857598305, + 0.0085670854896307, + 0.004178328905254602, + -0.0689389631152153 + ], + [ + 0.02643820457160473, + -0.02124784328043461, + 0.005207039415836334, + 0.048491086810827255, + -0.009045121259987354, + 0.007191753014922142, + 0.0032430486753582954, + -0.020145826041698456 + ], + [ + -0.018475763499736786, + -0.0050697047263383865, + -0.0007260540733113885, + -0.04368395358324051, + 0.0033189556561410427, + -0.0012115312274545431, + 0.00042882448178716004, + 0.008540024049580097 + ], + [ + 0.0044791605323553085, + 0.040423739701509476, + -0.01481938548386097, + 0.03726433217525482, + -0.019571032375097275, + 0.024565614759922028, + 0.006797021254897118, + 0.026549356058239937 + ] + ], + [ + [ + 0.007746933493763208, + 0.056808289140462875, + -0.005207301117479801, + -0.03707142546772957, + 0.039069220423698425, + 0.019477857276797295, + 0.0073922621086239815, + 0.04113610088825226 + ], + [ + -0.023684266954660416, + 0.027577463537454605, + 0.0378289632499218, + -0.058611877262592316, + -0.01102469488978386, + 0.042337920516729355, + 0.0014399635838344693, + 0.024107933044433594 + ], + [ + 0.014254063367843628, + 0.06996475905179977, + 0.015493032522499561, + -0.049844928085803986, + 0.0011613949900493026, + 0.023808522149920464, + 6.323729030555114e-05, + 0.03544863685965538 + ], + [ + -0.005065315403044224, + -0.031090831384062767, + 0.00793821457773447, + -0.08254893869161606, + 0.0321129709482193, + 0.022511335089802742, + 0.00014679548621643335, + 0.029102405533194542 + ], + [ + 0.012182687409222126, + 0.04284684360027313, + 0.010305166244506836, + 0.04678845778107643, + -0.0276811346411705, + -0.016175610944628716, + -0.0015977296279743314, + 0.014714711345732212 + ], + [ + 0.025197992101311684, + 0.013558083213865757, + 0.04277787357568741, + -0.03293780982494354, + 0.010377153754234314, + -0.0076436568051576614, + -0.0003958510351367295, + -0.00601566256955266 + ], + [ + 0.030342647805809975, + 0.003829934634268284, + 0.015271480195224285, + 0.02839452028274536, + 0.043836578726768494, + 0.02121633291244507, + 0.0012770594330504537, + 0.02361530251801014 + ], + [ + -0.010236679576337337, + -0.027590947225689888, + 0.04457877576351166, + -0.003556647337973118, + -0.022321665659546852, + 0.006641879212111235, + 0.0063163419254124165, + -0.010044222697615623 + ] + ], + [ + [ + -0.00548953702673316, + 0.031851112842559814, + 0.003763276617974043, + 0.08205848187208176, + -0.0015430173370987177, + 0.0009602203499525785, + 0.0037432233802974224, + 0.030673924833536148 + ], + [ + -0.039002057164907455, + -0.011749274097383022, + 0.04929187148809433, + -0.02627282589673996, + -0.01489965058863163, + 0.0010605938732624054, + 0.0012471864465624094, + 0.024169418960809708 + ], + [ + -0.03324509784579277, + -0.029144607484340668, + 0.03267065808176994, + 0.03373020142316818, + -0.020044120028614998, + -0.008516906760632992, + -7.051711872918531e-05, + -0.015467943623661995 + ], + [ + -0.022818205878138542, + 0.0025796983391046524, + -0.017293421551585197, + -0.019986087456345558, + 0.038799989968538284, + -0.004580306354910135, + -0.0016324515454471111, + -0.003331958781927824 + ], + [ + 0.023659637197852135, + -0.0019552898593246937, + 0.004502623341977596, + 0.027879873290657997, + 0.006521852687001228, + -0.03467337787151337, + -0.002811025595292449, + 0.012067144736647606 + ], + [ + 0.011486819013953209, + 0.003297524992376566, + -0.015943201258778572, + 0.04065745323896408, + 0.029834888875484467, + -0.029717573896050453, + -0.0007188129820860922, + -0.007003722246736288 + ], + [ + 0.004154355730861425, + -0.03640788421034813, + -0.039459049701690674, + -0.008522813208401203, + 0.004252681042999029, + 0.0033199351746588945, + 0.0003320438845548779, + -0.017336351796984673 + ], + [ + 0.02384844794869423, + -0.014753716066479683, + 0.04721315950155258, + 0.02530626393854618, + 0.022847967222332954, + 0.015918709337711334, + 0.002784267533570528, + 0.010478826239705086 + ] + ], + [ + [ + 0.004194630775600672, + 0.036646872758865356, + 0.019267357885837555, + 0.07057150453329086, + 0.013420190662145615, + 0.0007740844157524407, + 0.007302774582058191, + 0.031358398497104645 + ], + [ + 0.009958927519619465, + 0.012683842331171036, + 0.0409364327788353, + 0.06935576349496841, + -0.010556676425039768, + 0.01866360567510128, + 0.003629234852269292, + 0.022966980934143066 + ], + [ + 0.009823845699429512, + 0.0019045716617256403, + -0.00014629449287895113, + -0.053410306572914124, + -0.013917805626988411, + 0.023474195972085, + 0.0012966408394277096, + -0.04474033787846565 + ], + [ + -0.0021568445954471827, + 0.026081085205078125, + -0.010430990718305111, + -0.005070842802524567, + 0.02155333384871483, + 0.014135663397610188, + -0.0072769117541611195, + -0.010416421107947826 + ], + [ + 0.0045775906182825565, + -0.04897192493081093, + 0.0012236733455210924, + 0.03974290192127228, + -0.0060940999537706375, + -0.002153892768546939, + -0.00023976145894266665, + -0.022632740437984467 + ], + [ + 0.020743004977703094, + 0.024965403601527214, + -0.016661008819937706, + 0.014436911791563034, + -0.0026798213366419077, + -0.006846749223768711, + 0.0034906668588519096, + -0.001675717532634735 + ], + [ + 0.022435201331973076, + -0.012942436151206493, + -0.014811132103204727, + -0.02886037342250347, + 0.029454130679368973, + -0.008022964000701904, + 0.0021334670018404722, + -0.03863103315234184 + ], + [ + 0.033705271780490875, + -0.027439622208476067, + -0.06377942860126495, + -0.015736721456050873, + 0.026079978793859482, + 0.00010748840577434748, + -0.0002489046601112932, + -0.02930794656276703 + ] + ], + [ + [ + 0.003220537444576621, + 0.04691672325134277, + 0.0034802171867340803, + -0.01631399802863598, + 0.03243424370884895, + 0.005761491134762764, + 0.008145741187036037, + 0.03719242662191391 + ], + [ + -0.07327664643526077, + 0.05856793746352196, + 0.05575251206755638, + -0.05868099257349968, + -0.008412252180278301, + 0.021700354292988777, + 3.3852116757771e-05, + 0.04903397709131241 + ], + [ + -0.015763331204652786, + 0.08353963494300842, + 0.0136560732498765, + -0.05168149992823601, + -0.012173169292509556, + 0.017266370356082916, + -0.003719913074746728, + 0.053398195654153824 + ], + [ + -0.030785895884037018, + 0.021448832005262375, + -0.0009476044797338545, + 0.021399689838290215, + 0.06014516204595566, + 0.021167168393731117, + -0.006100354250520468, + 0.0006892578094266355 + ], + [ + 0.01712007448077202, + -0.030103670433163643, + 0.011211994104087353, + -0.012121288105845451, + 0.024359898641705513, + -0.008124848827719688, + -0.0045176162384450436, + 0.010204008780419827 + ], + [ + -0.012693437747657299, + -0.0014785456005483866, + 0.014796608127653599, + -0.049315061420202255, + 0.017876822501420975, + -0.003064640099182725, + -0.00044017424806952477, + -0.0059758140705525875 + ], + [ + 0.021939093247056007, + 0.024029135704040527, + 0.031413767486810684, + -0.04060874879360199, + 0.04723501577973366, + -0.037853725254535675, + 0.0010752876987680793, + -0.012698314152657986 + ], + [ + -0.022183438763022423, + -0.011292386800050735, + -0.027730880305171013, + 0.03551990166306496, + 0.014207689091563225, + -0.05564763769507408, + 0.0034377500414848328, + -0.03919512405991554 + ] + ], + [ + [ + 0.017665527760982513, + 0.02584412507712841, + -0.005686011165380478, + 0.07403957098722458, + 0.01931527629494667, + -0.0004867102252319455, + 0.009754050523042679, + 0.023235727101564407 + ], + [ + 0.05509273335337639, + 0.010476022958755493, + 0.07664868235588074, + -0.022635379806160927, + -0.05696525424718857, + 0.0019894614815711975, + -0.004077325575053692, + -0.02418496087193489 + ], + [ + -0.03363822028040886, + 0.03086673840880394, + 0.019837604835629463, + 0.011534682475030422, + -0.046340152621269226, + -0.020885910838842392, + 0.00340621848590672, + -0.0012978595914319158 + ], + [ + -0.031596116721630096, + 0.005718749016523361, + 0.02363886497914791, + 0.049452319741249084, + -0.006638370454311371, + -0.03828440606594086, + 0.0031606685370206833, + -0.004262927453964949 + ], + [ + -0.04079686850309372, + 0.06434120982885361, + -0.008060974068939686, + -0.02411559224128723, + 0.019676553085446358, + -0.0004182986740488559, + -0.000598226091824472, + -0.015753846615552902 + ], + [ + -0.012212902307510376, + -0.0035351456608623266, + -0.011044967919588089, + -0.058244504034519196, + 0.03637499734759331, + -0.019577886909246445, + 0.0010957111371681094, + -0.022616146132349968 + ], + [ + -0.027338765561580658, + -0.006887834053486586, + -0.005746159236878157, + -0.002384669380262494, + 0.029074860736727715, + -0.021904606372117996, + 0.0038412187714129686, + -0.010842666029930115 + ], + [ + -0.006566227879375219, + 0.03930990770459175, + 0.018889661878347397, + -0.015460547991096973, + 0.03399643674492836, + 0.004218080081045628, + 0.0009903317550197244, + 0.004346251953393221 + ] + ], + [ + [ + 0.030879944562911987, + 0.028885049745440483, + -0.013850043527781963, + 0.03694538399577141, + -0.005180442705750465, + 0.011282284744083881, + -0.002433119574561715, + -0.021003209054470062 + ], + [ + 0.12259355932474136, + 0.022295862436294556, + 0.1897198110818863, + -0.1402541846036911, + -0.010814499109983444, + 0.08736183494329453, + -0.004174996633082628, + 0.30340269207954407 + ], + [ + -0.009325620718300343, + 0.047747448086738586, + 0.044572409242391586, + -0.0025907044764608145, + -0.012971427291631699, + 0.04710910841822624, + 0.0031675598584115505, + 0.10882578045129776 + ], + [ + 0.01497171726077795, + 0.03169722855091095, + 0.01262550801038742, + 0.06214401125907898, + -0.01480111014097929, + -0.001684309565462172, + 0.009241396561264992, + -0.00862998329102993 + ], + [ + -0.026988856494426727, + 0.020340289920568466, + 0.022071463987231255, + -0.019979629665613174, + 0.035327017307281494, + 0.003403899958357215, + -0.0004152222245465964, + -0.005350247025489807 + ], + [ + 0.0333445779979229, + 0.0234694667160511, + 0.02128487080335617, + 0.025157175958156586, + 0.02705111727118492, + 0.006696535274386406, + 0.005178219638764858, + 0.02249695360660553 + ], + [ + -0.020285382866859436, + -0.03343268483877182, + 0.005234679207205772, + -0.04024139791727066, + 0.03343258798122406, + -0.009428367018699646, + 0.004559269640594721, + -0.010640962049365044 + ], + [ + 0.047331955283880234, + -0.02570519596338272, + -0.0050963545218110085, + -0.0004887181567028165, + 0.0369843952357769, + 0.0016845650970935822, + -0.0025435343850404024, + -0.013113277964293957 + ] + ], + [ + [ + 0.04708777740597725, + 0.0546407513320446, + -0.019778253510594368, + -0.03020212985575199, + 0.04295117408037186, + -0.011064196936786175, + 0.005273774731904268, + -0.06307312846183777 + ], + [ + 0.02373342402279377, + 0.008690428920090199, + 0.13126248121261597, + -0.15886718034744263, + -0.11903645843267441, + -0.06723484396934509, + 0.010034335777163506, + 0.38366520404815674 + ], + [ + -0.021705718711018562, + -0.0017231324454769492, + 0.02339080162346363, + 0.002156130038201809, + -0.06332606077194214, + -0.027919650077819824, + 0.004089817870408297, + 0.1876179575920105 + ], + [ + 0.009987455792725086, + 0.021744379773736, + 0.01557222194969654, + -0.04061278700828552, + 0.012890533544123173, + -0.013378339819610119, + 0.014072220772504807, + 0.08491210639476776 + ], + [ + 0.002385040745139122, + 0.009911761619150639, + 0.03644455224275589, + -0.03119037114083767, + 0.05329178273677826, + 0.006067113485187292, + -0.0031332923099398613, + 0.0707654356956482 + ], + [ + -0.027113385498523712, + 0.022774750366806984, + 0.019746411591768265, + 0.025245368480682373, + 0.010035448707640171, + 0.012227477505803108, + 0.003915358334779739, + 0.055243562906980515 + ], + [ + -0.0063345348462462425, + 0.02745645120739937, + 0.013698599301278591, + -0.0013396875001490116, + 0.03583969175815582, + 0.0021140098106116056, + 0.0032817081082612276, + 0.025703664869070053 + ], + [ + 0.007595096714794636, + -0.05127161741256714, + 0.018067358061671257, + 0.004845688585191965, + 0.012249483726918697, + -0.01593918167054653, + -0.00196365499868989, + 0.060166556388139725 + ] + ], + [ + [ + 0.016169100999832153, + 0.015862340107560158, + -0.034561093896627426, + 0.1274254471063614, + -0.05113687366247177, + -0.07104127109050751, + 0.001111703459173441, + -0.0124658877030015 + ], + [ + -0.08562838286161423, + -0.02200344391167164, + 0.09687243402004242, + 0.005644212476909161, + -0.170273557305336, + -0.0846066027879715, + 0.01938086561858654, + 0.2188040167093277 + ], + [ + -0.03147229924798012, + -0.018969368189573288, + 0.026662304997444153, + 0.09535887092351913, + -0.10537650436162949, + -0.07057502865791321, + 0.011506779119372368, + 0.08022982627153397 + ], + [ + -0.020279644057154655, + 0.02046308107674122, + 0.026706155389547348, + -0.04811036214232445, + -0.0694994404911995, + -0.02081410586833954, + 0.02150288037955761, + 0.0415726862847805 + ], + [ + -0.0013376087881624699, + -0.01326598972082138, + -0.009371246211230755, + 0.05787783861160278, + 0.019228894263505936, + -0.004149371758103371, + 0.0028852131217718124, + 0.01626676693558693 + ], + [ + -0.004703984130173922, + -0.004668634384870529, + -0.007519465405493975, + -0.0021265544928610325, + -0.03659944608807564, + -0.035296935588121414, + 0.0010330276563763618, + -0.027365025132894516 + ], + [ + 0.01449507661163807, + 0.01224221009761095, + -0.013604113832116127, + 0.013627513311803341, + -0.003761444240808487, + -0.013962718658149242, + 0.0019797710701823235, + 0.00248170318081975 + ], + [ + -0.041097719222307205, + 0.01336254458874464, + 0.030096007511019707, + -0.05458754301071167, + 0.020814640447497368, + -0.027607381343841553, + -0.0019918824546039104, + 0.05074363201856613 + ] + ], + [ + [ + 0.02314540185034275, + -0.016008121892809868, + -0.04159478098154068, + 0.07366753369569778, + -0.03850163519382477, + -0.06541289389133453, + 0.010036026127636433, + 0.04126209765672684 + ], + [ + -0.07927850633859634, + 0.11211354285478592, + 0.05694792792201042, + -0.07297089695930481, + -0.010149702429771423, + -0.09250883758068085, + 0.015601404942572117, + -0.08281136304140091 + ], + [ + -0.04661364108324051, + 0.04807087406516075, + 0.060821160674095154, + 0.12104525417089462, + -0.01340529415756464, + -0.07738678902387619, + 0.011063961312174797, + -0.10044616460800171 + ], + [ + -0.05714194476604462, + -0.009717494249343872, + 0.07285498827695847, + -0.007560129277408123, + -0.08152791857719421, + -0.027731476351618767, + 0.011731580831110477, + -0.04754829779267311 + ], + [ + -0.008494297042489052, + -0.014200201258063316, + 0.030893530696630478, + -0.009737287648022175, + -0.018739944323897362, + -0.02910281904041767, + 0.009979317896068096, + -0.03538310155272484 + ], + [ + 0.006399458274245262, + -0.015949133783578873, + 0.002267714822664857, + 0.0177000779658556, + -0.010105075314640999, + 0.007993895560503006, + 0.0010534122120589018, + -0.018530748784542084 + ], + [ + -0.024193719029426575, + -0.037368640303611755, + 0.05385681241750717, + 0.006880240049213171, + -0.04035865142941475, + -0.007657474372535944, + 0.005702108610421419, + -0.007152618374675512 + ], + [ + -0.01313439104706049, + 0.035078950226306915, + 0.03262544423341751, + -0.10286692529916763, + 0.007873139344155788, + 0.004375115968286991, + 0.0034721933770924807, + -0.057828906923532486 + ] + ], + [ + [ + 0.0015094551490619779, + -0.0037783412262797356, + -0.041453149169683456, + 0.05343955010175705, + -0.05641055107116699, + -0.032581623643636703, + 0.009075518697500229, + 0.03308048099279404 + ], + [ + 0.01080410648137331, + 0.19108712673187256, + -0.026222683489322662, + -0.1049545407295227, + 0.20901824533939362, + 0.08332358300685883, + 0.01803429052233696, + 0.04640057310461998 + ], + [ + 0.017513934522867203, + 0.13038626313209534, + 0.032652925699949265, + 0.011465733870863914, + 0.18698011338710785, + 0.051278501749038696, + 0.0050444649532437325, + 0.06500063091516495 + ], + [ + 0.026574837043881416, + 0.0370124913752079, + -0.007568896748125553, + -0.04658748582005501, + -0.00966734066605568, + 0.019052013754844666, + -0.00022309199266601354, + 0.04766188934445381 + ], + [ + 0.03181733563542366, + 0.037934962660074234, + 0.04109204187989235, + 0.028533408418297768, + 0.046855855733156204, + 0.015713557600975037, + 0.0011658892035484314, + 0.029260657727718353 + ], + [ + 0.029574604704976082, + 0.019733818247914314, + 0.008612710982561111, + 0.008139015175402164, + 0.0163979884237051, + 0.02153223194181919, + 0.004701680038124323, + 0.005716489162296057 + ], + [ + 0.045273687690496445, + -0.005178686697036028, + 0.035512156784534454, + -0.05051221698522568, + -0.03210536763072014, + 0.020081376656889915, + -0.005475402344018221, + -0.009058102034032345 + ], + [ + 0.029938537627458572, + 0.00080389145296067, + -0.0204447191208601, + -0.014743839390575886, + 0.026595430448651314, + 0.024255160242319107, + 3.722627297975123e-05, + 0.0037382349837571383 + ] + ], + [ + [ + -0.0003715180791914463, + -0.06402165442705154, + -0.00046848010970279574, + -0.03242013603448868, + 0.0021476219408214092, + -0.019544897601008415, + 0.0019248216412961483, + 0.03903350979089737 + ], + [ + -0.055718984454870224, + -0.0056474641896784306, + -0.06417400389909744, + -0.17732064425945282, + 0.32743197679519653, + -0.01331361010670662, + 0.0016965834656730294, + 0.033597346395254135 + ], + [ + -0.02555612474679947, + 0.005615927278995514, + -0.028279514983296394, + -0.08378514647483826, + 0.06636359542608261, + -0.011610358953475952, + -0.001058837864547968, + -0.02448645420372486 + ], + [ + 0.02068919874727726, + -0.031359702348709106, + -0.09356492757797241, + -0.07085816562175751, + 0.07659707218408585, + -0.018051117658615112, + -0.005967427976429462, + -0.027356795966625214 + ], + [ + 0.012303602881729603, + -0.01762014999985695, + -0.03965068235993385, + -0.08349713683128357, + 0.03593345731496811, + 0.002074137097224593, + 0.0014912867918610573, + -0.021576352417469025 + ], + [ + 0.033940695226192474, + -0.029378073289990425, + -0.0330352708697319, + 0.03391343355178833, + -0.02557547204196453, + 0.009299595840275288, + -0.005498511251062155, + -0.04035209119319916 + ], + [ + 0.021058205515146255, + -0.0228632390499115, + -0.04326479136943817, + -0.07233523577451706, + 0.0029118796810507774, + -0.008291506208479404, + 0.00045932771172374487, + -0.03698957338929176 + ], + [ + 0.03190057352185249, + -0.02294217422604561, + -0.005359566770493984, + -0.010958338156342506, + 0.042856115847826004, + 0.015247580595314503, + -0.0009058800642378628, + -0.009829061105847359 + ] + ], + [ + [ + 0.006657279096543789, + 0.031515780836343765, + -0.0015185297233983874, + 0.05281578376889229, + -0.0030828630551695824, + 0.0015480483416467905, + 0.0049115875735878944, + 0.041041161864995956 + ], + [ + 0.011154163628816605, + -0.07069145143032074, + -0.04434756189584732, + 0.06754521280527115, + 0.0658046305179596, + 0.03674199804663658, + -0.00466578733175993, + -0.015208771452307701 + ], + [ + -0.01098690927028656, + -0.023191994056105614, + -0.004196473862975836, + 0.10994754731655121, + -0.1030120998620987, + 0.03843710944056511, + -0.004391757771372795, + -0.031035806983709335 + ], + [ + 0.010775008238852024, + -0.020793715491890907, + -0.024980811402201653, + 0.004081035498529673, + -0.030696582049131393, + 0.003430834738537669, + 0.0019765598699450493, + -0.0461832620203495 + ], + [ + 0.022640760987997055, + -0.011241755448281765, + -0.021434498950839043, + 0.005859134718775749, + -0.025272034108638763, + -0.0034824225585907698, + 0.0032535467762500048, + -0.029967159032821655 + ], + [ + -0.0022522846702486277, + -0.006160680670291185, + -0.024659277871251106, + -0.021563678979873657, + 0.017344944179058075, + -0.021402226760983467, + -0.0035409049596637487, + -0.02929156832396984 + ], + [ + -0.02043052203953266, + -0.0015831815544515848, + -0.020400941371917725, + 0.03990444913506508, + -0.0004507047706283629, + 0.0007214633515104651, + 0.0024577102158218622, + -0.03489056974649429 + ], + [ + 0.0009107451187446713, + -0.04659958556294441, + -0.02360416390001774, + 0.07389141619205475, + -0.013352436013519764, + -0.0012748516164720058, + 0.00012923353642690927, + -0.016014359891414642 + ] + ], + [ + [ + -0.004031038377434015, + 0.06007026135921478, + -0.0007486783433705568, + -0.0031865069177001715, + 0.01860062964260578, + 0.006972815841436386, + -0.0011977247195318341, + 0.011188252829015255 + ], + [ + -0.009086420759558678, + 0.05060000717639923, + 0.00739708635956049, + -0.06200924515724182, + 0.06490447372198105, + 0.019750036299228668, + 1.8728267605183646e-05, + 0.02268023043870926 + ], + [ + 0.0011463057016953826, + -0.005301299039274454, + 0.04907069727778435, + -0.10821857303380966, + -0.0455496609210968, + 0.047655630856752396, + -0.001535426126793027, + 0.0029435281176120043 + ], + [ + 0.006745639722794294, + 0.026047175750136375, + 0.03557593747973442, + -0.05105827748775482, + 0.002068733097985387, + 0.009547051042318344, + -0.0002590746444184333, + 0.04305073618888855 + ], + [ + 0.010828199796378613, + 0.019045373424887657, + 0.017620233818888664, + -0.04513699561357498, + 0.003138558007776737, + -0.00010290775389876217, + 0.0005800811923108995, + -0.016268359497189522 + ], + [ + 0.002445135498419404, + 0.029925735667347908, + 0.014202162623405457, + 0.020812077447772026, + -0.01769254170358181, + 0.010732497088611126, + 0.001501087681390345, + 0.012577611953020096 + ], + [ + 0.013922314159572124, + 0.026253247633576393, + 0.05159140005707741, + -0.02560805156826973, + 0.03248957544565201, + -0.014838890172541142, + 0.003268703119829297, + 0.007691729348152876 + ], + [ + -0.035076141357421875, + 0.005074883811175823, + 0.005050128325819969, + -0.03349277377128601, + -0.012557176873087883, + 0.014744953252375126, + -0.005777205340564251, + 0.0029490594752132893 + ] + ], + [ + [ + -0.00467815063893795, + 0.019153766334056854, + 0.021536579355597496, + -0.005690266843885183, + 0.02851932868361473, + -0.011251488700509071, + 0.003254977520555258, + 0.024954479187726974 + ], + [ + -0.02577553130686283, + -0.034139234572649, + -0.000965355837251991, + -0.03377874940633774, + 0.048347458243370056, + 0.0016396761639043689, + 0.0042406776919960976, + 0.006309839431196451 + ], + [ + -0.013321392238140106, + -0.003638817463070154, + -0.007195755839347839, + -0.021761950105428696, + -0.032176852226257324, + 0.020011719316244125, + 0.0015529576921835542, + -0.015291029587388039 + ], + [ + 0.03238755092024803, + -0.019649477675557137, + -0.06351985037326813, + -0.011884860694408417, + 0.03222183883190155, + 0.0020869243890047073, + -0.004112122114747763, + -0.0379023477435112 + ], + [ + 0.001999708591029048, + 0.010784710757434368, + -0.03721160814166069, + -0.031861040741205215, + 0.017435932531952858, + -0.010129373520612717, + -0.0012238104827702045, + -0.036872781813144684 + ], + [ + -0.02841494046151638, + -0.0077344984747469425, + 0.0030832672491669655, + 0.010021772235631943, + -0.02299349382519722, + -0.0011497460072860122, + 0.0002062158746412024, + -0.0126424515619874 + ], + [ + 0.05879471078515053, + 0.0016576764173805714, + 0.0011264156782999635, + 0.019112233072519302, + -0.027856789529323578, + 0.0206501055508852, + -0.004655002150684595, + 0.00990780908614397 + ], + [ + -0.040616776794195175, + -0.019175207242369652, + 0.01963145099580288, + -0.0057840002700686455, + 0.059348661452531815, + 0.0022817119024693966, + -0.0056674969382584095, + 0.0435250885784626 + ] + ], + [ + [ + 0.026906216517090797, + 0.03495531901717186, + 0.01561003364622593, + -0.032815899699926376, + 0.012961712665855885, + 0.023452751338481903, + 0.0007745952461846173, + 0.025639737024903297 + ], + [ + 0.013180704787373543, + 0.000151719301356934, + 0.013174232095479965, + 0.02266211248934269, + 0.004290116485208273, + 0.01575540378689766, + -3.8623835280304775e-05, + 0.004167682025581598 + ], + [ + 0.00915304385125637, + 0.008511967025697231, + 0.008641550317406654, + 0.0682753473520279, + -0.06658344715833664, + 0.019793981686234474, + 0.004111799877136946, + -0.018930993974208832 + ], + [ + 0.011766777373850346, + -0.016970572993159294, + -0.051741961389780045, + 0.016859734430909157, + -0.026318103075027466, + -0.020263319835066795, + 0.0015697055496275425, + -0.09965558350086212 + ], + [ + -0.01184807438403368, + 0.03494466468691826, + -0.00859544426202774, + 0.07735160738229752, + 0.006083793006837368, + -0.027346322312951088, + -0.001636180211789906, + -0.01401776447892189 + ], + [ + -0.0298349279910326, + -0.011934991925954819, + 0.02231072448194027, + 0.01568078249692917, + -0.018259506672620773, + -0.007824699394404888, + 0.0004743097524624318, + -0.005038091912865639 + ], + [ + 0.0006439401186071336, + -0.04891534894704819, + 0.01011788472533226, + 0.004828695673495531, + -0.010650592856109142, + -0.009660420008003712, + 0.0026182360015809536, + 0.07452120631933212 + ], + [ + -0.0029861053917557, + 0.023432306945323944, + -0.006174479611217976, + 0.05881356820464134, + -0.02042515203356743, + 0.014039244502782822, + 0.0008637408609502017, + -0.013714049942791462 + ] + ], + [ + [ + 0.031763412058353424, + 0.045319460332393646, + 0.03704092651605606, + -0.04653820022940636, + 0.026226013898849487, + 0.0060088918544352055, + -0.0007206834852695465, + 0.03153114765882492 + ], + [ + 0.023994244635105133, + 0.05001296103000641, + 0.0208175927400589, + -0.03361321613192558, + 0.011179142631590366, + 0.017567122355103493, + 0.0040858471766114235, + 0.041665755212306976 + ], + [ + -0.0019176916684955359, + -0.008860721252858639, + 0.00804830715060234, + -0.06710585951805115, + -0.005584254860877991, + 0.02672041952610016, + -0.003805427113547921, + 0.03774990141391754 + ], + [ + 0.022103071212768555, + 0.051502980291843414, + -0.00920149963349104, + 0.025761647149920464, + -0.007208717055618763, + -0.042106352746486664, + -0.004099592566490173, + -0.01077309437096119 + ], + [ + -0.011391744948923588, + -0.008205968886613846, + 0.03201839327812195, + -0.0379716157913208, + -0.0004324305336922407, + 0.011689878068864346, + 0.0009052681270986795, + 0.0008108107722364366 + ], + [ + -0.012355463579297066, + 0.00889628753066063, + 0.019416918978095055, + -0.0491940937936306, + 0.0336642749607563, + 0.018318308517336845, + 0.004638113081455231, + 0.01793205924332142 + ], + [ + -0.04966837540268898, + 0.02633105404675007, + 0.023824701085686684, + -0.06964955478906631, + 0.004300068132579327, + 0.009167592972517014, + -0.0035373540595173836, + 0.03498886153101921 + ], + [ + 0.004149044398218393, + 0.018579240888357162, + 0.02129911631345749, + 0.051819540560245514, + -0.025508560240268707, + -0.0018133368575945497, + -0.00390626210719347, + -0.0019575103651732206 + ] + ], + [ + [ + 0.0019884395878762007, + 0.005480616819113493, + 0.01830737665295601, + 0.02411513216793537, + -0.03454179689288139, + 0.01661810651421547, + -0.00010770565859274939, + 0.019446440041065216 + ], + [ + -0.0035209162160754204, + -0.028522534295916557, + 0.004664111416786909, + 0.004271877929568291, + -0.02149984985589981, + -0.006206894293427467, + 0.007948211394250393, + 0.01753576472401619 + ], + [ + 0.004358015023171902, + -0.03554169833660126, + -0.000732944521587342, + -0.011015359312295914, + 0.013186343014240265, + 0.034326937049627304, + -0.0023806795943528414, + 0.000423645629780367 + ], + [ + 0.008785500191152096, + 0.011739649809896946, + 0.013015623204410076, + 0.07066868990659714, + -0.031190283596515656, + -0.03341333568096161, + 0.0018862433498725295, + -0.011331228539347649 + ], + [ + 0.016341447830200195, + -0.01127127930521965, + -0.013935831375420094, + -0.03432537615299225, + 0.013473457656800747, + -0.018385739997029305, + 0.006115016061812639, + -0.005081954877823591 + ], + [ + -0.020464077591896057, + 0.04542534425854683, + -0.017606521025300026, + 0.0037451875396072865, + -0.05910131335258484, + 0.005355995148420334, + 0.003967034164816141, + -0.0028092795982956886 + ], + [ + -0.011377179995179176, + 0.03501180559396744, + 0.02200048230588436, + -0.05324458330869675, + -0.014086994342505932, + 0.04337421804666519, + 0.0028321072459220886, + -0.06663086265325546 + ], + [ + 0.021992316469550133, + -0.01023730169981718, + 0.02641773596405983, + -0.04268207028508186, + -0.0049942475743591785, + 0.05112351477146149, + -0.005716235376894474, + 0.00319046713411808 + ] + ], + [ + [ + -0.009290002286434174, + 0.019779661670327187, + 0.028369976207613945, + -0.03391946852207184, + -0.01544881146401167, + 0.012760061770677567, + 0.004034359473735094, + 0.05201878026127815 + ], + [ + -0.013505686074495316, + -0.0036509917117655277, + 0.023913055658340454, + 0.015986384823918343, + -0.03826695680618286, + 0.027190566062927246, + 0.007120308466255665, + -0.00520288897678256 + ], + [ + 0.0029465998522937298, + 0.030355554074048996, + -0.024989113211631775, + -0.02466447465121746, + 0.012373692356050014, + 0.03337834030389786, + -0.0011984935263171792, + -0.06309749186038971 + ], + [ + 0.01442688424140215, + -0.021765485405921936, + -0.007461355067789555, + 0.04745425283908844, + -0.06429755687713623, + -0.018162401393055916, + -0.000617266574408859, + -0.0308294165879488 + ], + [ + 0.021895315498113632, + 0.042971521615982056, + 0.027369080111384392, + 0.062570720911026, + 0.00519077992066741, + 0.012374100275337696, + 0.0011496433289721608, + 0.019891558215022087 + ], + [ + 0.0016471476992592216, + -0.01427871361374855, + 0.04901239648461342, + 0.028836295008659363, + -0.008846516720950603, + 0.005139724817126989, + -0.0024649593979120255, + -0.0063686431385576725 + ], + [ + 0.024311251938343048, + 0.013757845386862755, + -0.017661159858107567, + -0.0029138168320059776, + 0.003288343083113432, + 0.027981380000710487, + -0.0037630335427820683, + 0.001969374483451247 + ], + [ + -0.010592025704681873, + -0.024800408631563187, + -0.04720895737409592, + -0.07662469148635864, + 0.002968601416796446, + 0.01562541536986828, + -0.00931378174573183, + -0.01402820274233818 + ] + ], + [ + [ + 0.009850326925516129, + 0.07045552879571915, + 0.012183796614408493, + -0.0437471903860569, + 0.005191592965275049, + 0.014072692021727562, + 0.0031691205222159624, + 0.04194596782326698 + ], + [ + -0.003993731923401356, + 0.07178027927875519, + 0.02213866636157036, + -0.07155248522758484, + -0.0027623602654784918, + 0.033144090324640274, + 0.002711333567276597, + 0.017058009281754494 + ], + [ + 0.02614920772612095, + 0.05786094442009926, + -0.00581064959987998, + -0.012962762266397476, + 0.02323671244084835, + 0.0024220505729317665, + -0.0028699347749352455, + 0.010196512565016747 + ], + [ + 0.009567998349666595, + 0.001957615138962865, + -0.005174347665160894, + -0.08125078678131104, + 0.011440008878707886, + 0.014306584373116493, + 0.004230569116771221, + 0.032766617834568024 + ], + [ + -0.007074334658682346, + 0.027076609432697296, + 0.022683370858430862, + -0.0661698430776596, + -0.018682552501559258, + -0.004980286117643118, + -0.0016763587482273579, + 0.056813523173332214 + ], + [ + 0.03533179685473442, + -0.026744289323687553, + 0.055656641721725464, + -0.00746717257425189, + 0.016712309792637825, + 0.036070168018341064, + -0.0029553640633821487, + 0.0002724079822655767 + ], + [ + 0.01967337727546692, + -0.008432695642113686, + 0.010955385863780975, + -0.006666249595582485, + 0.00875681173056364, + 0.019610131159424782, + 0.00201854994520545, + -0.022675104439258575 + ], + [ + -0.01827876642346382, + 0.02395530790090561, + -0.01825840212404728, + 0.06549610942602158, + -0.0035375149454921484, + -0.015933072194457054, + 4.9101417971542105e-05, + -0.005732385907322168 + ] + ], + [ + [ + 0.015832124277949333, + 0.04000043869018555, + 0.006212812848389149, + 0.001033375971019268, + 0.0027935844846069813, + -0.00835844874382019, + 0.005375500302761793, + 0.04137355461716652 + ], + [ + 0.0003631418803706765, + -0.004733639303594828, + 0.012651678174734116, + 0.03599067032337189, + -0.019782517105340958, + -0.008408598601818085, + 0.002540500136092305, + 0.031068304553627968 + ], + [ + 0.03980891779065132, + -0.04266461357474327, + 0.013936418108642101, + -0.002100197598338127, + -0.038910869508981705, + -0.042749762535095215, + 0.0005672714905813336, + -0.008819361217319965 + ], + [ + -0.01549141388386488, + 0.07401978224515915, + -0.011533224023878574, + -0.021592767909169197, + 0.027752919122576714, + -0.005072418134659529, + 0.0022535210009664297, + -0.004074315074831247 + ], + [ + -0.04076296091079712, + 0.007113859988749027, + 0.017873255535960197, + -0.09132011234760284, + -0.037718143314123154, + -0.0003202590742148459, + 0.005704800598323345, + -0.030453648418188095 + ], + [ + 0.014960560947656631, + -0.028186429291963577, + -0.033946406096220016, + -0.008214331232011318, + -0.01382719911634922, + 0.01604052446782589, + 0.0011201991001144052, + -0.023217925801873207 + ], + [ + 0.005014947149902582, + -0.04904123395681381, + -0.021105466410517693, + 0.009584352374076843, + -0.034113746136426926, + 0.003627522150054574, + 0.002775321714580059, + -0.022269096225500107 + ], + [ + -0.014884375967085361, + -0.03041590191423893, + 0.05198189616203308, + 0.02021039091050625, + 0.029204050078988075, + 0.03026435524225235, + -0.0024461408611387014, + 0.058198269456624985 + ] + ], + [ + [ + 0.04364507645368576, + 0.053534332662820816, + -0.005044605117291212, + 0.0442015677690506, + 0.016795506700873375, + -0.011768280528485775, + 0.0004117675998713821, + 0.01696326956152916 + ], + [ + 0.03706022724509239, + 0.000376919808331877, + -0.005362798925489187, + 0.013395418412983418, + -0.01909090019762516, + 0.017178423702716827, + 0.007699698209762573, + -0.01664186269044876 + ], + [ + 0.023897608742117882, + -0.01194939948618412, + 0.009397152811288834, + 0.018418392166495323, + 0.01945147104561329, + 0.007964464835822582, + -0.0021918269339948893, + -0.03259453549981117 + ], + [ + -0.039262715727090836, + 0.06139043718576431, + 0.014894065447151661, + -0.010972459800541401, + -0.04037734493613243, + 0.031313154846429825, + 0.0040224832482635975, + 0.003912790212780237 + ], + [ + 0.009408005513250828, + -0.0009769466705620289, + 0.009312774986028671, + -0.06353874504566193, + -0.012131115421652794, + 0.004587376955896616, + 0.0006452741799876094, + -0.02324407547712326 + ], + [ + -0.02906310372054577, + -0.009362876415252686, + -0.04660520330071449, + 0.029457686468958855, + 0.0064585269428789616, + -0.00013420649338513613, + -0.001626294106245041, + -0.03535887971520424 + ], + [ + -0.029669981449842453, + 0.01909295842051506, + 0.00809968076646328, + -0.017230065539479256, + 0.002198271220549941, + 0.01653190888464451, + -0.004508364014327526, + -0.011204857379198074 + ], + [ + 0.010630820877850056, + -0.02651895396411419, + -0.01693885028362274, + -0.03346215933561325, + -0.03532493859529495, + 0.045162953436374664, + 0.0048084380105137825, + -0.036395665258169174 + ] + ], + [ + [ + 0.03676842525601387, + 0.057188693434000015, + 0.03682580217719078, + -0.03276504948735237, + 0.05831105634570122, + 0.012854295782744884, + 0.00016338497516699135, + 0.01098472811281681 + ], + [ + 0.03882796689867973, + 0.04575461894273758, + 0.013497973792254925, + -0.04195021465420723, + 0.021734457463026047, + 0.030285293236374855, + 0.0020185529720038176, + 0.05504108592867851 + ], + [ + 0.013494933024048805, + -0.007151382509618998, + 0.012950004078447819, + -0.05080506205558777, + -0.03471425548195839, + 0.010152100585401058, + 0.0012854316737502813, + 0.01802017353475094 + ], + [ + 0.015200871974229813, + 0.018588043749332428, + 0.018564192578196526, + 0.008766925893723965, + -0.0417478010058403, + -0.01445373147726059, + -0.0020978208631277084, + 0.07200413197278976 + ], + [ + 0.027316007763147354, + 0.027896124869585037, + -0.00642414391040802, + -0.012354463338851929, + 0.03120071440935135, + 0.015034842304885387, + 0.0008906589355319738, + 0.01614912785589695 + ], + [ + -0.0024228563997894526, + 0.04122895747423172, + 0.03965893015265465, + -0.02345437929034233, + -0.012202764861285686, + 0.006111858878284693, + 0.0014076087391003966, + 0.01234383974224329 + ], + [ + -0.014779522083699703, + -0.01435845997184515, + 0.035827670246362686, + -0.00615320447832346, + 0.013578345067799091, + 0.014585570432245731, + 0.0024426656309515238, + 0.030677633360028267 + ], + [ + 0.028690936043858528, + 0.025967668741941452, + 0.0022847771178931, + -0.030274752527475357, + -0.07283033430576324, + 0.05115921422839165, + 0.003505631582811475, + -0.06965424865484238 + ] + ], + [ + [ + 0.0022526041138917208, + -0.0033321205992251635, + 0.052210696041584015, + 0.022080007940530777, + 0.04499586299061775, + -0.014366740360856056, + -0.0024918087292462587, + 0.029814230278134346 + ], + [ + -0.005764272063970566, + -0.04428812488913536, + 0.014807346276938915, + -0.03224075585603714, + 0.056032758206129074, + -0.03580719977617264, + -0.0026982619892805815, + 0.0016177220968529582 + ], + [ + 0.00624062167480588, + 0.0220798309892416, + -0.02083788439631462, + -0.07462318986654282, + -0.02508326806128025, + 0.010908132418990135, + -0.0029772543348371983, + -0.025691842660307884 + ], + [ + -0.002292643766850233, + 0.023217210546135902, + 0.0014260017778724432, + 0.06721135973930359, + -0.06459220498800278, + 0.007774314843118191, + 0.004374436568468809, + 0.011003950610756874 + ], + [ + 0.034771841019392014, + -0.0318676121532917, + -0.04294413700699806, + 0.024908022955060005, + 0.010661724023520947, + 0.01570594310760498, + -0.0033350924495607615, + -0.028290625661611557 + ], + [ + 0.06630302965641022, + -0.005670373793691397, + 0.021119248121976852, + -0.017631419003009796, + -0.00850875023752451, + 0.0006627098773606122, + -0.0004939071368426085, + -0.009127829223871231 + ], + [ + 0.01654650643467903, + 0.01253419928252697, + -0.025791052728891373, + 0.007707177195698023, + -0.00013679992116522044, + -0.014829759486019611, + -0.0023751447442919016, + -0.026496700942516327 + ], + [ + 0.04763633757829666, + 0.01124358270317316, + 0.043776508420705795, + -0.08887940645217896, + -0.0014887022553011775, + 0.04577095806598663, + -0.003335018176585436, + 0.0416775681078434 + ] + ], + [ + [ + -0.003762605832889676, + 0.030300317332148552, + 0.02825080044567585, + -0.019750751554965973, + 0.015280344523489475, + 0.008573169820010662, + -0.004992991220206022, + 0.02650953270494938 + ], + [ + 0.02791803888976574, + -0.004731468856334686, + 0.0018360503017902374, + 0.04023616015911102, + 0.036189574748277664, + 0.02284659445285797, + -0.005476361606270075, + 0.0006030406220816076 + ], + [ + 0.02068227156996727, + 0.05914341285824776, + -0.01686372421681881, + 0.031238244846463203, + -0.007535550743341446, + -0.0028557840269058943, + -0.007221037056297064, + -0.03158998861908913 + ], + [ + -0.01047028973698616, + -0.0219810139387846, + 0.04487505182623863, + -0.011563003063201904, + 0.0052381958812475204, + -0.03498772904276848, + 0.003390582511201501, + -0.03678049519658089 + ], + [ + 0.002409199019894004, + 0.004758660215884447, + -0.022777343168854713, + -0.013153568841516972, + -0.01727961376309395, + 0.005681423004716635, + -0.0014909598976373672, + -0.028424357995390892 + ], + [ + -0.004583167377859354, + -0.04666104540228844, + 0.027090568095445633, + -0.018452607095241547, + -0.0051025403663516045, + -0.0003816545067820698, + 0.0017415466718375683, + 0.07826590538024902 + ], + [ + -0.006890173070132732, + 0.007267466280609369, + 0.017637643963098526, + 0.012057092972099781, + -0.011409956030547619, + 0.0038310345262289047, + 0.0017231227830052376, + -0.00191114644985646 + ], + [ + 0.007960431277751923, + -0.056272827088832855, + -0.05826694145798683, + 0.0003836854884866625, + 0.016795653849840164, + 0.013787226751446724, + -0.013345795683562756, + -0.068734310567379 + ] + ], + [ + [ + 0.013285644352436066, + 0.08282268792390823, + 0.002411688445135951, + -0.0377628393471241, + 0.01484021358191967, + 0.0002714339643716812, + -0.004488272126764059, + 0.012675038538873196 + ], + [ + 0.03151894360780716, + 0.03386840969324112, + 0.03792781010270119, + -0.11435781419277191, + -0.005664561875164509, + 0.029355010017752647, + -0.0026940128300338984, + 0.01693064719438553 + ], + [ + -0.013885051012039185, + 0.029663600027561188, + 0.01563509739935398, + -0.04676106572151184, + -0.05618946626782417, + 0.019846541807055473, + -0.00615695072337985, + 0.03729117289185524 + ], + [ + 0.044010140001773834, + 0.03215445205569267, + 0.025053221732378006, + 0.012145090848207474, + 0.019019190222024918, + 0.018023516982793808, + 0.004989819601178169, + 0.023816511034965515 + ], + [ + 0.011076906695961952, + 0.031182264909148216, + 0.012007826007902622, + 0.049136437475681305, + 0.03346193581819534, + 0.005219169892370701, + -0.006070154253393412, + -0.008915836922824383 + ], + [ + -0.06039215624332428, + 0.02284744754433632, + 0.05258370563387871, + -0.01826055720448494, + -0.04258096218109131, + 0.0033205035142600536, + -0.0034266761504113674, + 0.047635212540626526 + ], + [ + 0.04772625118494034, + -0.026430325582623482, + 0.044825244694948196, + -0.017986349761486053, + 0.0341675728559494, + 0.05681335926055908, + -0.004752540960907936, + 0.005222673993557692 + ], + [ + -0.03496083989739418, + 0.024655327200889587, + -0.041038334369659424, + 0.08335919678211212, + -0.05070953071117401, + -0.02722257934510708, + -0.01047928724437952, + 0.05851360410451889 + ] + ], + [ + [ + 0.018539436161518097, + -0.031072795391082764, + 0.01828347146511078, + -0.02438664250075817, + -0.0006402646540664136, + -0.01471284031867981, + -0.0009108440135605633, + 0.0392853207886219 + ], + [ + 0.006299064494669437, + 0.02086871676146984, + -0.0067701032385230064, + -0.061081331223249435, + -0.08863161504268646, + -0.005910913459956646, + 0.0006745777791365981, + 0.005549960304051638 + ], + [ + -0.011893262155354023, + 0.0128922238945961, + 0.032905638217926025, + 0.002741632517427206, + -0.04567447677254677, + -0.007184919435530901, + -0.005096022970974445, + -0.002105282386764884 + ], + [ + 0.007763864938169718, + -0.016378063708543777, + -0.011467178352177143, + -0.05448271334171295, + -0.014852250926196575, + 0.004285230301320553, + 0.0028755227103829384, + -0.02572549134492874 + ], + [ + -0.03566771373152733, + 0.009579156525433064, + -0.0026596831157803535, + 0.05540770664811134, + -0.020920025184750557, + -0.003735494799911976, + -0.0040452671237289906, + -0.004444624297320843 + ], + [ + -0.01366387028247118, + 0.013099195435643196, + 0.019855087623000145, + -0.056049980223178864, + -0.025914333760738373, + 0.04371054843068123, + -0.0023437482304871082, + -0.05624226853251457 + ], + [ + -0.01597057469189167, + -0.0377344936132431, + -0.048863485455513, + -0.018689095973968506, + 0.015524293296039104, + 0.005012843292206526, + -0.003784752683714032, + -0.0321069061756134 + ], + [ + -0.05007527023553848, + -0.06255032867193222, + 0.03361412510275841, + -0.0011421767994761467, + 0.034091465175151825, + 0.03799234703183174, + -0.011453521437942982, + 0.0526658371090889 + ] + ], + [ + [ + 0.006501532159745693, + -0.025837713852524757, + 0.03443487733602524, + -0.06032947450876236, + 0.01855378784239292, + 0.040152594447135925, + 0.0030424639116972685, + 0.04724213480949402 + ], + [ + 0.037370454519987106, + 0.011082860641181469, + -0.025391835719347, + -0.048047877848148346, + -0.07175301760435104, + 0.027214309200644493, + 0.0007823148625902832, + -0.04256632179021835 + ], + [ + -0.0012641731882467866, + 0.04462695121765137, + 0.03728390485048294, + 0.006562874652445316, + -0.02776496112346649, + 0.045290134847164154, + -0.0032099736854434013, + 0.015566847287118435 + ], + [ + 0.0005535315722227097, + -0.005157529842108488, + -0.007238923106342554, + 0.05202881991863251, + 0.003447173861786723, + 0.0028972418513149023, + -0.0032197132240980864, + -0.03417576476931572 + ], + [ + -0.008513013832271099, + -0.021638568490743637, + 0.016955487430095673, + -0.009984977543354034, + 0.0011039242381229997, + 0.0009839667472988367, + 0.0024377331137657166, + 0.004809932317584753 + ], + [ + 0.009930561296641827, + 0.007018253672868013, + -0.034343745559453964, + -0.06553688645362854, + 0.02108464017510414, + 0.048108406364917755, + -2.9305918360478245e-05, + -0.01495879702270031 + ], + [ + 0.0043256101198494434, + 0.03378714621067047, + -0.011437918059527874, + 0.05309233069419861, + -0.015358803793787956, + -0.022454027086496353, + 0.0008785944664850831, + 0.00574861653149128 + ], + [ + 0.057278405874967575, + -0.007069963030517101, + 0.0010475246235728264, + -0.015448578633368015, + -0.0048256502486765385, + 0.022158216685056686, + -0.005025345832109451, + -0.11836040765047073 + ] + ], + [ + [ + -0.002473541535437107, + -0.024702277034521103, + 0.062033966183662415, + -0.07495386898517609, + 0.0393778458237648, + 0.025798164308071136, + -0.0011138950940221548, + 0.07688309252262115 + ], + [ + 0.01678415574133396, + 0.015164772048592567, + -0.011380884796380997, + -0.08263497054576874, + -0.014480240643024445, + 0.004272907506674528, + -0.004022516310214996, + -6.776456575607881e-05 + ], + [ + 0.012436483055353165, + 0.03306320309638977, + 0.031011272221803665, + -0.10942738503217697, + -0.062067609280347824, + 0.030493762344121933, + 0.002042447216808796, + 0.1072840765118599 + ], + [ + 0.011644799262285233, + 0.01453213207423687, + 0.044995423406362534, + -0.03212178871035576, + 0.025928232818841934, + 0.02492145448923111, + 0.0013439948670566082, + -0.008292721584439278 + ], + [ + -0.0046668644063174725, + 0.021558327600359917, + 0.013774105347692966, + 0.0009372163913212717, + -0.009606842882931232, + 0.01413553487509489, + 0.0035046152770519257, + 0.029658770188689232 + ], + [ + 0.021784987300634384, + -0.02128327079117298, + -0.017649564892053604, + 0.006686487700790167, + 0.053530916571617126, + -0.0019862602930516005, + 0.0003602482902351767, + -0.0158785879611969 + ], + [ + -0.01317040715366602, + -0.019648592919111252, + 0.028327900916337967, + -0.05450237914919853, + 0.012851896695792675, + 0.02285803109407425, + 0.0015705558471381664, + 0.052603282034397125 + ], + [ + 0.012530448846518993, + 0.013197917491197586, + 0.005088343750685453, + 0.08040349930524826, + -0.0013668470783159137, + 0.037693291902542114, + -0.00679565966129303, + 0.005809059366583824 + ] + ] + ], + [ + [ + [ + 0.0029459460638463497, + 0.19821473956108093, + 0.033434439450502396, + 0.015639441087841988, + -0.019701285287737846, + -0.015185387805104256, + -0.00329160550609231, + 0.002488921396434307 + ], + [ + -0.047754574567079544, + 0.10145960748195648, + -0.008088469505310059, + 0.08839905261993408, + -0.06005287170410156, + -0.012965580448508263, + 0.004438407719135284, + -0.03443372994661331 + ], + [ + 0.0019706308376044035, + 0.06400024145841599, + 0.0013861334882676601, + 0.006690501235425472, + 0.027687549591064453, + -0.006179932504892349, + -0.0006464652833528817, + 0.026976004242897034 + ], + [ + 0.0276897381991148, + 7.432322308886796e-05, + -0.05534469708800316, + -0.09251908957958221, + 0.2637457847595215, + -0.03521440178155899, + -0.005613838788121939, + -0.0010770617518574 + ], + [ + -0.05661358684301376, + -0.039372678846120834, + -0.017899006605148315, + 0.011864234693348408, + -0.012530406937003136, + -0.006108156871050596, + -0.011167557910084724, + -0.031181491911411285 + ], + [ + -0.00649361964315176, + -0.012218613177537918, + -0.0026933825574815273, + 0.020369812846183777, + 0.010411023162305355, + -0.0008850657613947988, + -0.00654537184163928, + 0.04691559821367264 + ], + [ + 0.004079267382621765, + -0.01150798611342907, + -0.037642236799001694, + -0.05730247497558594, + 0.06200745329260826, + -0.005616017617285252, + -0.005343927536159754, + 0.0015668594278395176 + ], + [ + -0.05060950666666031, + -0.01681951805949211, + 0.012346488423645496, + -0.06051893159747124, + -0.011573690921068192, + 0.018589943647384644, + 0.00010377563739893958, + 0.06980946660041809 + ] + ], + [ + [ + -0.014525091275572777, + -0.05900352820754051, + 0.003265225328505039, + 0.010223313234746456, + 0.05825086310505867, + -0.013219972141087055, + -0.0021202852949500084, + 0.010904049500823021 + ], + [ + -0.014585461467504501, + 0.009681666269898415, + -0.0027580817695707083, + 0.045012157410383224, + -0.03864145278930664, + -0.010209256783127785, + -0.0004014124860987067, + -0.0363897942006588 + ], + [ + 0.058507587760686874, + -3.76349562429823e-05, + -0.016130834817886353, + 0.06793782114982605, + 0.03794394060969353, + -0.0010760570876300335, + -0.003734456840902567, + -0.015319695696234703 + ], + [ + 0.020102856680750847, + -0.02875906229019165, + 0.02254899963736534, + 0.15876123309135437, + 0.0008996215765364468, + -0.0013806322822347283, + -0.0021083035971969366, + -0.0220170971006155 + ], + [ + -0.0008895981591194868, + -0.027540849521756172, + 0.008349603042006493, + -0.008637739345431328, + 0.026235617697238922, + 0.009318525902926922, + -0.003419572487473488, + -0.0604780949652195 + ], + [ + 0.020707597956061363, + -0.07162978500127792, + 0.020566442981362343, + 0.00659090094268322, + -0.010225615464150906, + 0.012773234397172928, + -0.007437233347445726, + -0.0059332773089408875 + ], + [ + 0.006159077398478985, + -0.04251372441649437, + 0.0196298286318779, + 0.004783525597304106, + 0.04221025109291077, + 0.006401584018021822, + 0.0021240098867565393, + -0.0004872358695138246 + ], + [ + -0.054406750947237015, + 0.014036622829735279, + -0.02159043587744236, + -0.05033034831285477, + -0.02598651871085167, + 0.03808223828673363, + 0.005328703206032515, + -0.035146743059158325 + ] + ], + [ + [ + -0.012724393978714943, + -0.04569956287741661, + -0.0043225279077887535, + -0.015056507661938667, + 0.0639200359582901, + -0.005764475557953119, + -0.0008325689123012125, + 0.012471395544707775 + ], + [ + -0.006524702999740839, + 0.021368838846683502, + -0.03152286633849144, + 0.021848784759640694, + 0.024441156536340714, + 0.004061597865074873, + 0.004684915766119957, + -0.03595312684774399 + ], + [ + 0.045864127576351166, + 0.057343628257513046, + -0.01368139497935772, + 0.048210274428129196, + 0.053036801517009735, + -0.012537220492959023, + -0.0011267787776887417, + -0.01821090839803219 + ], + [ + 0.03492826595902443, + -0.030562138184905052, + 0.025313355028629303, + -0.08399251103401184, + 0.020710457116365433, + 0.0024003770668059587, + -0.0012503244215622544, + 0.0219674501568079 + ], + [ + -0.010560683906078339, + -0.03477929159998894, + -0.012503759935498238, + -0.01766609214246273, + -0.0037686373107135296, + 0.013774788938462734, + 0.004306974355131388, + 0.05591834336519241 + ], + [ + -0.009144579991698265, + -0.06826949864625931, + 0.032284416258335114, + -0.04957763850688934, + 0.04021494835615158, + 0.016764720901846886, + -0.005839741323143244, + 0.045722220093011856 + ], + [ + 0.026390906423330307, + -0.028742235153913498, + 0.034536004066467285, + -0.027354568243026733, + 0.01282323058694601, + 0.02250020019710064, + -0.007374163717031479, + 0.018964439630508423 + ], + [ + -0.009460007771849632, + 0.02855629473924637, + -0.008052561432123184, + 0.010923580266535282, + 0.003286743303760886, + 0.020783154293894768, + 0.0023955325596034527, + -0.008051692508161068 + ] + ], + [ + [ + -0.013342831283807755, + -0.06441285461187363, + 0.011423706077039242, + -0.021152367815375328, + 0.02137858048081398, + -0.006002894602715969, + 0.0013278172118589282, + -0.008229869417846203 + ], + [ + -0.03148617967963219, + -0.08679797500371933, + -0.005196365527808666, + 0.00801572110503912, + -0.02517620660364628, + 0.018753821030259132, + -0.0028327724430710077, + -0.022287892177700996 + ], + [ + 0.0013144876575097442, + -0.061006367206573486, + -0.02108077146112919, + 0.02278880402445793, + -0.04609819874167442, + -0.06039561331272125, + -0.0006167401443235576, + -0.06367570161819458 + ], + [ + 0.04438195750117302, + -0.005901908501982689, + -0.010757151059806347, + 0.007661420851945877, + 0.007903875783085823, + -0.01455448567867279, + -0.007049033418297768, + -0.020468324422836304 + ], + [ + -0.04187410697340965, + 0.030995408073067665, + -0.0030141437891870737, + -0.052424076944589615, + -0.16738133132457733, + 0.021417832002043724, + 0.010201969183981419, + 0.0038725195918232203 + ], + [ + -0.047995805740356445, + 0.035540178418159485, + -0.029941583052277565, + 0.05295752361416817, + 0.014444439671933651, + -0.01486233901232481, + -0.006574917118996382, + -0.03860742971301079 + ], + [ + 0.0261065736413002, + 0.015397671610116959, + -0.009133684448897839, + -0.012363946996629238, + 0.03370637074112892, + -0.021011926233768463, + -0.002044249791651964, + -0.0064743743278086185 + ], + [ + 0.029762251302599907, + 0.045706622302532196, + 0.02371714636683464, + 0.03953253850340843, + 0.07480553537607193, + 0.021622249856591225, + 0.0003765060391742736, + 0.03710540384054184 + ] + ], + [ + [ + 0.0051649692468345165, + -0.045126333832740784, + 0.018193593248724937, + 0.003313350258395076, + -8.550241545890458e-06, + -0.007161338813602924, + 0.001392774167470634, + -0.027248498052358627 + ], + [ + 0.0024361649993807077, + -0.05157935619354248, + 0.024673808366060257, + -0.0366002582013607, + -0.06297978013753891, + 0.015504693612456322, + -0.001548083615489304, + -0.007699938025325537 + ], + [ + -0.009529772214591503, + -0.05598974972963333, + 0.014410321600735188, + 0.08224589377641678, + -0.04851073771715164, + -0.04908473789691925, + 0.005685083568096161, + 0.0009345050784759223 + ], + [ + 0.04664924368262291, + 0.012643108144402504, + 0.010102152824401855, + 0.05068451911211014, + 0.038186848163604736, + -0.009808218106627464, + 0.00011305150837870315, + -0.022820988669991493 + ], + [ + -0.057595375925302505, + 0.03039691038429737, + 0.0008753836154937744, + -0.06432617455720901, + -0.14222659170627594, + 0.01699751801788807, + 0.01729421503841877, + -0.1007576510310173 + ], + [ + -0.07446979731321335, + 0.02195252664387226, + -0.0012309179874137044, + -0.004975017625838518, + -0.023749886080622673, + 0.05568702891469002, + -0.0002426196151645854, + -0.06120328977704048 + ], + [ + 0.010466614738106728, + 0.03101326711475849, + -0.004487760365009308, + 0.05773919075727463, + -0.0012565600918605924, + -0.011213166639208794, + -0.006450273562222719, + 0.01911379024386406 + ], + [ + 0.0009501230088062584, + -0.04195929691195488, + -0.0282748993486166, + -0.006600293330848217, + 0.0260772705078125, + 0.0024809767492115498, + -0.0046281153336167336, + -0.008379289880394936 + ] + ], + [ + [ + 0.023841287940740585, + -0.005377040710300207, + -0.0039022087585181, + -0.010647711344063282, + 0.020673856139183044, + -0.0065656122751533985, + -0.001689722528681159, + -0.04143419861793518 + ], + [ + 0.008448231033980846, + 0.0028190200682729483, + 0.029826952144503593, + -0.04196197912096977, + 0.005503637250512838, + 0.042276304215192795, + -0.005976627115160227, + 0.0075156050734221935 + ], + [ + 0.0014776414027437568, + -0.04586983472108841, + 0.008499638177454472, + 0.045901522040367126, + 0.026444993913173676, + -0.010359256528317928, + -0.001541005913168192, + 0.04919324815273285 + ], + [ + 0.035183850675821304, + 0.016820358112454414, + 0.03766351565718651, + -0.02132631465792656, + 0.061947017908096313, + -0.013508988544344902, + -0.0004866977396886796, + 0.05422791838645935 + ], + [ + 0.014216767624020576, + 0.06838178634643555, + -0.02754048816859722, + -0.043535761535167694, + 0.03874225914478302, + 0.04766564071178436, + 0.0034964054357260466, + 0.07884154468774796 + ], + [ + -0.02206256426870823, + -0.022103967145085335, + 0.0021510974038392305, + 0.03042840026319027, + -0.017940359190106392, + 0.034484513103961945, + -0.001323093893006444, + 0.040235280990600586 + ], + [ + -0.04556814581155777, + -0.03257528319954872, + 0.03529248759150505, + -0.008242151699960232, + -0.00102433399297297, + 0.0018892816733568907, + -0.005720595829188824, + 0.030780866742134094 + ], + [ + 0.01674829237163067, + -0.0033095187973231077, + -0.014602459967136383, + -0.010836221277713776, + -0.026840446516871452, + 0.005379301495850086, + -0.0032946921419352293, + 0.0009942216565832496 + ] + ], + [ + [ + -0.004544720519334078, + -0.0640036091208458, + -0.009615345858037472, + -0.008862191811203957, + -0.007659082766622305, + -0.0020052946638315916, + -0.002985588274896145, + -0.030718570575118065 + ], + [ + -0.001606544479727745, + -0.059962041676044464, + -0.007423589006066322, + -0.011024588719010353, + -0.04344472661614418, + 0.006930001080036163, + 0.0018014574889093637, + -0.03651970997452736 + ], + [ + 0.019638588652014732, + -0.10278598964214325, + 0.011250595562160015, + -0.03447341546416283, + -0.010817060247063637, + -0.012423223815858364, + -0.002488098805770278, + -0.007387715857475996 + ], + [ + 0.029609017074108124, + -0.01602204330265522, + -0.01217708084732294, + -0.002957794815301895, + 0.04769261181354523, + -0.017079392448067665, + -0.0022347469348460436, + 0.018047112971544266 + ], + [ + 0.014074970968067646, + -0.018841443583369255, + -0.07168933749198914, + -0.046064723283052444, + 0.1371833235025406, + -0.0022462273482233286, + -0.0054467422887682915, + 0.010330568999052048 + ], + [ + -0.009437832981348038, + 0.016872145235538483, + -0.03396496921777725, + 0.1198301687836647, + -0.05854787304997444, + 0.0213441364467144, + 0.005698705092072487, + -0.009772364981472492 + ], + [ + -0.006661652121692896, + -0.031017180532217026, + -0.006832487415522337, + -0.03783205896615982, + -0.023959437385201454, + -0.018545497208833694, + 0.004132752772420645, + -0.047137584537267685 + ], + [ + 0.0303060133010149, + 0.003366144374012947, + 0.019011344760656357, + 0.04132392629981041, + 0.01964564435184002, + -0.018731767311692238, + -0.001689974102191627, + 0.030256304889917374 + ] + ], + [ + [ + -0.010258374735713005, + -0.031084442511200905, + 0.003016372211277485, + -0.07553334534168243, + -0.024494502693414688, + 0.004715280141681433, + -0.0028998046182096004, + 0.005096904933452606 + ], + [ + -0.0035471278242766857, + -0.030268263071775436, + 0.022779423743486404, + -0.024003474041819572, + -0.045682214200496674, + 0.02943156473338604, + -0.0008202232420444489, + 0.0047785453498363495 + ], + [ + 0.03233017027378082, + -0.06889879703521729, + 0.03711891919374466, + -0.01214350014925003, + -0.04789215698838234, + 0.007853667251765728, + -0.005656060297042131, + -0.048330336809158325 + ], + [ + 0.023575128987431526, + 0.04820775240659714, + -0.006148757878690958, + 0.03783087804913521, + 0.03999221697449684, + -0.04260101169347763, + -0.005793237593024969, + -0.07145354896783829 + ], + [ + -0.00676076440140605, + -0.010046700946986675, + -0.00946863554418087, + 0.07858116924762726, + -0.083837129175663, + 0.015883387997746468, + 0.0023993952199816704, + -0.030962813645601273 + ], + [ + -0.02570742927491665, + 0.030458778142929077, + -0.0004157621006015688, + 0.04913854971528053, + 0.007138073910027742, + 0.010680140927433968, + 0.007227183785289526, + -0.043843794614076614 + ], + [ + 0.025240706279873848, + 0.0252192635089159, + 0.00825332012027502, + 0.013403719291090965, + -0.004058956168591976, + 0.00427164975553751, + 0.003033195622265339, + -0.004950947128236294 + ], + [ + -0.04411984235048294, + -0.00465633999556303, + -0.0002134806854883209, + 0.03263658285140991, + -0.04031909629702568, + -0.0061959028244018555, + -0.0028085424564778805, + -0.0038983672857284546 + ] + ], + [ + [ + -0.028988247737288475, + 0.03348380699753761, + -0.01663985848426819, + -0.01613609306514263, + -0.0395648330450058, + 0.018824540078639984, + -0.0030388981103897095, + -0.010097864083945751 + ], + [ + -0.024228861555457115, + 0.02025548368692398, + 0.02141226828098297, + -0.09286082535982132, + 0.002973195631057024, + 0.011145733296871185, + -0.005385329946875572, + 0.02013411372900009 + ], + [ + -0.0011228841030970216, + -0.03330155834555626, + 0.031740009784698486, + -0.11463329941034317, + 0.045947689563035965, + -0.004323343280702829, + -0.0031990590505301952, + 0.034296710044145584 + ], + [ + 0.0044985562562942505, + 0.06765210628509521, + 0.018444793298840523, + 0.022038081660866737, + 0.003138833912089467, + -0.007955877110362053, + 0.0071654291823506355, + 0.05158708617091179 + ], + [ + 0.02556217648088932, + -0.009231963194906712, + 0.0417652428150177, + 0.03566081076860428, + 0.00608791783452034, + 0.012274542823433876, + -0.0013604459818452597, + 0.08171442896127701 + ], + [ + 0.048068176954984665, + 0.0687163844704628, + 0.03271600604057312, + -0.018946906551718712, + 0.07844490557909012, + 0.047286391258239746, + 0.002220063703134656, + 0.05203210562467575 + ], + [ + -0.03644825518131256, + -0.01863442175090313, + 0.03178019821643829, + -0.06942281872034073, + -0.005687233991920948, + 0.020186008885502815, + -0.0007521794177591801, + 0.04474818333983421 + ], + [ + -0.04792311042547226, + -0.06843431293964386, + 0.010346954688429832, + -0.02670208550989628, + -0.008648280054330826, + 0.029584664851427078, + -0.0008742180652916431, + -0.03236931562423706 + ] + ], + [ + [ + -0.025605561211705208, + 0.01791275665163994, + -0.0033973243553191423, + 0.03411271050572395, + -0.05672892555594444, + -0.017946984618902206, + 0.0035144765861332417, + -0.03059442713856697 + ], + [ + -0.021764133125543594, + 0.0016115981852635741, + 0.01509369257837534, + -0.006958045065402985, + -0.013327976688742638, + -0.004415202420204878, + -0.00419425405561924, + -0.017800139263272285 + ], + [ + -0.02466604858636856, + -0.034436456859111786, + -0.009487292729318142, + -0.014286309480667114, + 0.07467532157897949, + -0.028208404779434204, + 0.0009866165928542614, + 0.012778172269463539 + ], + [ + 0.002418971387669444, + -0.060568667948246, + 0.02660949155688286, + 0.041015464812517166, + -0.0427030473947525, + -0.05437001958489418, + 0.0014626641059294343, + 0.017428932711482048 + ], + [ + 0.042871568351984024, + -0.03837227821350098, + -0.04178672656416893, + 0.011916520074009895, + 0.05904223397374153, + 0.000479067035485059, + -0.0009092687978409231, + 0.006472223903983831 + ], + [ + 0.012443802319467068, + 0.0071801068261265755, + -0.00383430696092546, + -0.027881614863872528, + 0.07796680927276611, + -0.010186241939663887, + 0.0006420338177122176, + -0.009771183133125305 + ], + [ + -0.025558970868587494, + 0.021338190883398056, + -0.02688872255384922, + -0.019520452246069908, + -0.06647126376628876, + -0.008087686263024807, + 0.0012401012936607003, + -0.04021579027175903 + ], + [ + -0.020278971642255783, + -0.02137376368045807, + -0.005583115387707949, + -0.03911762312054634, + 0.0335928238928318, + 0.012587126344442368, + 0.0004366787616163492, + -0.005492607597261667 + ] + ], + [ + [ + -0.015410124324262142, + -0.0007537836208939552, + -0.02400200627744198, + 0.036276817321777344, + -0.027083221822977066, + 0.0014528954634442925, + 0.0037894712295383215, + -0.008180602453649044 + ], + [ + -0.008799602277576923, + -0.00883232057094574, + 0.002940121805295348, + 0.05649504438042641, + -0.062448859214782715, + 0.014112676493823528, + -0.005638085305690765, + -0.06079447641968727 + ], + [ + 0.009509548544883728, + 0.10176727175712585, + 0.0005535470554605126, + 0.021723151206970215, + 0.0002965517633128911, + -0.026324709877371788, + -0.0014324167277663946, + -0.05443667247891426 + ], + [ + 0.017682306468486786, + -0.06970755010843277, + 0.006666190456598997, + 0.09444691985845566, + -0.06428951770067215, + -0.018832577392458916, + -0.0036018104292452335, + -0.01613272726535797 + ], + [ + 0.014106031507253647, + -0.011214378289878368, + -0.03077026456594467, + -0.019061380997300148, + -0.007965883240103722, + -0.008700680918991566, + 0.0007204700959846377, + -0.06952569633722305 + ], + [ + 0.002107115462422371, + -0.023391742259263992, + 0.008195720613002777, + 0.06709365546703339, + -0.03051491267979145, + 0.007419849280267954, + 0.0006025469629094005, + 0.0017793582519516349 + ], + [ + 0.01513664610683918, + 0.03150303289294243, + -0.016833236441016197, + 0.029711037874221802, + 0.0345449261367321, + 0.022209687158465385, + 0.005350228864699602, + -0.010145388543605804 + ], + [ + -0.003613572334870696, + 0.04562723636627197, + -0.045480795204639435, + 0.011007098481059074, + -0.043432168662548065, + -0.0048513347283005714, + 0.007528586778789759, + 0.010687176138162613 + ] + ], + [ + [ + -0.01752227172255516, + 0.0055031441152095795, + -0.01929750293493271, + -0.002642636885866523, + 0.02025410160422325, + -0.006183572579175234, + 0.0065411049872636795, + -0.007311992347240448 + ], + [ + -0.012799428775906563, + -0.009698567911982536, + 0.014207491651177406, + -0.022732336074113846, + -0.0020734851714223623, + 0.03209099546074867, + 0.0001136542996391654, + -0.02574974112212658 + ], + [ + 0.019118202850222588, + 0.05129054933786392, + 0.04159802198410034, + -7.07246654201299e-05, + 0.004199211485683918, + 0.014943798072636127, + -0.004880158230662346, + 0.006766884122043848 + ], + [ + 0.007101965602487326, + -0.06610161811113358, + 0.017025351524353027, + 0.0005800403305329382, + 0.03132067248225212, + -0.007867669686675072, + -0.004975783638656139, + 0.05782478675246239 + ], + [ + 0.019634904339909554, + 0.03958024084568024, + 0.025913141667842865, + -0.028788046911358833, + -0.011096166446805, + -0.0499618798494339, + -8.135050302371383e-05, + 0.05861790105700493 + ], + [ + 0.0363573357462883, + 0.0032399145420640707, + 0.02603045292198658, + -0.006103347521275282, + 0.06574416160583496, + 0.011972443200647831, + -0.008154521696269512, + 0.034582167863845825 + ], + [ + 0.04421309009194374, + 0.05251472815871239, + 0.010799070820212364, + 0.0438251867890358, + 0.10730314999818802, + 0.018286895006895065, + 1.3895833035348915e-05, + 0.06047044321894646 + ], + [ + 0.014447317458689213, + 0.004433473106473684, + 0.0021602618508040905, + -0.019579920917749405, + 0.003916312009096146, + 0.01042039506137371, + -0.001155766425654292, + 0.0232681967318058 + ] + ], + [ + [ + -0.02264997363090515, + -0.025229183956980705, + -0.02728128805756569, + -0.015144758857786655, + 0.01984669454395771, + -0.012981554493308067, + 0.006506231613457203, + -0.021281324326992035 + ], + [ + -0.02964099310338497, + -0.07157338410615921, + 0.029967378824949265, + 0.005038450006395578, + 0.03123730793595314, + -0.037716470658779144, + -0.002791777951642871, + -0.0620729960501194 + ], + [ + -0.02627156302332878, + -0.08576350659132004, + 0.023565104231238365, + 0.007107535842806101, + -0.010391839779913425, + -0.028402330353856087, + -0.008677246980369091, + -0.07209983468055725 + ], + [ + -0.008453728631138802, + -0.02890831045806408, + -0.015113129280507565, + -0.011552431620657444, + 0.03613197058439255, + -0.015170031227171421, + -0.004016631282866001, + 0.0011148606427013874 + ], + [ + 0.014803271740674973, + -0.017819762229919434, + 0.016025133430957794, + 0.10588965564966202, + -0.05165846645832062, + -0.039768729358911514, + -0.008099879138171673, + 0.03774939849972725 + ], + [ + 0.006740280892699957, + 0.016399888321757317, + -0.01537318155169487, + -0.03257088363170624, + 0.02401808649301529, + -0.027596116065979004, + -0.0022420065943151712, + 0.008799267932772636 + ], + [ + 0.013543138280510902, + -0.024200016632676125, + -0.011718861758708954, + 0.023548072203993797, + -0.0016348502831533551, + 0.010887732729315758, + -0.001136107719503343, + -0.004118426702916622 + ], + [ + 0.06458292156457901, + 0.03718070685863495, + 0.04229528829455376, + -0.030984969809651375, + 0.04609718918800354, + 0.05492953956127167, + 0.002894546603783965, + 0.055772051215171814 + ] + ], + [ + [ + -0.0024965780321508646, + -0.028993384912610054, + -0.002293058205395937, + -0.018619777634739876, + 0.015136456117033958, + -0.014967170543968678, + 0.006708675529807806, + -0.0024478589184582233 + ], + [ + 0.006153902970254421, + -0.07249446958303452, + 0.022479338571429253, + 0.014407443813979626, + -0.008792096748948097, + 0.0016866883961483836, + 0.0009343069978058338, + -0.09505521506071091 + ], + [ + 0.00860295444726944, + -0.05303570255637169, + -0.001302302465774119, + 0.017235970124602318, + -0.024013740941882133, + 0.0017693141708150506, + -0.0008967725443653762, + -0.10192693024873734 + ], + [ + 0.023035550490021706, + 0.024678796529769897, + 0.003699838649481535, + 0.09079743921756744, + 0.013203811831772327, + -0.013409586623311043, + -0.009336248971521854, + -0.02474495768547058 + ], + [ + 0.004616198129951954, + -0.06407904624938965, + 0.02177463099360466, + 0.0037055208813399076, + -0.02281508594751358, + -0.02285895124077797, + -0.002175993984565139, + -0.013603267259895802 + ], + [ + 0.01835746504366398, + 0.030949082225561142, + 0.0025745888706296682, + 0.06862067431211472, + -0.04572506248950958, + -0.02545926161110401, + -0.0022892006672918797, + 0.029464609920978546 + ], + [ + 0.004768331069499254, + 0.0001425641676178202, + -0.008137569762766361, + 0.052731696516275406, + 0.011472132988274097, + -0.04788065701723099, + -0.003795544384047389, + 0.015203183516860008 + ], + [ + 0.029804758727550507, + -0.008922971785068512, + -0.01886935345828533, + -0.048410460352897644, + 0.08035224676132202, + 0.005607229191809893, + -0.006964625790715218, + -0.004135118331760168 + ] + ], + [ + [ + 0.004805890843272209, + 0.010944538749754429, + -0.00724272895604372, + 0.015765029937028885, + 0.04381842166185379, + 0.009017481468617916, + 0.005251036025583744, + 0.013121486641466618 + ], + [ + -0.05255390331149101, + -0.0268009752035141, + 0.04542408511042595, + -0.060656365007162094, + 0.046029023826122284, + 0.0019712098874151707, + -0.007002915255725384, + -0.09596214443445206 + ], + [ + -0.01122364867478609, + 0.022292567417025566, + 0.013457178138196468, + -0.029449189081788063, + 0.008300167508423328, + 0.02813062258064747, + -0.0021941896993666887, + -0.022496409714221954 + ], + [ + -0.02146918512880802, + 0.01044583972543478, + 0.013188520446419716, + -0.011863569729030132, + 0.05469261482357979, + -0.004684187471866608, + -0.006663182284682989, + 0.005669219419360161 + ], + [ + -0.0007039833581075072, + -0.04612287878990173, + 0.00849486980587244, + -0.032163191586732864, + 0.06629575043916702, + -0.026979824528098106, + -0.005303226411342621, + 0.014901554211974144 + ], + [ + -0.019946005195379257, + -0.0442097932100296, + 0.04386602342128754, + 0.030713412910699844, + 0.01888064667582512, + -0.008758108131587505, + 0.001700493274256587, + 0.02586732804775238 + ], + [ + 0.02955193631350994, + 0.00939175020903349, + 0.01950749196112156, + 0.0667138397693634, + -0.011217803694307804, + -0.03697732090950012, + -0.004471417050808668, + 0.028131546452641487 + ], + [ + -0.016811570152640343, + 0.004467272665351629, + -0.015281083062291145, + 0.08018471300601959, + 0.008631901815533638, + -0.03745187819004059, + 0.002922328654676676, + -0.006530077662318945 + ] + ], + [ + [ + 0.008110510185360909, + -0.047397028654813766, + -0.01617005094885826, + -0.04685518890619278, + 0.018422827124595642, + -0.009515278972685337, + 0.0029787630774080753, + -0.02750646509230137 + ], + [ + 0.04674697667360306, + -0.07381705939769745, + 0.013685404323041439, + -0.026752766221761703, + -0.05843343585729599, + 0.013103995472192764, + -0.0034552321303635836, + -0.23540885746479034 + ], + [ + -0.041405849158763885, + -0.03723100945353508, + 0.004541249014437199, + -0.02237485907971859, + -0.062061458826065063, + -0.023265816271305084, + 0.00476656062528491, + -0.16426821053028107 + ], + [ + -0.031552962958812714, + -0.020710011944174767, + -0.003346902085468173, + 0.026225551962852478, + 0.022068778052926064, + -0.03805605322122574, + -0.0012153817806392908, + -0.0731026753783226 + ], + [ + -0.06127309054136276, + 0.038618508726358414, + -0.025099294260144234, + 0.041937779635190964, + 0.04059578850865364, + -0.02609509415924549, + 0.0010950641008093953, + -0.04223669692873955 + ], + [ + -0.020402684807777405, + -0.021423153579235077, + -0.02444944903254509, + 0.031128989532589912, + -0.011760195717215538, + -0.021109003573656082, + -0.0043780617415905, + -0.05348959565162659 + ], + [ + -0.04391954839229584, + -0.012439770624041557, + -0.024499433115124702, + 0.04883916676044464, + 0.00977744348347187, + -0.03603116422891617, + 0.002233593026176095, + -0.023763462901115417 + ], + [ + -0.006493732333183289, + 0.021408652886748314, + 0.01833018660545349, + 0.052291955798864365, + 0.028451653197407722, + -0.010765274986624718, + -0.0003462806635070592, + 0.016459455713629723 + ] + ], + [ + [ + 0.049809280782938004, + -0.03797976300120354, + -0.01014165859669447, + 0.003188735106959939, + 0.03926285356283188, + 0.01380287203937769, + 0.003860191674903035, + -0.03842084854841232 + ], + [ + 0.07935348898172379, + -0.003993764985352755, + 0.2071002721786499, + -0.047383952885866165, + -0.006026396993547678, + 0.11986826360225677, + -0.0012403352884575725, + 0.34990254044532776 + ], + [ + -0.01613704301416874, + -0.01064466405659914, + 0.027188528329133987, + 0.04680733010172844, + -0.007622920908033848, + 0.059739530086517334, + 0.003236864460632205, + 0.0013106479309499264 + ], + [ + -0.0040297540836036205, + -0.011073094792664051, + -0.023188931867480278, + 0.006294954568147659, + 0.013738567009568214, + -0.006530961021780968, + -0.00043589159031398594, + -0.08342380076646805 + ], + [ + -0.050960756838321686, + 0.014658963307738304, + -0.01702510192990303, + 0.017089279368519783, + 0.012795161455869675, + -0.005471903830766678, + 0.003481808118522167, + -0.0607883557677269 + ], + [ + 0.0037079888861626387, + 0.024536799639463425, + -0.0179922953248024, + 0.006979416124522686, + -0.0019990308210253716, + -0.004930601920932531, + -0.0025458866730332375, + -0.003419463988393545 + ], + [ + -0.040982648730278015, + -0.048234350979328156, + -0.0032995049841701984, + -0.005022265948355198, + 0.006855813320726156, + -0.004351833835244179, + 0.00439827423542738, + -0.043673232197761536 + ], + [ + 0.031409863382577896, + -0.027514103800058365, + -0.014367512427270412, + 0.1000172346830368, + 0.0192025788128376, + -0.011330770328640938, + -0.001505272462964058, + -0.048060011118650436 + ] + ], + [ + [ + 0.0382511280477047, + -0.011353477835655212, + -0.03738883510231972, + -0.025354500859975815, + 0.0427420400083065, + 0.00694043654948473, + -0.0002247666852781549, + -0.08891378343105316 + ], + [ + 0.02746877819299698, + -0.05883057415485382, + 0.1849578320980072, + -0.0941484272480011, + -0.14537321031093597, + -0.032777465879917145, + -0.004956639837473631, + 0.5106852054595947 + ], + [ + -0.04024389758706093, + -0.10272660106420517, + 0.016708476468920708, + -0.06047362461686134, + 0.004738969262689352, + -0.0024033840745687485, + -0.0014720266917720437, + 0.148383229970932 + ], + [ + 0.01038563996553421, + -0.018513238057494164, + -0.022013062611222267, + -0.025939643383026123, + 0.033418208360672, + 0.012203381396830082, + 0.003287730272859335, + 0.028212742879986763 + ], + [ + -0.02351834438741207, + 0.013557212427258492, + -0.02570902369916439, + -0.02418609894812107, + 0.05630914866924286, + 0.013821172527968884, + 0.0003592366410885006, + 0.018022190779447556 + ], + [ + -0.01768822968006134, + 0.007511049043387175, + 0.01916118897497654, + -0.047345422208309174, + -0.013661934062838554, + -0.0215950645506382, + 0.0025847232900559902, + 0.03282380849123001 + ], + [ + -0.033009275794029236, + 0.004004138056188822, + -0.011354798451066017, + 0.05054326355457306, + 0.047386135905981064, + -0.018745848909020424, + 0.003905064659193158, + -0.027320237830281258 + ], + [ + -0.013568619266152382, + -0.05913625285029411, + 0.008794344961643219, + 0.027046553790569305, + 0.028153937309980392, + -0.02700972743332386, + 0.0017994990339502692, + 0.036760251969099045 + ] + ], + [ + [ + 0.010042463429272175, + -0.03347279131412506, + -0.011372735723853111, + 0.0848800465464592, + -0.07440216839313507, + -0.057635724544525146, + 0.004980836063623428, + -0.038668327033519745 + ], + [ + -0.09631942212581635, + 0.022789349779486656, + 0.17627565562725067, + 0.04126839339733124, + -0.3494640290737152, + -0.08453928679227829, + 0.02475195750594139, + 0.1251366287469864 + ], + [ + -0.047862641513347626, + -0.030317898839712143, + 0.04935881868004799, + 0.14316228032112122, + -0.19229567050933838, + -0.0494537316262722, + 0.007961944676935673, + 0.021446386352181435 + ], + [ + -0.025282390415668488, + 0.024950513616204262, + -0.004890453536063433, + 0.030915258452296257, + -0.1452735811471939, + -0.015387503430247307, + 0.018135743215680122, + -0.0006903753383085132 + ], + [ + 0.006287628784775734, + 0.003897701855748892, + -0.022962644696235657, + 0.07070085406303406, + -0.004767225123941898, + -0.03693699464201927, + 0.00015137242735363543, + -0.007593410089612007 + ], + [ + -0.04253784939646721, + 0.02354324981570244, + -0.009950869716703892, + 0.015519632026553154, + -0.028106437996029854, + -0.020054742693901062, + 0.003356019966304302, + -0.04355114698410034 + ], + [ + 0.007335340138524771, + 0.029187221080064774, + -0.03391365334391594, + 0.04077793285250664, + -0.015619168989360332, + -0.034530676901340485, + 0.0084566380828619, + -0.014549597166478634 + ], + [ + -0.06316090375185013, + 0.013043168000876904, + 0.00794999673962593, + 0.006477026734501123, + 0.03570840135216713, + -0.035206619650125504, + -0.0013662250712513924, + 0.034254040569067 + ] + ], + [ + [ + 0.0029861358925700188, + -0.06337124854326248, + -0.04465877637267113, + 0.08964803814888, + -0.10362432897090912, + -0.049266234040260315, + 0.003805021056905389, + -0.019603990018367767 + ], + [ + -0.0895780622959137, + 0.1420552283525467, + -0.07191944122314453, + -0.08381476998329163, + -0.1184522733092308, + -0.07157671451568604, + 0.021260913461446762, + -0.31878921389579773 + ], + [ + -0.028895730152726173, + 0.0967598706483841, + 0.009153900668025017, + 0.10206630080938339, + -0.06717583537101746, + -0.05447755008935928, + 0.014717978425323963, + -0.22178183495998383 + ], + [ + -0.03026399202644825, + 0.029784854501485825, + 0.01319393701851368, + -0.056310418993234634, + -0.10051631927490234, + -0.007297959178686142, + 0.014501537196338177, + -0.10549744218587875 + ], + [ + -0.01716439239680767, + 0.026125479489564896, + 0.002378133125603199, + 0.009093890897929668, + 0.003008602187037468, + 0.005909972358494997, + 0.00573126832023263, + -0.045439381152391434 + ], + [ + -0.004498658236116171, + 0.044405899941921234, + -0.017175326123833656, + -0.007335287053138018, + 0.00782711897045374, + 0.0003536262665875256, + 0.004282181616872549, + -0.027184953913092613 + ], + [ + -0.0025032293051481247, + 0.010566153563559055, + 0.02270791120827198, + 0.07482653111219406, + -0.044766828417778015, + 0.01312959287315607, + 2.71976605290547e-05, + -0.004481526091694832 + ], + [ + -0.0013795378617942333, + 0.051116880029439926, + 0.0023425582330673933, + -0.04287543147802353, + -0.014746762812137604, + 0.043536197394132614, + -0.0005599229480139911, + -0.06660403311252594 + ] + ], + [ + [ + -0.055190298706293106, + -0.06478871405124664, + -0.02527395635843277, + 0.0779508650302887, + -0.029801104217767715, + -0.04952520877122879, + 0.0017694956623017788, + -0.007536830846220255 + ], + [ + -0.009454277344048023, + 0.19175013899803162, + -0.16160447895526886, + -0.1276593655347824, + 0.3295934796333313, + 0.1034243255853653, + 0.01213415153324604, + -0.06295820325613022 + ], + [ + 0.011540289968252182, + 0.1986331194639206, + -0.01581163890659809, + 0.01706472784280777, + 0.25461336970329285, + 0.06011219695210457, + 0.006961025297641754, + 0.060259606689214706 + ], + [ + 0.017814891412854195, + 0.08729032427072525, + -0.05055476725101471, + -0.029461154714226723, + 0.06482868641614914, + 0.014522788114845753, + 0.0076373848132789135, + 0.07067399471998215 + ], + [ + 0.037643153220415115, + 0.07791988551616669, + 0.003806464606896043, + 0.049021314829587936, + 0.0810166746377945, + 0.0473996140062809, + -0.0022908630780875683, + 0.06339994817972183 + ], + [ + 0.04084857553243637, + 0.047217756509780884, + -0.00023636828700546175, + -0.02359131909906864, + 0.09724044799804688, + 0.03253481537103653, + 0.0038101363461464643, + 0.034265607595443726 + ], + [ + 0.027942057698965073, + 0.027559053152799606, + 0.028193078935146332, + 0.002984194550663233, + 0.028973611071705818, + 0.04998542368412018, + -0.00026466301642358303, + 0.027311153709888458 + ], + [ + 0.02568562887609005, + 0.04760699346661568, + -0.028349297121167183, + -0.018974993377923965, + 0.08185894042253494, + 0.04059978201985359, + 0.003035828471183777, + 0.02145996131002903 + ] + ], + [ + [ + -0.039669230580329895, + -0.12502692639827728, + -0.03789393603801727, + 0.004486568737775087, + 0.005476782098412514, + -0.021967388689517975, + -0.001989874057471752, + -0.005589190870523453 + ], + [ + -0.0479721799492836, + -0.040070828050374985, + -0.18099381029605865, + -0.2060871422290802, + 0.5224166512489319, + -0.0035781306214630604, + -0.004411658737808466, + -0.06838925182819366 + ], + [ + -0.012038872577250004, + 0.014827894978225231, + -0.05151265859603882, + -0.04748110473155975, + 0.1096944659948349, + -0.008573917672038078, + -0.0073724593967199326, + -0.05697926506400108 + ], + [ + -0.010624151676893234, + -0.034855399280786514, + -0.07746382802724838, + -0.015093495137989521, + 0.14298908412456512, + 0.0049198223277926445, + -0.0036716971080750227, + -0.004644649103283882 + ], + [ + 0.016653018072247505, + 0.0058059124276041985, + -0.013862736523151398, + -0.007002639584243298, + 0.03965599462389946, + -0.0019435841822996736, + -0.00389310996979475, + -0.008003056049346924 + ], + [ + 0.011504396796226501, + -0.01822885312139988, + -0.011517642997205257, + -0.03536440432071686, + 0.02498389407992363, + 0.013199680484831333, + -0.00560290040448308, + -0.003469420364126563 + ], + [ + 0.03354765474796295, + 0.008283189497888088, + -0.026093412190675735, + -0.011505971662700176, + 0.04740059748291969, + 0.017312372103333473, + -0.005604044534265995, + -0.014813346788287163 + ], + [ + 0.014380654320120811, + -0.008712527342140675, + -0.004290543030947447, + 0.042244553565979004, + 0.060890570282936096, + -0.00788438506424427, + -0.0035226314794272184, + 0.010614783503115177 + ] + ], + [ + [ + -0.011946160346269608, + -0.06615898013114929, + 0.0015465209726244211, + -0.0077101923525333405, + 0.031457509845495224, + -0.017653299495577812, + 0.00034074459108524024, + -0.0012869882630184293 + ], + [ + -0.028743483126163483, + -0.052672114223241806, + -0.04101460799574852, + 0.027028676122426987, + -0.022546257823705673, + 0.03925749287009239, + -0.004240443930029869, + -0.08097334951162338 + ], + [ + -0.018557023257017136, + -0.022817077115178108, + 0.007954724133014679, + 0.04416419938206673, + -0.1330333799123764, + 0.035301219671964645, + -0.0007770677329972386, + -0.07989924401044846 + ], + [ + 0.002323554828763008, + 0.006760604679584503, + -0.01326187327504158, + 0.060078490525484085, + -0.07909104973077774, + 0.008555412292480469, + 0.0034009278751909733, + -0.042382948100566864 + ], + [ + -6.372859206749126e-05, + -0.030238797888159752, + 0.004851785022765398, + 0.0885280966758728, + -0.05576542392373085, + -0.026645472273230553, + -0.0007859714678488672, + -0.008771553635597229 + ], + [ + 0.0054193479008972645, + 0.0031669430900365114, + -0.015121735632419586, + -0.0006865183240734041, + -0.030052602291107178, + -0.026890398934483528, + -0.003600575728341937, + -0.005498580634593964 + ], + [ + -0.03174818679690361, + 0.00984191708266735, + 0.00035448261769488454, + 0.00312923826277256, + -0.05184434726834297, + -0.008834064938127995, + -0.005303752608597279, + 0.014638715423643589 + ], + [ + -0.004280957393348217, + -0.034882064908742905, + -0.00907046813517809, + 0.024464892223477364, + -0.05341317132115364, + -0.04057907685637474, + 0.005327590275555849, + -0.02177816443145275 + ] + ], + [ + [ + -0.008726265281438828, + -0.031241273507475853, + -0.005046743433922529, + 0.0313691608607769, + 0.041637714952230453, + -0.016572095453739166, + -0.0024368364829570055, + -0.018481217324733734 + ], + [ + -0.03410755842924118, + -0.0007248703041113913, + 0.005555734038352966, + -0.06606759130954742, + 0.04930194094777107, + 0.026333019137382507, + -0.006260475609451532, + -0.03616112843155861 + ], + [ + -0.012448474764823914, + -0.04975966736674309, + 0.014038750901818275, + -0.052720945328474045, + -0.03157097101211548, + 0.030704578384757042, + -0.0071716951206326485, + 0.002016379963606596 + ], + [ + 0.00878814421594143, + 0.012748278677463531, + 0.01721867173910141, + -0.052126169204711914, + 0.03265252709388733, + -0.012649687007069588, + -0.003628488164395094, + 0.06718175858259201 + ], + [ + 0.0038895769976079464, + -0.00958811491727829, + 0.0505429282784462, + -0.057388272136449814, + 0.018593106418848038, + -0.013259569182991982, + -0.0001309115905314684, + 0.026147661730647087 + ], + [ + 0.008224903605878353, + 0.015519709326326847, + 0.029173756018280983, + -0.013036210089921951, + -0.002477032598108053, + -0.0055048842914402485, + -0.003304095705971122, + 0.03785420581698418 + ], + [ + -0.020365625619888306, + 0.032439202070236206, + 0.03892289102077484, + 0.01603790558874607, + 0.00042403448605909944, + -0.03591305762529373, + -0.00010547714919084683, + 0.01118870172649622 + ], + [ + -0.042560841888189316, + 0.02668760158121586, + 0.011557512916624546, + 0.025218145921826363, + 0.0018363994313403964, + -0.013324090279638767, + 0.003422010922804475, + -0.05590112507343292 + ] + ], + [ + [ + -0.04106716066598892, + -0.0611301064491272, + -0.0025253044441342354, + 0.011446069926023483, + 0.0191210750490427, + -0.0072862207889556885, + 0.00101220584474504, + -0.03807291015982628 + ], + [ + -0.04105091094970703, + -0.09107450395822525, + -0.016959626227617264, + 0.03590273857116699, + 0.001985972048714757, + 0.003094849642366171, + -0.0004922844236716628, + -0.03706688433885574 + ], + [ + -0.004193099681288004, + -0.04388287290930748, + -0.015818022191524506, + 0.029272623360157013, + -0.03075980767607689, + 0.01542618963867426, + -0.007420070935040712, + -0.02944236248731613 + ], + [ + 0.0297514870762825, + -0.04301784560084343, + -0.03176269680261612, + -0.001212906208820641, + 0.03513515740633011, + 0.023223303258419037, + 0.0002669086679816246, + -0.015965506434440613 + ], + [ + -0.0031174030154943466, + 0.035854581743478775, + -0.03489880636334419, + 0.057853296399116516, + -0.004910539370030165, + -0.041842684149742126, + -0.001523196930065751, + -0.004314896184951067 + ], + [ + -0.01610114984214306, + -0.01983668841421604, + -0.01968805491924286, + -0.029657404869794846, + -0.04171658679842949, + -0.013687641359865665, + -0.0038205741439014673, + -0.00715381745249033 + ], + [ + 0.02991011179983616, + -0.008369083516299725, + 0.00411655567586422, + 0.01701188087463379, + -0.03158114477992058, + 0.014872487634420395, + -0.0031847625505179167, + -0.02137630619108677 + ], + [ + -0.053925562649965286, + -0.02886205166578293, + 0.009870018810033798, + -0.001029869425110519, + 0.017655594274401665, + -0.0055736456997692585, + 0.0035484249237924814, + -0.008724489249289036 + ] + ], + [ + [ + 0.00701927812770009, + -0.030416078865528107, + 0.010544314049184322, + 0.005305638536810875, + 0.02784765139222145, + 0.009854919277131557, + 0.0025099250487983227, + 0.00937142875045538 + ], + [ + 0.0024643500801175833, + -0.0493365079164505, + 0.02077294886112213, + 0.04624602943658829, + -0.016996851190924644, + 0.04152010381221771, + -0.0025625107809901237, + -0.022946447134017944 + ], + [ + 0.013112039305269718, + -0.010026464238762856, + 0.007626501843333244, + 0.007653215434402227, + -0.06451918184757233, + -0.007683750707656145, + 0.0036751222796738148, + -0.05214124545454979 + ], + [ + 0.0205803494900465, + 0.002032881835475564, + -0.0477423332631588, + 0.017152637243270874, + -0.011901430785655975, + 0.006441917270421982, + 0.006363966036587954, + -0.09391287714242935 + ], + [ + -0.01323979813605547, + 0.04040723666548729, + 0.008982043713331223, + 0.040391068905591965, + -0.01921755261719227, + -0.03926905244588852, + -0.0015439593698829412, + 0.021148109808564186 + ], + [ + -0.05351502075791359, + -0.04267168045043945, + -0.001205921289511025, + 0.028030607849359512, + 0.010540618561208248, + -0.00932981912046671, + 0.0036640074104070663, + -0.029213279485702515 + ], + [ + -0.022418836131691933, + -0.06378955394029617, + 0.005421363282948732, + -0.007480344735085964, + -0.0279279462993145, + -0.037814706563949585, + 0.0004879066545981914, + 0.06885462999343872 + ], + [ + 0.0016948521370068192, + 0.021873928606510162, + -0.04035155102610588, + 0.027428947389125824, + -0.019156822934746742, + 6.73546310281381e-05, + 0.002639091107994318, + -0.022957291454076767 + ] + ], + [ + [ + 0.01626441814005375, + -0.013014509342610836, + 0.018598061054944992, + -0.038419224321842194, + 0.00585121801123023, + 0.006884265225380659, + -0.0018306910060346127, + 0.018799804151058197 + ], + [ + 0.01558003667742014, + 0.022959383204579353, + 0.02883838675916195, + -0.033419638872146606, + -0.008810115978121758, + 0.038092706352472305, + 0.0025613734032958746, + 0.027601247653365135 + ], + [ + -0.021826719865202904, + -0.011503247544169426, + 0.01151467114686966, + -0.01989891193807125, + 0.035772111266851425, + 0.009938915260136127, + -0.004782568197697401, + 0.06205099821090698 + ], + [ + 0.010762667283415794, + 0.041394948959350586, + 0.01808459311723709, + 0.022557608783245087, + -0.0005955078522674739, + -0.050445206463336945, + 0.0030689057894051075, + 0.04568040370941162 + ], + [ + -0.01708412542939186, + -0.02796012908220291, + 0.03601212799549103, + 0.02712576650083065, + -0.02705566957592964, + 0.01220109686255455, + -0.0057345605455338955, + 0.027598144486546516 + ], + [ + -0.019382404163479805, + -0.004863439593464136, + 0.017847612500190735, + 0.04341530054807663, + 0.009790788404643536, + 0.0013697730610147119, + 0.004692838992923498, + -0.009604232385754585 + ], + [ + -0.07380198687314987, + 0.025993069633841515, + 0.01052984967827797, + -0.025869300588965416, + -0.04182388633489609, + 0.004889809060841799, + 0.00442463206127286, + 0.04190893471240997 + ], + [ + 0.010083130560815334, + 0.05228685960173607, + 0.00226407777518034, + 0.08930902928113937, + -0.008250389248132706, + -0.02574840374290943, + 0.004347664304077625, + 0.01994653418660164 + ] + ], + [ + [ + -0.019755074754357338, + -0.038699522614479065, + 0.014967100694775581, + 0.014311975799500942, + -0.05024920776486397, + -0.018762970343232155, + 0.002981468802317977, + -0.026661595329642296 + ], + [ + -0.00909067876636982, + -0.07662533968687057, + 0.0007451629498973489, + -0.025082485750317574, + -0.05266153812408447, + -0.012332229875028133, + -0.0041094208136200905, + -0.02671271190047264 + ], + [ + 0.01795917935669422, + -0.04833555966615677, + -0.0037371693179011345, + -0.03859011456370354, + 0.04069734737277031, + -0.007279652636498213, + -0.0018305334961041808, + 0.006571303121745586 + ], + [ + 0.0030788008589297533, + -0.008620834909379482, + 0.001951260375790298, + 0.11914372444152832, + -0.0215720534324646, + -0.025680119171738625, + -0.004246147815138102, + 0.028036853298544884 + ], + [ + -0.020191097632050514, + -0.0262752678245306, + -0.011717732064425945, + 0.04017695039510727, + -0.002757645444944501, + -0.03838174417614937, + -0.0028054448775947094, + -0.06628808379173279 + ], + [ + -0.005845621693879366, + 0.039850447326898575, + -0.04551276937127113, + 0.08191432803869247, + -0.06664979457855225, + 0.0137006351724267, + 0.004798038862645626, + -0.018952228128910065 + ], + [ + 0.010380040854215622, + 0.06083853170275688, + -0.003964833449572325, + -0.05252048000693321, + -0.04636746272444725, + 0.04250579699873924, + 0.0030648403335362673, + -0.05398525297641754 + ], + [ + 0.029023917391896248, + 0.022777078673243523, + 0.055280182510614395, + -0.0024481923319399357, + 0.033074550330638885, + 0.03350648656487465, + -0.007137925364077091, + 0.043541692197322845 + ] + ], + [ + [ + -0.028829751536250114, + -0.03034624271094799, + 0.04496399313211441, + -0.019273435696959496, + -0.04742882773280144, + 0.009441415779292583, + 0.0017245636554434896, + 0.02455727942287922 + ], + [ + -0.00879514031112194, + -0.05777117609977722, + 0.020123204216361046, + 0.022928908467292786, + -0.019354505464434624, + -0.0029944695997983217, + 0.0026009120047092438, + -0.0401536263525486 + ], + [ + 0.031501516699790955, + 0.033751364797353745, + -0.0200959499925375, + 0.03730952739715576, + -0.024060707539319992, + 0.031239468604326248, + -7.785034540574998e-05, + -0.07652726769447327 + ], + [ + 0.006040277890861034, + -0.04698873311281204, + 0.0025378463324159384, + 0.050605956465005875, + -0.07357335835695267, + 0.010692228563129902, + -0.0028914869762957096, + -0.024467747658491135 + ], + [ + -0.004252430982887745, + 0.02299656718969345, + 0.017749406397342682, + 0.0636751726269722, + 0.0008797513437457383, + -0.007663285825401545, + 0.004760751500725746, + -0.0006524237105622888 + ], + [ + -0.011744131334125996, + 0.012570681981742382, + 0.014638544991612434, + 0.0337052159011364, + -0.0024005016312003136, + -0.004437715746462345, + 0.001701541244983673, + -0.0024101855233311653 + ], + [ + 0.031999360769987106, + 0.03412087261676788, + -0.033345602452754974, + -0.03192172944545746, + 0.056684043258428574, + 0.03232666850090027, + -0.0003971508704125881, + 0.0036050286144018173 + ], + [ + -0.005417881533503532, + -0.023873602971434593, + -0.03400710970163345, + -0.03865869343280792, + 0.033151205629110336, + -0.003965739160776138, + 0.0015742665855214, + -0.03523140773177147 + ] + ], + [ + [ + -0.0123188691213727, + 0.031350016593933105, + 0.021476274356245995, + -0.05784156918525696, + -0.020912934094667435, + 0.03334157541394234, + 0.0013856259174644947, + 0.0447818897664547 + ], + [ + -0.015245540998876095, + 0.021314509212970734, + 0.023675963282585144, + -0.04369289055466652, + 0.018270794302225113, + 0.00968005321919918, + -0.002344967797398567, + 0.01612391509115696 + ], + [ + 0.014225889928638935, + 0.05525410175323486, + -0.02255246788263321, + -0.0463932566344738, + -0.032848067581653595, + -0.02123810350894928, + -0.0036429117899388075, + 0.028537319973111153 + ], + [ + 0.0021053897216916084, + -0.04441384598612785, + 0.008856750093400478, + -0.04490886628627777, + 0.02803010866045952, + -0.0035634059458971024, + -0.000545025453902781, + 0.05315730348229408 + ], + [ + -0.03356050327420235, + -0.0005898651434108615, + 0.006151081062853336, + 0.014562812633812428, + -0.008162456564605236, + -0.025309188291430473, + 0.004712902475148439, + 0.04000828415155411 + ], + [ + 0.04665226489305496, + 0.03039620630443096, + 0.03625529631972313, + -0.01233241893351078, + 0.02331874519586563, + 0.05002495273947716, + -0.0003114506835117936, + 0.030736133456230164 + ], + [ + 0.03856006637215614, + -0.0041898153722286224, + 0.009196599014103413, + 0.011919006705284119, + 0.09666914492845535, + -0.009606574662029743, + -0.00400934461504221, + 0.023065656423568726 + ], + [ + -0.029906494542956352, + 0.03111097402870655, + -0.024254415184259415, + 0.09017159789800644, + -0.029491320252418518, + -0.054123640060424805, + 0.0008764455560594797, + -0.05557896941900253 + ] + ], + [ + [ + -0.004175630863755941, + 0.004648002330213785, + 0.010894304141402245, + 0.0037078182213008404, + -0.0060785380192101, + -0.0005052780616097152, + 0.004390566609799862, + -0.007961456663906574 + ], + [ + 0.008059455081820488, + -0.03234574943780899, + 0.014213431626558304, + 0.007364657241851091, + -0.018933236598968506, + -0.01918230950832367, + 0.005689682438969612, + -0.005204046610742807 + ], + [ + 0.03859300538897514, + -0.07210450619459152, + 0.019609447568655014, + 0.09131435304880142, + -0.030566731467843056, + -0.04144244268536568, + 0.0009580111945979297, + 0.014187193475663662 + ], + [ + -0.04714105650782585, + 0.022457696497440338, + -0.01868017390370369, + -0.010467210784554482, + 0.023934507742524147, + -0.0159110389649868, + -0.005820594262331724, + -0.04376610368490219 + ], + [ + -0.027163032442331314, + 0.025045521557331085, + -0.026584457606077194, + -0.02032693475484848, + -0.03692464902997017, + 0.012570619583129883, + 0.004228462465107441, + -0.034726034849882126 + ], + [ + 0.027844108641147614, + 0.004370217211544514, + -0.02365996316075325, + -0.041467465460300446, + 0.003464638954028487, + -0.0034519259352236986, + -0.005707699339836836, + 0.008547413162887096 + ], + [ + -0.003404962131753564, + -0.05624905601143837, + 0.002711419714614749, + 0.06388431042432785, + -0.06813722103834152, + -0.029421987012028694, + -0.002055065706372261, + -0.03722646087408066 + ], + [ + -0.017406785860657692, + -0.04205649346113205, + 0.032785460352897644, + -0.01688799448311329, + -0.01789524219930172, + -0.0017017562640830874, + 0.0026450317818671465, + 0.011644016019999981 + ] + ], + [ + [ + 0.04823766276240349, + 0.005456159356981516, + -0.012785621918737888, + 0.014757494442164898, + -0.024128079414367676, + -0.020400620996952057, + 0.005805028602480888, + -0.058275848627090454 + ], + [ + 0.019790610298514366, + -0.011825214140117168, + -0.009105682373046875, + 0.07109034061431885, + -0.05384194850921631, + -0.011878722347319126, + 0.001651423517614603, + -0.05439893156290054 + ], + [ + 0.024190299212932587, + -0.05699789896607399, + 0.02133551798760891, + 0.09975089132785797, + -0.029153117910027504, + 0.0010964241810142994, + -0.002602700376883149, + -0.05460566282272339 + ], + [ + -0.054872702807188034, + 0.041563015431165695, + -0.00014746433589607477, + 0.002321280539035797, + -0.004039964638650417, + 0.01150511484593153, + 0.0005553708178922534, + -0.07012436538934708 + ], + [ + 0.009235251694917679, + 0.03964685648679733, + -0.015680547803640366, + 0.057399023324251175, + 0.006111305672675371, + 0.031026143580675125, + 0.0026811787392944098, + -0.008364795707166195 + ], + [ + -0.03311741724610329, + -0.011552426032721996, + -0.017869478091597557, + 0.027183115482330322, + -0.001883207936771214, + -0.033547837287187576, + -0.0017144967569038272, + 0.002095262985676527 + ], + [ + -0.04213636368513107, + 0.020250661298632622, + -0.017812032252550125, + 0.025925645604729652, + 0.00031834995024837554, + -0.037121158093214035, + 0.0029511714819818735, + -0.058897439390420914 + ], + [ + -0.011867895722389221, + -0.02909235656261444, + -0.03667827695608139, + -0.05375750735402107, + -0.06315930932760239, + 0.029468856751918793, + 0.002552744932472706, + -0.038429223001003265 + ] + ], + [ + [ + 0.016499113291502, + 0.014578362926840782, + 0.00904612522572279, + -0.013027665205299854, + 0.06451711803674698, + -0.02498728409409523, + 0.0010279084090143442, + -0.04528164491057396 + ], + [ + 0.032130662351846695, + 0.009637962095439434, + 0.029296400025486946, + -0.04765421524643898, + 0.05285235866904259, + 0.002438152674585581, + 0.0021227106917649508, + 0.035466328263282776 + ], + [ + 0.0015398277901113033, + -0.04961344972252846, + 0.03683849796652794, + -0.05135251209139824, + -0.0306890606880188, + 0.022526578977704048, + -0.00831650197505951, + 0.03787895292043686 + ], + [ + -0.024067936465144157, + 0.014857801608741283, + -0.00515251699835062, + -0.039601195603609085, + -0.008490189909934998, + -0.015465562231838703, + -0.00484308460727334, + 0.031109850853681564 + ], + [ + 0.026531415060162544, + 0.044300857931375504, + 0.00031954963924363256, + -0.02350146882236004, + 0.06283396482467651, + 0.02484520897269249, + -0.0049376762472093105, + 0.050070248544216156 + ], + [ + 0.003337228437885642, + 0.028247881680727005, + 0.03467438742518425, + 0.08629487454891205, + -0.01033877208828926, + -0.012838393449783325, + -0.004461981821805239, + 0.011900965124368668 + ], + [ + -0.04413149878382683, + -0.028393877670168877, + 0.0020796912722289562, + 0.02375110611319542, + 0.049496982246637344, + -0.016107110306620598, + -0.003821754828095436, + 0.004246436059474945 + ], + [ + 0.029047824442386627, + 0.0746879130601883, + -0.03787877783179283, + -0.006244698539376259, + -0.05021771043539047, + 0.05908486619591713, + 2.3445374608854763e-05, + -0.0369272455573082 + ] + ], + [ + [ + -0.023578515276312828, + -0.0732320174574852, + 0.028182851150631905, + -0.08169757574796677, + 0.09978170692920685, + -0.021220479160547256, + -0.0012960485182702541, + 0.0024907011538743973 + ], + [ + 0.016103319823741913, + -0.08897273242473602, + 0.006655106320977211, + -0.03408687561750412, + 0.057505156844854355, + -0.027198633179068565, + -0.0025965357199311256, + -0.03352592512965202 + ], + [ + -0.013530786149203777, + -0.024357367306947708, + -0.01440405286848545, + -0.018335707485675812, + -0.02289493940770626, + -0.008820013143122196, + -0.005710473284125328, + -0.00770311476662755 + ], + [ + -0.002925356850028038, + 0.017399447038769722, + -0.022776400670409203, + 0.12661682069301605, + -0.011674205772578716, + 0.021263714879751205, + 0.0035299318842589855, + -0.011561174876987934 + ], + [ + 0.02748972177505493, + -0.02875068038702011, + -0.0034187252167612314, + -0.0005650381208397448, + -0.02463742159307003, + 0.012273234315216541, + -0.0049965111538767815, + -0.017290696501731873 + ], + [ + 0.03993367403745651, + -0.010132942348718643, + 0.00846692081540823, + -0.007502176333218813, + -0.026540115475654602, + 0.0023193585220724344, + 0.00250883586704731, + -0.03875702619552612 + ], + [ + 0.00624600425362587, + 0.03381969407200813, + -0.0531858429312706, + 0.02054147981107235, + 0.002885937923565507, + 0.005957136396318674, + -0.0024407010059803724, + -0.007722098845988512 + ], + [ + 0.05076543241739273, + 0.05611557886004448, + 0.03240947425365448, + -0.03935427591204643, + 0.039463482797145844, + 0.03567212074995041, + -0.003169791307300329, + 0.06324541568756104 + ] + ], + [ + [ + -0.022020777687430382, + 0.016505800187587738, + 0.02251705527305603, + -0.042862121015787125, + 0.03832601010799408, + -0.01514213252812624, + -0.004434256814420223, + 0.016025718301534653 + ], + [ + 0.028758712112903595, + -0.009265787899494171, + 0.022459998726844788, + -0.02328445389866829, + 0.017665324732661247, + 0.0026569534093141556, + -0.0017988047329708934, + -0.022701380774378777 + ], + [ + -0.0005224022315815091, + 0.04559410735964775, + -0.012200670316815376, + 0.026762306690216064, + -0.05992667376995087, + 0.0021769776940345764, + -0.006994736380875111, + -0.037321943789720535 + ], + [ + -0.014389852993190289, + 0.017002493143081665, + -0.00040128821274265647, + 0.08879300206899643, + -0.018395420163869858, + -0.03133504092693329, + 0.00410481309518218, + -0.0645642951130867 + ], + [ + 0.0002717772440519184, + -0.009513511322438717, + 0.014815821312367916, + 0.047007083892822266, + -0.02960030548274517, + -0.021073853597044945, + 0.0002261377958348021, + -0.010798276402056217 + ], + [ + -0.01983822137117386, + -0.07184159755706787, + 0.02614123746752739, + -0.00563265522941947, + -0.017922313883900642, + -0.0405837781727314, + 0.0018845538143068552, + 0.04953915625810623 + ], + [ + 0.007283092942088842, + 0.039099231362342834, + 0.012761556543409824, + 0.10063011944293976, + 0.00027934013633057475, + 0.0029066079296171665, + 0.0003169078554492444, + 0.029813652858138084 + ], + [ + 0.010658487677574158, + -0.028285862877964973, + -0.0478723905980587, + 0.027957787737250328, + 0.04303066432476044, + -0.03352901712059975, + -0.0012250723084434867, + -0.12975990772247314 + ] + ], + [ + [ + -0.013537256047129631, + 0.05238577723503113, + 0.005718703847378492, + -0.06949151307344437, + 0.03302370756864548, + 0.006571685895323753, + 0.00011466589057818055, + 0.00626039132475853 + ], + [ + 0.008576955646276474, + 0.017574872821569443, + 0.04238191246986389, + -0.10857068002223969, + 0.01920907385647297, + 0.028706291690468788, + -0.001573970657773316, + 0.011989443562924862 + ], + [ + -0.006598475389182568, + 0.025117555633187294, + 0.010112421587109566, + -0.07486759126186371, + -0.034098584204912186, + 0.008741379715502262, + -0.01166967861354351, + 0.03647807613015175 + ], + [ + 0.039974093437194824, + 0.0724213570356369, + 0.030723698437213898, + -0.02665710262954235, + 0.09672828763723373, + 0.050913289189338684, + 0.0020184717141091824, + 0.040846724063158035 + ], + [ + -0.0044710393995046616, + 0.04319705441594124, + 0.02163914404809475, + 0.05784548446536064, + 0.018013354390859604, + -0.020730048418045044, + 0.00014576241665054113, + 0.053056128323078156 + ], + [ + -0.07732244580984116, + 0.012960267253220081, + 0.006965439300984144, + -0.02900182642042637, + -0.05672612413764, + 0.015393352136015892, + 0.000290620606392622, + 0.04550337791442871 + ], + [ + 0.03765431046485901, + 0.029776250943541527, + 0.041797541081905365, + 0.033305998891592026, + 0.02483319491147995, + 0.04873749613761902, + 0.0015955682611092925, + 0.049162108451128006 + ], + [ + -0.057691071182489395, + 0.03268313407897949, + -0.038149017840623856, + 0.07206942141056061, + -0.06966889649629593, + -0.026838187128305435, + -0.005664282478392124, + -0.009845499880611897 + ] + ], + [ + [ + 0.017008986324071884, + -0.03380714729428291, + 0.029887428507208824, + -0.014808248728513718, + -0.027534665539860725, + -0.018733453005552292, + 0.0014478347729891539, + 0.00510220555588603 + ], + [ + -0.009985621087253094, + 0.026287158951163292, + -5.691407204722054e-05, + 0.012011229991912842, + -0.10595933347940445, + -0.018612051382660866, + -3.840776116703637e-05, + -0.007089246995747089 + ], + [ + -0.046868033707141876, + -0.026856668293476105, + 0.012685840018093586, + 0.024001136422157288, + -0.048401013016700745, + -0.01886490359902382, + -0.0013681737473234534, + -0.04725852608680725 + ], + [ + 0.017298400402069092, + -0.0055013541132211685, + -0.034486766904592514, + -0.018276670947670937, + 0.07934970408678055, + -0.025759141892194748, + -0.0031857925932854414, + -0.017109768465161324 + ], + [ + -0.032607100903987885, + -0.014629293233156204, + -0.0040270136669278145, + -0.021674683317542076, + -0.022881701588630676, + -0.04137437418103218, + -0.0029383834917098284, + -0.016426250338554382 + ], + [ + -0.013112140819430351, + 0.04951461777091026, + -0.019426444545388222, + -0.1067165732383728, + -0.005790555849671364, + 0.015431643463671207, + 0.002745668403804302, + -0.060761287808418274 + ], + [ + -0.02718859538435936, + -0.014173204079270363, + -0.041049592196941376, + -0.0527324303984642, + 0.01959744095802307, + -0.03028767742216587, + -0.001563604106195271, + -0.03399864584207535 + ], + [ + -0.04595015197992325, + -0.07609930634498596, + -0.00949016772210598, + -0.03376895561814308, + 0.06327234208583832, + 0.029149960726499557, + -0.005461540073156357, + 0.029163913801312447 + ] + ], + [ + [ + 0.0034169231075793505, + -0.09629187732934952, + 0.04164726659655571, + -0.03187302127480507, + -0.027344170957803726, + 0.029287708923220634, + -0.005760457832366228, + 0.013712042942643166 + ], + [ + 0.03511974960565567, + -0.026796268299221992, + -0.0076391566544771194, + -0.006245866417884827, + -0.08964399993419647, + 0.024106943979859352, + -7.38082526368089e-05, + -0.03621454909443855 + ], + [ + 0.007988986559212208, + 0.014854440465569496, + 0.013902553357183933, + 0.06142263859510422, + -0.06621531397104263, + 0.04166422039270401, + 0.0027028722688555717, + -0.06668181717395782 + ], + [ + 0.007017246913164854, + -0.01532181166112423, + 0.008951706811785698, + 0.05182947590947151, + -0.05822329223155975, + -0.022058898583054543, + -0.00010043037036666647, + 0.005140329245477915 + ], + [ + -0.05488421022891998, + -0.02897132746875286, + 0.0069200280122458935, + 0.007578420452773571, + 0.01060867216438055, + -0.01873188093304634, + 0.0009334295173175633, + -0.043778449296951294 + ], + [ + 0.039265669882297516, + 0.041808925569057465, + -0.029103953391313553, + 0.006430219393223524, + 0.07768290489912033, + 0.024285344406962395, + -0.003971409518271685, + 0.0257878415286541 + ], + [ + -0.011825823225080967, + 0.026578161865472794, + -0.01706079952418804, + 0.0739683285355568, + -0.026103084906935692, + -0.020962458103895187, + -0.0009324122802354395, + -0.04519873112440109 + ], + [ + 0.05606530234217644, + 0.0011605949839577079, + -0.021185239776968956, + 0.015172949060797691, + -0.002464805729687214, + 0.013285425491631031, + -0.001909497193992138, + -0.0762360543012619 + ] + ], + [ + [ + -0.021435728296637535, + -0.09419088065624237, + 0.02435079775750637, + -0.09436185657978058, + 0.0038508623838424683, + -0.008003809489309788, + -0.010809044353663921, + 0.04777351766824722 + ], + [ + 0.006299225613474846, + -0.007912474684417248, + -0.014722801744937897, + -0.05951744318008423, + -0.0009749541059136391, + 0.00764832878485322, + -0.004682035185396671, + -0.020112313330173492 + ], + [ + 0.004490072373300791, + 0.00398431858047843, + 0.007428437937051058, + -0.08748703449964523, + -0.02641955018043518, + 0.021165696904063225, + 0.003948804922401905, + 0.058097511529922485 + ], + [ + 0.022024352103471756, + -0.010007213801145554, + 0.034138746559619904, + -0.026818471029400826, + 0.009726441465318203, + 0.008399690501391888, + 0.000750208564568311, + 0.023353861644864082 + ], + [ + -0.013152017258107662, + 0.00829852931201458, + -0.005865004379302263, + -0.01747799851000309, + 0.008446631953120232, + -0.0006678684148937464, + -0.0013256157981231809, + -0.016477907076478004 + ], + [ + 0.0238737091422081, + 0.012257738038897514, + 0.016137046739459038, + -0.009316585958003998, + 0.09303935617208481, + 0.008764083497226238, + -0.0070047397166490555, + 0.011080258525907993 + ], + [ + -0.02599562332034111, + -0.029852131381630898, + 0.013307028450071812, + 0.031022269278764725, + 0.02410108968615532, + 0.008427363820374012, + 0.007085585501044989, + 0.021932197734713554 + ], + [ + 0.024212850257754326, + 0.07384233176708221, + 0.003168053226545453, + 0.0362076573073864, + 0.017943328246474266, + 0.022166771814227104, + -0.008643457666039467, + 0.04790103808045387 + ] + ] + ] + ], + [ + 0.7729596495628357, + -1.2325631380081177, + -1.2648082971572876, + 0.9805302619934082, + -0.4909929931163788, + 1.2007927894592285, + 0.6860489249229431, + -1.6069121360778809 + ] + ] + }, + { + "type": "conv2d", + "activation": "sigmoid", + "shape": [ + 1, + null, + 264, + 1 + ], + "kernel_size_time": 5, + "kernel_size_feature": 5, + "dilation": 1, + "strides": 1, + "num_filters_in": 8, + "num_features_in": 264, + "num_filters_out": 1, + "padding": "same", + "weights": [ + [ + [ + [ + [ + 0.016679883003234863 + ], + [ + -0.128021702170372 + ], + [ + 0.07147208601236343 + ], + [ + 0.016242245212197304 + ], + [ + 0.013274486176669598 + ], + [ + 0.02510656788945198 + ], + [ + 0.015568763948976994 + ], + [ + 0.009108824655413628 + ] + ], + [ + [ + -0.007447455078363419 + ], + [ + 0.02391032874584198 + ], + [ + -0.0596187524497509 + ], + [ + -0.037649206817150116 + ], + [ + -0.057516686618328094 + ], + [ + 0.026170851662755013 + ], + [ + -0.014944711700081825 + ], + [ + -0.00040094804717227817 + ] + ], + [ + [ + 0.008153293281793594 + ], + [ + -0.019068989902734756 + ], + [ + 0.009864532388746738 + ], + [ + -0.0032323969062417746 + ], + [ + 0.0661197230219841 + ], + [ + -0.11185293644666672 + ], + [ + -0.10694694519042969 + ], + [ + -0.07777980715036392 + ] + ], + [ + [ + 0.012311486527323723 + ], + [ + 0.02185766026377678 + ], + [ + -0.017973218113183975 + ], + [ + 0.01723664253950119 + ], + [ + -0.01160167995840311 + ], + [ + 0.040646012872457504 + ], + [ + -0.061559055000543594 + ], + [ + 0.05348532646894455 + ] + ], + [ + [ + -0.02023702673614025 + ], + [ + -0.00024279020726680756 + ], + [ + -0.01547674834728241 + ], + [ + 0.010130397975444794 + ], + [ + 0.010930756106972694 + ], + [ + 0.028469489887356758 + ], + [ + 0.04519544541835785 + ], + [ + -0.04790545627474785 + ] + ] + ], + [ + [ + [ + 0.05102461576461792 + ], + [ + -0.20067743957042694 + ], + [ + -0.05216383561491966 + ], + [ + 0.04207300767302513 + ], + [ + 0.08491583913564682 + ], + [ + 0.022992391139268875 + ], + [ + -0.024609921500086784 + ], + [ + -0.011071776039898396 + ] + ], + [ + [ + 0.0034909199457615614 + ], + [ + 0.034663498401641846 + ], + [ + 0.019896848127245903 + ], + [ + -0.04734437167644501 + ], + [ + -0.07992866635322571 + ], + [ + -0.01585734635591507 + ], + [ + -0.04195094853639603 + ], + [ + 0.029470045119524002 + ] + ], + [ + [ + 0.0629817470908165 + ], + [ + -0.08380217105150223 + ], + [ + 0.018876517191529274 + ], + [ + -0.012224159203469753 + ], + [ + 0.020772220566868782 + ], + [ + -0.11878109723329544 + ], + [ + -0.08969029784202576 + ], + [ + 0.01112235989421606 + ] + ], + [ + [ + -0.04180309176445007 + ], + [ + -0.00613822927698493 + ], + [ + 0.05386653169989586 + ], + [ + 0.019927699118852615 + ], + [ + -0.027218064293265343 + ], + [ + 0.039381735026836395 + ], + [ + -0.06365182250738144 + ], + [ + 0.10195886343717575 + ] + ], + [ + [ + -0.027869082987308502 + ], + [ + 0.006061546504497528 + ], + [ + 0.051489219069480896 + ], + [ + 0.010969189926981926 + ], + [ + 0.02251950278878212 + ], + [ + 0.017676007002592087 + ], + [ + -0.02995838038623333 + ], + [ + -0.030674440786242485 + ] + ] + ], + [ + [ + [ + -0.04303281381726265 + ], + [ + -0.21798214316368103 + ], + [ + -0.048888400197029114 + ], + [ + -0.006192220374941826 + ], + [ + 0.028374776244163513 + ], + [ + -0.0485902801156044 + ], + [ + -0.12365487217903137 + ], + [ + 0.010748147033154964 + ] + ], + [ + [ + -0.06750281900167465 + ], + [ + -0.0447160080075264 + ], + [ + 0.03595679998397827 + ], + [ + -0.059524327516555786 + ], + [ + -0.06911353021860123 + ], + [ + -0.014820109121501446 + ], + [ + -0.10056499391794205 + ], + [ + -0.036829397082328796 + ] + ], + [ + [ + -0.01806182973086834 + ], + [ + 0.024007266387343407 + ], + [ + 0.06853818893432617 + ], + [ + -0.055349644273519516 + ], + [ + 0.042851127684116364 + ], + [ + -0.1845211535692215 + ], + [ + -0.22024454176425934 + ], + [ + -0.04071832075715065 + ] + ], + [ + [ + -0.06813391298055649 + ], + [ + 0.0211351178586483 + ], + [ + 0.007872648537158966 + ], + [ + -0.0021787588484585285 + ], + [ + -0.0008012835751287639 + ], + [ + -0.05006886273622513 + ], + [ + -0.15766306221485138 + ], + [ + 0.18076209723949432 + ] + ], + [ + [ + -0.13970458507537842 + ], + [ + -0.015163050033152103 + ], + [ + -0.0026446478441357613 + ], + [ + -0.020065167918801308 + ], + [ + 0.003961250185966492 + ], + [ + 0.0006623744848184288 + ], + [ + -0.1014774814248085 + ], + [ + 0.10802330076694489 + ] + ] + ], + [ + [ + [ + 0.05297314003109932 + ], + [ + -0.23177966475486755 + ], + [ + -0.07682254910469055 + ], + [ + 0.0564270094037056 + ], + [ + 0.03756331652402878 + ], + [ + 0.00989293772727251 + ], + [ + -0.05371502414345741 + ], + [ + 0.010306849144399166 + ] + ], + [ + [ + -0.013270813971757889 + ], + [ + -0.009653404355049133 + ], + [ + -0.015435706824064255 + ], + [ + -0.05973407253623009 + ], + [ + -0.0751510038971901 + ], + [ + 0.0026547126471996307 + ], + [ + -0.03729887306690216 + ], + [ + -0.023395230993628502 + ] + ], + [ + [ + 0.056267764419317245 + ], + [ + -0.08733123540878296 + ], + [ + -0.014744298532605171 + ], + [ + -0.012845702469348907 + ], + [ + 0.04558027535676956 + ], + [ + -0.14983712136745453 + ], + [ + -0.0776480957865715 + ], + [ + -0.07374297827482224 + ] + ], + [ + [ + -0.007414927240461111 + ], + [ + 0.038876280188560486 + ], + [ + 0.05389101803302765 + ], + [ + 0.02051253244280815 + ], + [ + -0.01523708924651146 + ], + [ + 0.06633607298135757 + ], + [ + -0.09799031168222427 + ], + [ + 0.2488647997379303 + ] + ], + [ + [ + -0.08481132239103317 + ], + [ + 0.014367892406880856 + ], + [ + 0.008216073736548424 + ], + [ + 0.024135196581482887 + ], + [ + 0.0212896466255188 + ], + [ + 0.04240458458662033 + ], + [ + -0.036885350942611694 + ], + [ + 0.09466194361448288 + ] + ] + ], + [ + [ + [ + 0.03750909864902496 + ], + [ + -0.2167665958404541 + ], + [ + -0.08861804753541946 + ], + [ + 0.041977882385253906 + ], + [ + 0.06682931631803513 + ], + [ + 0.018496649339795113 + ], + [ + -0.037882000207901 + ], + [ + 0.03776005655527115 + ] + ], + [ + [ + 0.009193125180900097 + ], + [ + 0.009350135922431946 + ], + [ + 0.04193103685975075 + ], + [ + -0.056976012885570526 + ], + [ + -0.12116889655590057 + ], + [ + -0.006236282642930746 + ], + [ + 0.01833466999232769 + ], + [ + 0.041518550366163254 + ] + ], + [ + [ + 0.058322202414274216 + ], + [ + -0.03371211886405945 + ], + [ + 0.009498756378889084 + ], + [ + -0.03665408864617348 + ], + [ + 0.03613840416073799 + ], + [ + -0.13574856519699097 + ], + [ + -0.08849846571683884 + ], + [ + -0.11856141686439514 + ] + ], + [ + [ + -0.09161246567964554 + ], + [ + 0.04453258216381073 + ], + [ + 0.03480077534914017 + ], + [ + 0.021419791504740715 + ], + [ + -0.032322585582733154 + ], + [ + 0.025727929547429085 + ], + [ + -0.06627663224935532 + ], + [ + 0.29526615142822266 + ] + ], + [ + [ + -0.01468608621507883 + ], + [ + 0.03223416954278946 + ], + [ + -0.02301211468875408 + ], + [ + 0.03390184044837952 + ], + [ + -0.008455291390419006 + ], + [ + 0.08001869916915894 + ], + [ + 0.06514467298984528 + ], + [ + 0.007349066901952028 + ] + ] + ] + ], + [ + -0.39454349875450134 + ] + ] + } + ] +} \ No newline at end of file diff --git a/model_data/cnn_note_model.json b/model_data/cnn_note_model.json new file mode 100644 index 0000000..6984148 --- /dev/null +++ b/model_data/cnn_note_model.json @@ -0,0 +1,3941 @@ +{ + "in_shape": [ + 1, + null, + 264, + 1 + ], + "layers": [ + { + "type": "conv2d", + "activation": "relu", + "shape": [ + 1, + null, + 88, + 32 + ], + "kernel_size_time": 7, + "kernel_size_feature": 7, + "dilation": 1, + "strides": 3, + "num_filters_in": 1, + "num_features_in": 264, + "num_filters_out": 32, + "padding": "same", + "weights": [ + [ + [ + [ + [ + -0.11708883941173553, + -0.19452594220638275, + 0.10938431322574615, + 0.007202035281807184, + -0.12206245213747025, + 0.11787047982215881, + 0.13403227925300598, + 0.15103401243686676, + 0.0387299619615078, + -0.24664495885372162, + -0.3668864667415619, + -0.14844848215579987, + -0.057101309299468994, + -0.19832617044448853, + -0.05611518397927284, + 0.11263248324394226, + -0.12089721858501434, + -0.05067583546042442, + 0.12908069789409637, + 0.19972148537635803, + 0.022706447169184685, + 0.0010653682984411716, + 0.01300298422574997, + 0.20689323544502258, + 0.05414550378918648, + -0.13188804686069489, + -0.1414002925157547, + 0.4155833423137665, + -0.08120333403348923, + -0.055191751569509506, + 0.11057349294424057, + 0.020664755254983902 + ] + ], + [ + [ + -0.11443283408880234, + -0.1856795847415924, + 0.17184773087501526, + 0.09186991304159164, + -0.25372594594955444, + 0.2642097473144531, + 0.07229030132293701, + 0.28348585963249207, + -0.011309812776744366, + -0.22908274829387665, + -0.205229252576828, + 0.019870394840836525, + 0.22793863713741302, + 0.08741559833288193, + -0.040628157556056976, + 0.23227553069591522, + -0.01957688108086586, + 0.10689259320497513, + -0.026667501777410507, + -0.12034133821725845, + 0.1001390591263771, + -0.07946783304214478, + -0.22240322828292847, + 0.2799980044364929, + 0.11113842576742172, + 0.006825054995715618, + -0.17400692403316498, + -0.20201922953128815, + 0.035007547587156296, + 0.19805683195590973, + -0.07525952905416489, + 0.14702878892421722 + ] + ], + [ + [ + 0.039194006472826004, + 0.13654977083206177, + 0.12615253031253815, + 0.11365017294883728, + 0.043647442013025284, + -0.12523652613162994, + -0.051202598959207535, + -0.0712478831410408, + -0.06145394593477249, + -0.11816855520009995, + -0.0757160484790802, + 0.08958417922258377, + 0.1980004906654358, + -0.02030346728861332, + 0.13136257231235504, + 0.11081673949956894, + 0.11723494529724121, + 0.008741282857954502, + 0.05789032578468323, + 0.13302433490753174, + -0.0019152864115312696, + -0.07813972979784012, + -0.18061906099319458, + -0.06316013634204865, + 0.16062615811824799, + -0.05010630190372467, + -0.06030900031328201, + 0.018524503335356712, + -0.13636520504951477, + 0.16547031700611115, + -0.04784770309925079, + 0.15652477741241455 + ] + ], + [ + [ + 0.12969009578227997, + -0.11555441468954086, + -0.057522002607584, + 0.032404836267232895, + 0.02346804551780224, + -0.04852784425020218, + 0.11547274142503738, + -0.07200286537408829, + 0.05822090804576874, + -0.06117553263902664, + -0.07247526943683624, + -0.04134742543101311, + -0.23205408453941345, + 0.19851985573768616, + 0.016085773706436157, + 0.15247446298599243, + -0.038989923894405365, + -0.35834309458732605, + -0.2970220446586609, + -0.17909066379070282, + -0.09911540150642395, + -0.3702613115310669, + 0.18566009402275085, + -0.1480153501033783, + -0.12686102092266083, + -0.1514321118593216, + -0.27302759885787964, + -0.04371865093708038, + 0.1927342265844345, + 0.21586793661117554, + 0.10154204815626144, + -0.15174153447151184 + ] + ], + [ + [ + -0.2312408983707428, + 0.0883309468626976, + 0.056717753410339355, + 0.05226792395114899, + 0.029863441362977028, + -0.06341011077165604, + -0.019306141883134842, + -0.1031900942325592, + -0.09836083650588989, + -0.03481394052505493, + -0.03330066800117493, + -0.01065779384225607, + -0.24406857788562775, + 0.006804195232689381, + -0.18143606185913086, + -0.06572779268026352, + -0.06353428959846497, + -0.03082781471312046, + 0.05938186123967171, + -0.14558853209018707, + -0.028040358796715736, + -0.08931368589401245, + -0.13068057596683502, + -0.10480858385562897, + 0.1327344924211502, + -0.05093097686767578, + -0.09121434390544891, + -0.014685703441500664, + -0.09498819708824158, + 0.10092326253652573, + -0.2060464471578598, + 0.028271783143281937 + ] + ], + [ + [ + -0.22223280370235443, + -0.005505282897502184, + -0.051001522690057755, + -0.10070331394672394, + -0.2306332141160965, + -0.1694338321685791, + 0.10031980276107788, + -0.04963964596390724, + 0.17200574278831482, + -0.020666932687163353, + -0.045788004994392395, + 0.07348765432834625, + 0.14110417664051056, + -0.19395866990089417, + 0.19556638598442078, + -0.041692670434713364, + -0.12697076797485352, + -0.015401387587189674, + 0.06332430988550186, + 0.010355581529438496, + -0.14017948508262634, + -0.051307015120983124, + 0.08324353396892548, + -0.19815082848072052, + -0.241670623421669, + -0.13688664138317108, + -0.029369408264756203, + -0.03634951636195183, + -0.012321673333644867, + 0.09393282234668732, + -0.17011718451976776, + 0.3362341821193695 + ] + ], + [ + [ + 0.14818699657917023, + -0.09653604030609131, + 0.18347428739070892, + -0.2667427659034729, + -0.08261837810277939, + 0.0037577988114207983, + -0.4966585636138916, + 0.020011400803923607, + 0.05141795426607132, + -0.00023311398399528116, + -0.16246232390403748, + 0.3032681941986084, + -0.12019646167755127, + -0.15213394165039062, + -0.005581629928201437, + 0.003516741329804063, + -0.3665984272956848, + 0.021285906434059143, + 0.20956094563007355, + -0.015461785718798637, + -0.2796909809112549, + 0.05709336698055267, + 0.1707082986831665, + 0.10577668994665146, + 0.07080777734518051, + -0.3669239580631256, + -0.006680692546069622, + 0.0773438811302185, + -0.4846390187740326, + -0.1197507306933403, + 0.04718130826950073, + 0.14926443994045258 + ] + ] + ], + [ + [ + [ + -0.1540714055299759, + -0.37844526767730713, + -0.10174828767776489, + 0.13378386199474335, + -0.03985161706805229, + 0.18594159185886383, + -0.0058143651112914085, + 0.1804114282131195, + -0.056306444108486176, + -0.22201642394065857, + -0.21992281079292297, + 0.15220166742801666, + -0.1884101927280426, + -0.024200158193707466, + -0.08004993945360184, + 0.13437892496585846, + -0.0024410930927842855, + 0.0825313851237297, + 0.08585494011640549, + -0.0819643959403038, + 0.08288387954235077, + 0.05522717162966728, + -0.07793254405260086, + 0.21386145055294037, + 0.08971448987722397, + -0.03138935938477516, + -0.13160845637321472, + 0.08406959474086761, + -0.10411883145570755, + -0.0029358884785324335, + -0.06355412304401398, + -0.04568192735314369 + ] + ], + [ + [ + -0.1901850700378418, + -0.13371676206588745, + 0.16966857016086578, + 0.08415781706571579, + -0.2885555326938629, + 0.2889115810394287, + -0.016150685027241707, + 0.31119096279144287, + -0.112638458609581, + -0.20955875515937805, + -0.08231185376644135, + -0.02020009234547615, + -0.17107141017913818, + -0.005707751959562302, + -0.11789777129888535, + 0.23960880935192108, + -0.11185145378112793, + 0.06899945437908173, + 0.04308818653225899, + 0.12596891820430756, + 0.037851203233003616, + -0.1275034248828888, + 0.014473604038357735, + 0.12326690554618835, + -0.022738106548786163, + -0.10767405480146408, + -0.18591102957725525, + -0.17134353518486023, + 0.002137599978595972, + 0.18846146762371063, + -0.2945176661014557, + 0.09318078309297562 + ] + ], + [ + [ + -0.01506183110177517, + 0.026518166065216064, + 0.037574365735054016, + -0.030383286997675896, + -0.08060362935066223, + -0.046711038798093796, + -0.0024775571655482054, + -0.03821863234043121, + 0.14702413976192474, + -0.08813522011041641, + 0.08244572579860687, + -0.01960703171789646, + -0.22314737737178802, + 0.1954738199710846, + -0.13443565368652344, + 0.1497841626405716, + 0.11753726750612259, + 0.05300235003232956, + 0.12033683061599731, + -0.12205014377832413, + -0.03828907757997513, + 0.07511457800865173, + -0.12816254794597626, + -0.07240338623523712, + -0.1617216318845749, + -0.06288450211286545, + -0.062023378908634186, + -0.03171315789222717, + -0.005270006600767374, + 0.0650922954082489, + 0.11334860324859619, + -0.02836896851658821 + ] + ], + [ + [ + 0.07166384905576706, + 0.01580890454351902, + -0.2629845142364502, + -0.11183708161115646, + 0.024396385997533798, + -0.00953548401594162, + 0.05440661311149597, + -0.05770133063197136, + 0.076400525867939, + -0.08332423120737076, + 0.00472627067938447, + 0.07912874966859818, + 0.05525252968072891, + -0.10825855284929276, + -0.02800426259636879, + 0.09262219816446304, + 0.12491712719202042, + -0.32595980167388916, + -0.18538838624954224, + -0.29414570331573486, + -0.04573819786310196, + -0.27577635645866394, + 0.021562425419688225, + 0.08773324638605118, + 0.04615926370024681, + -0.006254348438233137, + -0.2362421751022339, + 0.049396052956581116, + 0.09663558006286621, + 0.18126586079597473, + -0.11490882933139801, + 0.004216160625219345 + ] + ], + [ + [ + -0.013554956763982773, + -0.0164579376578331, + -0.07156388461589813, + 0.012807847931981087, + 0.1286456435918808, + -0.040382541716098785, + 0.09567037224769592, + -0.07149102538824081, + -0.012117371894419193, + -0.04215741902589798, + -0.01602158509194851, + -0.04399194195866585, + -0.08033500611782074, + 0.09432216733694077, + -0.24695920944213867, + -0.008123096078634262, + 0.053283970803022385, + -0.028612354770302773, + 0.08969239145517349, + -0.17407789826393127, + -0.06811032444238663, + 0.04035453870892525, + 0.17114390432834625, + -0.019102897495031357, + 0.03533383831381798, + 0.05006435886025429, + -0.08747655898332596, + -0.05635329708456993, + -0.13178850710391998, + 0.0658356174826622, + -0.1845405399799347, + 0.15119479596614838 + ] + ], + [ + [ + 0.1293942928314209, + -0.17774698138237, + 0.05988479033112526, + -0.1422029584646225, + -0.1386297345161438, + -0.17120032012462616, + 0.018583031371235847, + -0.026204371824860573, + 0.11385013908147812, + 0.10185075551271439, + -0.09680387377738953, + 0.2374337762594223, + 0.1960628777742386, + -0.15362395346164703, + 0.038251470774412155, + -0.0435275062918663, + -0.14085523784160614, + -0.04634806886315346, + 0.02820012904703617, + -0.13884054124355316, + -0.15679718554019928, + -0.004787642043083906, + -0.06749222427606583, + -0.20914185047149658, + -0.20731121301651, + -0.1431596428155899, + -0.029033023864030838, + -0.20217645168304443, + -0.02043933793902397, + -0.20703600347042084, + 0.09920328855514526, + 0.22570988535881042 + ] + ], + [ + [ + 0.08069615811109543, + -0.06645037233829498, + 0.048413343727588654, + -0.2463916689157486, + -0.015763763338327408, + -0.05539650470018387, + -0.3127334415912628, + 0.008066678419709206, + -0.21424423158168793, + 0.19372662901878357, + 0.033520858734846115, + 0.2543342113494873, + 0.009249771945178509, + -0.18182609975337982, + -0.017724616453051567, + -0.0020914003252983093, + -0.25670871138572693, + -0.03572705015540123, + 0.11982402950525284, + 0.11265172809362411, + -0.21371789276599884, + 0.04396288841962814, + 0.009920922107994556, + -0.07112608850002289, + -0.09128760546445847, + -0.26941388845443726, + 0.017413070425391197, + -0.0006851664511486888, + -0.23303726315498352, + -0.14033794403076172, + 0.18971848487854004, + -0.03187130391597748 + ] + ] + ], + [ + [ + [ + 0.04652724415063858, + -0.09543801099061966, + 0.04655604809522629, + 0.17380432784557343, + -0.17838479578495026, + 0.200168177485466, + 0.0023534917272627354, + 0.2023957520723343, + 0.18753398954868317, + -0.10985594987869263, + -0.2447877824306488, + -0.11990109086036682, + -0.14309504628181458, + -0.04914132133126259, + -0.022842882201075554, + 0.18733738362789154, + -0.06476813554763794, + 0.017399528995156288, + 0.059817276895046234, + 0.22503116726875305, + 0.08941689878702164, + 0.06546414643526077, + -0.04162872955203056, + 0.2719559371471405, + 0.07313785701990128, + -0.08162593096494675, + -0.1066998764872551, + 0.24402596056461334, + -0.08926104754209518, + -0.16737186908721924, + 0.09951648116111755, + -0.005696787498891354 + ] + ], + [ + [ + -0.0503203421831131, + -0.10945917665958405, + 0.08199308812618256, + 0.0251240823417902, + -0.222053661942482, + 0.28803691267967224, + -0.02965216524899006, + 0.33852288126945496, + 0.02884073369204998, + -0.15145185589790344, + -0.04565830156207085, + 0.08703245967626572, + 0.14648081362247467, + -0.07365509122610092, + 0.15118253231048584, + 0.32579705119132996, + -0.06988377124071121, + 0.09045311063528061, + 0.0557277612388134, + 0.18942932784557343, + 0.10986095666885376, + 0.0385596938431263, + -0.11498430371284485, + 0.22683142125606537, + 0.2196723073720932, + 0.026587404310703278, + -0.16168087720870972, + -0.11078260838985443, + 0.09840688854455948, + -0.1473722904920578, + -0.1135183721780777, + -0.13371777534484863 + ] + ], + [ + [ + 0.12295711785554886, + 0.0036289673298597336, + -0.14304746687412262, + -0.040661826729774475, + 0.01243723277002573, + -0.03835202381014824, + -0.02591969445347786, + 0.0012211345601826906, + 0.07047077268362045, + 0.09468485414981842, + 0.08180096745491028, + 0.009793257340788841, + 0.0958094596862793, + 0.10788628458976746, + 0.0012326518772169948, + 0.17856086790561676, + 0.04260699823498726, + 0.03542056307196617, + 0.14201968908309937, + -0.04713642969727516, + 0.03337686508893967, + 0.028252268210053444, + 0.14256802201271057, + -0.09781243652105331, + 0.09481257200241089, + 0.11915343254804611, + -0.043410081416368484, + -0.06140146777033806, + -0.17982353270053864, + 0.1980361044406891, + -0.0355975404381752, + 0.17130529880523682 + ] + ], + [ + [ + 0.14015470445156097, + -0.01862693764269352, + -0.06248863413929939, + -0.0004223081923555583, + 0.034742482006549835, + 0.058861248195171356, + 0.012083359993994236, + -0.03440845385193825, + 0.015554872341454029, + -0.05478677526116371, + 0.0434761606156826, + 0.14554017782211304, + 0.11342672258615494, + -0.22691433131694794, + -0.10501424968242645, + 0.08595350384712219, + 0.021518846973776817, + -0.2681559920310974, + -0.04575375095009804, + -0.09596486389636993, + -0.04989052563905716, + -0.19454428553581238, + 0.07798506319522858, + 0.06938187777996063, + 0.1146954745054245, + -0.0006241063238121569, + -0.23677058517932892, + -0.005818075500428677, + 0.06442005187273026, + 0.08693105727434158, + 0.12829160690307617, + -0.10973742604255676 + ] + ], + [ + [ + -0.08726689219474792, + 0.07908809185028076, + 0.03729342296719551, + 0.07577862590551376, + 0.165570467710495, + -0.008009684272110462, + -0.061377089470624924, + -0.039324868470430374, + -0.06435513496398926, + 0.08384866267442703, + 0.022113248705863953, + 0.09476249665021896, + -0.18550902605056763, + -0.007574068382382393, + -0.13076284527778625, + 0.0019966091495007277, + 0.0641251653432846, + 0.0004995253402739763, + 0.18782085180282593, + 0.07537797093391418, + 0.01885211281478405, + 0.07285331934690475, + -0.13446833193302155, + 0.01921495795249939, + -0.03945116326212883, + 0.057511892169713974, + -0.07489868998527527, + -0.009136810898780823, + 0.020572297275066376, + 0.194627046585083, + 0.1422254592180252, + -0.15815423429012299 + ] + ], + [ + [ + -0.1872774064540863, + -0.13934923708438873, + 0.16864745318889618, + -0.06767098605632782, + -0.11155892163515091, + -0.12980948388576508, + 0.0400499552488327, + -0.0044334870763123035, + -0.18410052359104156, + 0.11772496998310089, + -0.016424261033535004, + -0.14680714905261993, + -0.06411828100681305, + -0.19259890913963318, + 0.04675254970788956, + 0.011670749634504318, + 0.03485419973731041, + -0.03539559245109558, + 0.10774319618940353, + 0.04047839343547821, + -0.10706860572099686, + 0.0509989857673645, + 0.1960449069738388, + -0.14301955699920654, + -0.1503044217824936, + -0.010090311989188194, + -0.00833138171583414, + -0.027942245826125145, + -0.003862101584672928, + -0.08315813541412354, + -0.11716219782829285, + 0.1506308913230896 + ] + ], + [ + [ + -0.09295669943094254, + 0.014497664757072926, + 0.09932821989059448, + -0.22237999737262726, + -0.12834130227565765, + -0.00634056655690074, + -0.1646723449230194, + 0.010053574107587337, + 0.18569985032081604, + 0.09368041157722473, + -0.0786009430885315, + 0.03087880276143551, + 0.2673284113407135, + -0.14952270686626434, + 0.1289447396993637, + -0.002023849403485656, + -0.1967427134513855, + -0.022610994055867195, + 0.0720302015542984, + 0.1378668248653412, + -0.2234308272600174, + -0.04966180399060249, + 0.24726705253124237, + 0.03248891234397888, + 0.12677781283855438, + -0.15916591882705688, + 0.047688331454992294, + 0.18149210512638092, + -0.12586894631385803, + -0.2047610580921173, + 0.13636496663093567, + -0.17728683352470398 + ] + ] + ], + [ + [ + [ + 0.12830907106399536, + -0.14701169729232788, + -0.08297660201787949, + 0.23650720715522766, + 0.03424891084432602, + 0.21220842003822327, + -0.07757566124200821, + 0.22175903618335724, + 0.18309693038463593, + -0.18688899278640747, + -0.16144579648971558, + -0.1981787532567978, + 0.26352569460868835, + 0.09973467886447906, + 0.21607349812984467, + 0.2095813900232315, + 0.0528109148144722, + 0.07530608028173447, + 0.021862490102648735, + 0.23334330320358276, + 0.246450275182724, + 0.1277681291103363, + -0.24073471128940582, + 0.2962118089199066, + 0.22248175740242004, + 0.11178957670927048, + -0.0659247413277626, + 0.11610033363103867, + -0.051184143871068954, + 0.12253361195325851, + -0.1687205284833908, + 0.1992027461528778 + ] + ], + [ + [ + -0.05035751685500145, + -0.1592637300491333, + 0.1494957059621811, + 0.17290887236595154, + -0.03948067128658295, + 0.2839743494987488, + 0.006958326790481806, + 0.34552156925201416, + 0.24911755323410034, + -0.127232626080513, + -0.05793449655175209, + -0.015555720776319504, + -0.05879364162683487, + -0.08649285137653351, + 0.09523740410804749, + 0.3102458715438843, + 0.040082771331071854, + 0.09629127383232117, + 0.014807941392064095, + -0.025858411565423012, + 0.24810703098773956, + 0.0951182022690773, + -0.12327103316783905, + 0.2392807900905609, + 0.16160529851913452, + 0.07451526075601578, + -0.10442811995744705, + -0.2577698826789856, + 0.0010722856968641281, + 0.028518302366137505, + -0.12451852858066559, + -0.11371757835149765 + ] + ], + [ + [ + 0.24513664841651917, + 0.08601654320955276, + 0.133794367313385, + 0.17387698590755463, + 0.12257994711399078, + -0.041819289326667786, + -0.1716683804988861, + 0.021990828216075897, + 0.03784411400556564, + 0.12368529289960861, + 0.1891053169965744, + -0.17915783822536469, + -0.036873914301395416, + 0.17981697618961334, + -0.10973276197910309, + 0.1872469037771225, + 0.1170428991317749, + 0.09202050417661667, + 0.20639106631278992, + 0.010358241386711597, + 0.17383643984794617, + 0.19238176941871643, + -0.013795184902846813, + 0.02159370481967926, + -0.16026176512241364, + 0.22563016414642334, + 0.023033667355775833, + -0.06396883726119995, + -0.19005553424358368, + 0.10688503086566925, + -0.03284412622451782, + -0.14933273196220398 + ] + ], + [ + [ + 0.20750683546066284, + 0.09543666988611221, + -0.2017553448677063, + 0.12226210534572601, + 0.107066810131073, + 0.03751912713050842, + 0.004404050763696432, + -0.01692260056734085, + 0.06754974275827408, + -0.07976728677749634, + 0.03975127637386322, + -0.021674472838640213, + 0.01572556421160698, + 0.1882699429988861, + 0.04897202551364899, + -0.0008555027889087796, + 0.2053101360797882, + -0.25102829933166504, + 0.139070063829422, + -0.01903705485165119, + 0.04954713582992554, + -0.16446274518966675, + 0.1145738735795021, + -0.16692298650741577, + 0.16758683323860168, + 0.015144125558435917, + -0.22748219966888428, + -0.08467388898134232, + 0.056741807609796524, + 0.16566865146160126, + 0.05459921061992645, + 0.15508008003234863 + ] + ], + [ + [ + -0.09294764697551727, + 0.12382551282644272, + -0.16981159150600433, + 0.17921082675457, + 0.22637353837490082, + -0.030599331483244896, + 0.026564883068203926, + -0.021887538954615593, + -0.1313239485025406, + 0.15540215373039246, + 0.09475351125001907, + -0.14683784544467926, + -0.00596637325361371, + 0.15938907861709595, + 0.17972274124622345, + -0.01077537052333355, + 0.08149024099111557, + 0.02725963294506073, + 0.19592325389385223, + 0.02608909271657467, + 0.10425993800163269, + 0.00429944833740592, + 0.10487641394138336, + -0.013577882200479507, + -0.11647003889083862, + 0.14648586511611938, + -0.012055317871272564, + 0.0167158804833889, + -0.058700527995824814, + 0.20404376089572906, + -0.19732078909873962, + -0.03587520122528076 + ] + ], + [ + [ + -0.050622258335351944, + 0.1606026142835617, + 0.09910140931606293, + 0.0194650050252676, + -0.058097440749406815, + -0.1428125500679016, + 0.11947163194417953, + 0.014760967344045639, + 0.16031502187252045, + 0.2042006552219391, + 0.11591412127017975, + 0.21197810769081116, + 0.04638773575425148, + -0.05149068310856819, + 0.20466871559619904, + 0.038414761424064636, + 0.10550049692392349, + 0.03683137893676758, + 0.03924018144607544, + 0.1073211058974266, + 0.04145659878849983, + -0.02934686839580536, + 0.013718537986278534, + -0.21951991319656372, + -0.15161195397377014, + 0.10250663757324219, + 0.044723860919475555, + -0.13242937624454498, + 0.06546403467655182, + 0.03254445269703865, + 0.026633748784661293, + -0.07913946360349655 + ] + ], + [ + [ + 0.1192924901843071, + 0.05578310415148735, + 0.2605739235877991, + -0.10183604806661606, + -0.04686896875500679, + -0.0618010088801384, + 0.1410081684589386, + 0.020472466945648193, + 0.14369498193264008, + 0.13621723651885986, + 0.11880689859390259, + -0.1655154824256897, + 0.04967678338289261, + 0.21227380633354187, + 0.159938782453537, + -0.005199520383030176, + -0.15863989293575287, + 0.06337156891822815, + -0.00024917221162468195, + -0.008681398816406727, + -0.14453792572021484, + 0.02025822550058365, + -0.02729865349829197, + 0.008332625962793827, + 0.14705072343349457, + -0.07630930095911026, + 0.09698576480150223, + -0.04837418347597122, + 0.038616761565208435, + -0.15053950250148773, + -0.08126131445169449, + 0.25570401549339294 + ] + ] + ], + [ + [ + [ + -0.024384010583162308, + -0.12738673388957977, + 0.1823664903640747, + 0.11112954467535019, + -0.02158152312040329, + 0.1952752023935318, + -0.007189960218966007, + 0.21713389456272125, + 0.05243241786956787, + -0.24747823178768158, + -0.19884076714515686, + -0.05414660647511482, + 0.1812210977077484, + -0.20820137858390808, + 0.21111775934696198, + 0.18636083602905273, + -0.05113726109266281, + 0.08864453434944153, + -0.02471212111413479, + 0.19365547597408295, + 0.18251684308052063, + -0.012725383043289185, + -0.2068438082933426, + 0.1630687713623047, + 0.12028706073760986, + -0.13241246342658997, + -0.10237456113100052, + 0.07936065644025803, + 0.08803704380989075, + -0.08578353375196457, + 0.13627488911151886, + 0.07378101348876953 + ] + ], + [ + [ + 0.07118833810091019, + -0.1345667690038681, + -0.1399020403623581, + 0.11456406116485596, + 0.0007604443817399442, + 0.2596048414707184, + -0.03623165935277939, + 0.29796361923217773, + 0.1114932969212532, + -0.10944055765867233, + -0.09185787290334702, + 0.14951984584331512, + 0.09417351335287094, + 0.007205495610833168, + -0.19930927455425262, + 0.30891820788383484, + -0.052924320101737976, + 0.048336468636989594, + 0.05299406871199608, + 0.17924711108207703, + 0.10333672165870667, + -0.05716473609209061, + 0.00906759686768055, + 0.018077734857797623, + 0.044412583112716675, + 0.039592087268829346, + -0.14631810784339905, + -0.2758149802684784, + 0.0073885489255189896, + 0.1017255038022995, + -0.1364510953426361, + 0.13241799175739288 + ] + ], + [ + [ + 0.10914243757724762, + 0.12957438826560974, + -0.1560436189174652, + 0.0031689549796283245, + 0.09544037282466888, + -0.022731421515345573, + -0.06037468835711479, + -0.015214849263429642, + -0.11706586927175522, + -0.05937238782644272, + 0.10490360856056213, + -0.08531629294157028, + -0.1294582039117813, + -0.18524858355522156, + 0.04528539627790451, + 0.1254340559244156, + 0.12285690754652023, + 0.08447546511888504, + 0.2340775728225708, + -0.06263583153486252, + 0.02566927671432495, + -0.010305039584636688, + 0.02892843447625637, + -0.14274358749389648, + -0.12712794542312622, + 0.020181804895401, + -0.030347470194101334, + 0.11965312063694, + -0.07683148980140686, + 0.08854246139526367, + 0.023362580686807632, + 0.06618522852659225 + ] + ], + [ + [ + -0.10667268186807632, + 0.1076410636305809, + -0.008682052604854107, + 0.04632669314742088, + 0.002179035684093833, + 0.028555765748023987, + -0.04944392293691635, + -0.04129118099808693, + -0.10904213041067123, + 0.03822998329997063, + -0.0680253803730011, + 0.04849190637469292, + -0.11820375919342041, + -0.14438244700431824, + -0.31288614869117737, + -0.0360538586974144, + 0.06807184219360352, + -0.28391095995903015, + 0.2188928872346878, + -0.3311258554458618, + -0.044462401419878006, + -0.37263092398643494, + -0.002406165935099125, + 0.030746275559067726, + 0.08589443564414978, + 0.025289082899689674, + -0.3113064765930176, + -0.01794354058802128, + 0.023188520222902298, + 0.09192637354135513, + 0.08096962422132492, + -0.0001345526397926733 + ] + ], + [ + [ + 0.07497958838939667, + 0.05705508217215538, + 0.18277202546596527, + 0.01169783528894186, + 0.18526212871074677, + -0.030082812532782555, + 0.00738753704354167, + -0.05486052855849266, + 0.03147035464644432, + 0.03368198499083519, + 0.15097370743751526, + 0.18759363889694214, + -0.20814578235149384, + 0.032596565783023834, + -0.14116120338439941, + -0.05568866804242134, + 0.012046908028423786, + -0.004477105103433132, + 0.25026747584342957, + 0.056437134742736816, + -0.007044180762022734, + 0.10926210880279541, + -0.09569589793682098, + 0.001935082022100687, + -0.21442410349845886, + -0.04555040970444679, + -0.0685342401266098, + -0.16629734635353088, + -0.14039389789104462, + 0.21301649510860443, + -0.18060187995433807, + 0.0039513916708528996 + ] + ], + [ + [ + 0.048789724707603455, + 0.15031276643276215, + -0.05613492429256439, + -0.10571344941854477, + -0.02234419248998165, + -0.15666335821151733, + 0.0995059683918953, + -0.01341868843883276, + -0.23854133486747742, + 0.08438742160797119, + -0.06347957253456116, + 0.17512980103492737, + -0.1599515825510025, + 0.2414115071296692, + 0.027799246832728386, + 0.008045223541557789, + -0.11686760932207108, + -0.024439694359898567, + 0.047283850610256195, + 0.14095333218574524, + -0.07149720937013626, + 0.01209748350083828, + 0.05697353184223175, + -0.11298462003469467, + 0.04057333245873451, + -0.009469402022659779, + 0.0007769728545099497, + -0.07784144580364227, + -0.09067030251026154, + -0.15408380329608917, + -0.14963823556900024, + 0.11498738825321198 + ] + ], + [ + [ + -0.16366907954216003, + 0.026237089186906815, + -0.03340740501880646, + -0.17938172817230225, + -0.19941319525241852, + -0.07889758795499802, + 0.20627982914447784, + 0.0015805887524038553, + -0.14583586156368256, + 0.188979834318161, + 0.04950262978672981, + -0.25094106793403625, + 0.15997277200222015, + 0.1779785007238388, + -0.02451878786087036, + 0.011803848668932915, + -0.2767380475997925, + 0.03679030388593674, + -0.05764453485608101, + -0.10560223460197449, + -0.2696515619754791, + 0.09984710812568665, + 0.2217881679534912, + -0.22368086874485016, + 0.14941544830799103, + -0.2536793351173401, + 0.04383048042654991, + 0.06032068654894829, + 0.1850077509880066, + -0.29155871272087097, + -0.1491786390542984, + -0.03470019996166229 + ] + ] + ], + [ + [ + [ + 0.21745863556861877, + -0.25289222598075867, + 0.09070783853530884, + 0.12413846701383591, + -0.2695784270763397, + 0.2169027477502823, + 0.0247755516320467, + 0.20601673424243927, + 0.1425437331199646, + -0.3041030168533325, + -0.3301488757133484, + -0.18645912408828735, + -0.0274686086922884, + 0.06974663585424423, + 0.2415357381105423, + 0.1692989468574524, + -0.13503648340702057, + 0.10593406111001968, + -0.12745146453380585, + -0.011591298505663872, + 0.14446453750133514, + -0.06240079179406166, + -0.2655946612358093, + 0.08450184017419815, + 0.2072983980178833, + -0.1346265971660614, + -0.12785428762435913, + 0.24991276860237122, + 0.1458357870578766, + -0.19178803265094757, + 0.1754097044467926, + -0.21750140190124512 + ] + ], + [ + [ + -0.20015716552734375, + -0.04865814372897148, + 0.13060659170150757, + -0.00924763549119234, + -0.20489554107189178, + 0.19121219217777252, + 0.0064434451051056385, + 0.2403322458267212, + -0.12058021128177643, + -0.13485726714134216, + -0.10545867681503296, + -0.0014339197659865022, + -0.06775840371847153, + -0.1318472921848297, + 0.020401258021593094, + 0.22564847767353058, + 0.061975907534360886, + 0.0005758550832979381, + 0.012170195579528809, + -0.05389021337032318, + 0.03774929419159889, + -0.10675320774316788, + 0.05109405890107155, + -0.012173891998827457, + 0.08191366493701935, + -0.005660898517817259, + -0.15931518375873566, + -0.09331292659044266, + 0.0009348267922177911, + 0.24056066572666168, + -0.15753750503063202, + 0.06769140809774399 + ] + ], + [ + [ + 0.07823731750249863, + 0.07538270205259323, + -0.08664898574352264, + 0.004800515249371529, + -0.0659003034234047, + -0.12561509013175964, + -0.1546565592288971, + -0.07197513431310654, + -0.18085019290447235, + 0.06108831241726875, + 0.014482090249657631, + 0.13781873881816864, + -0.0073411730118095875, + 0.24384242296218872, + -0.0024509914219379425, + 0.09293508529663086, + 0.15726129710674286, + -0.01388379093259573, + 0.22986026108264923, + 0.12434647977352142, + 0.04862182214856148, + 0.022188913077116013, + 0.16117992997169495, + -0.037924665957689285, + 0.11466341465711594, + -0.03904208168387413, + -0.04237453266978264, + 0.08167990297079086, + -0.11548999696969986, + -0.08401918411254883, + -0.06691122055053711, + -0.12765903770923615 + ] + ], + [ + [ + -0.24121537804603577, + -0.16167998313903809, + -0.3282026946544647, + 0.060321155935525894, + -0.05071339011192322, + -0.0030673122964799404, + -0.008318855427205563, + -0.08100299537181854, + -0.2613353431224823, + 0.0045617311261594296, + -0.0536443293094635, + 0.15879657864570618, + 0.18758094310760498, + -0.1432582139968872, + -0.3697158992290497, + -0.1154361292719841, + 0.023370269685983658, + -0.41839656233787537, + 0.26156434416770935, + -0.26981303095817566, + -0.11337664723396301, + -0.41926807165145874, + 0.21529920399188995, + -0.06804896891117096, + 0.11328309029340744, + -0.14091931283473969, + -0.38097506761550903, + 0.06487961858510971, + -0.04247283563017845, + 0.12963606417179108, + -0.09671898931264877, + -0.02245408110320568 + ] + ], + [ + [ + -0.011604031547904015, + -0.03138111159205437, + -0.1873001903295517, + -0.022807549685239792, + -0.09824696183204651, + -0.06527846306562424, + -0.018673861399292946, + -0.096241295337677, + -0.20464730262756348, + 0.12108156830072403, + 0.07380659133195877, + -0.042484816163778305, + 0.09604228287935257, + 0.07979463040828705, + 0.012056500650942326, + -0.11055227369070053, + 0.09914225339889526, + 0.028333911672234535, + 0.238777756690979, + -0.13356198370456696, + 0.02245752513408661, + 0.04288949444890022, + 0.20420171320438385, + -0.1536237597465515, + -0.26924213767051697, + 0.0027841071132570505, + -0.07824156433343887, + -0.1419023871421814, + -0.1189587190747261, + -0.06073635071516037, + 0.1864168345928192, + -0.3174465596675873 + ] + ], + [ + [ + -0.11221863329410553, + -0.08817487955093384, + -0.1156553328037262, + -0.11270277202129364, + -0.0541931688785553, + -0.16843478381633759, + 0.11363399773836136, + -0.052408382296562195, + 0.061375074088573456, + 0.1671411544084549, + -0.11799149960279465, + -0.008267807774245739, + 0.1856899857521057, + 0.08937849849462509, + -0.06472596526145935, + -0.0814083069562912, + -0.02059783600270748, + -0.05271001532673836, + 0.06270943582057953, + -0.009163044393062592, + -0.12372172623872757, + 0.08657895028591156, + 0.28363320231437683, + 0.08843854069709778, + -0.21781060099601746, + -0.11137290298938751, + -0.015013586729764938, + -0.04514231160283089, + 0.12115440517663956, + 0.06706489622592926, + 0.10014963895082474, + 0.06227927654981613 + ] + ], + [ + [ + -0.2768345773220062, + 0.04760462045669556, + 0.12222547084093094, + -0.35793113708496094, + -0.2822423279285431, + -0.04730476066470146, + 0.3986715078353882, + -0.016731414943933487, + 0.09031320363283157, + 0.12125176191329956, + -0.0854896605014801, + -0.3295291066169739, + 0.0038276591803878546, + 0.1918746531009674, + -0.09704313427209854, + -0.04258658364415169, + -0.2662140130996704, + -0.034799251705408096, + -0.15872198343276978, + -0.16578994691371918, + -0.4143209457397461, + 0.051787279546260834, + 0.14860789477825165, + 0.08255747705698013, + -0.048769351094961166, + -0.3532332181930542, + 0.010476522147655487, + -0.049666628241539, + 0.3549686074256897, + -0.043234601616859436, + 0.1979769915342331, + -0.13690850138664246 + ] + ] + ], + [ + [ + [ + 0.10661447793245316, + -0.5006353259086609, + 0.1969185620546341, + 0.1537669152021408, + -0.08643846213817596, + 0.2215415984392166, + 0.0034793957602232695, + 0.20075933635234833, + 0.16806888580322266, + -0.30978965759277344, + -0.45425698161125183, + 0.030869916081428528, + 0.15123708546161652, + 0.10464100539684296, + 0.23356303572654724, + 0.1748204529285431, + 0.0008317009778693318, + -0.006674823351204395, + -0.1805858314037323, + 0.09359407424926758, + 0.0668676421046257, + 0.05068378150463104, + -0.19357158243656158, + 0.25905007123947144, + 0.22865508496761322, + -0.12861283123493195, + -0.11876138299703598, + 0.4230814278125763, + 0.16704949736595154, + 0.06635087728500366, + -0.03593164309859276, + 0.10075032711029053 + ] + ], + [ + [ + 0.10232748091220856, + -0.10561297833919525, + 0.05446280911564827, + -0.010402697138488293, + -0.24307076632976532, + 0.12262164056301117, + -0.011663874611258507, + 0.18075843155384064, + -0.29503679275512695, + -0.06152840703725815, + -0.21800562739372253, + 0.20298375189304352, + -0.15590712428092957, + 0.05381143465638161, + 0.2118406593799591, + 0.17300547659397125, + 0.014942831359803677, + 0.057386185973882675, + -0.03153591603040695, + 0.216817244887352, + 0.0692102387547493, + -0.07832401990890503, + -0.1142505332827568, + 0.15227684378623962, + -0.12446340173482895, + -0.041988205164670944, + -0.13421794772148132, + -0.0660158321261406, + 0.1420544683933258, + 0.026821503415703773, + 0.1836690604686737, + -0.2454274296760559 + ] + ], + [ + [ + 0.02971632592380047, + 0.11718139797449112, + -0.02379767782986164, + -0.02136446163058281, + 0.152756005525589, + -0.13779671490192413, + -0.1707175076007843, + -0.13532014191150665, + -0.15839414298534393, + 0.0972161516547203, + 0.10886096954345703, + -0.16677291691303253, + 0.09146580845117569, + 0.17263659834861755, + -0.12248203158378601, + 0.018122775480151176, + 0.0710005909204483, + 0.09857400506734848, + 0.1517343372106552, + -0.05800124630331993, + 0.004876832012087107, + 0.11151376366615295, + 0.10482646524906158, + -0.07935801148414612, + -0.11062201857566833, + -0.03064599819481373, + -0.027297548949718475, + -0.06860712915658951, + -0.17838864028453827, + -0.09098745882511139, + 0.2323271930217743, + -0.2949354350566864 + ] + ], + [ + [ + -0.18026719987392426, + 0.045015327632427216, + -0.35899290442466736, + -0.07854972034692764, + -0.08334451913833618, + -0.09280751645565033, + -0.14286857843399048, + -0.1240735575556755, + -0.26915058493614197, + -0.11153005808591843, + -0.07920520007610321, + 0.07468441128730774, + 0.01677154004573822, + -0.004510971251875162, + -0.12102854251861572, + -0.18935707211494446, + 0.12302982062101364, + -0.48116767406463623, + 0.27524933218955994, + -0.23195944726467133, + -0.10118509083986282, + -0.43470317125320435, + 0.10781426727771759, + -0.04356900602579117, + -0.2169220894575119, + -0.14351488649845123, + -0.43794676661491394, + 0.07402800768613815, + 0.007698738016188145, + 0.18429364264011383, + -0.042968060821294785, + 0.07711612433195114 + ] + ], + [ + [ + 0.15739120543003082, + 0.12204908579587936, + -0.14547964930534363, + -0.008586777374148369, + 0.08015745133161545, + -0.0989965945482254, + -0.007928324863314629, + -0.14778368175029755, + -0.18243075907230377, + 0.023349054157733917, + 0.04910077154636383, + -0.11892402917146683, + -0.15168790519237518, + 0.20049473643302917, + -0.13156773149967194, + -0.18611042201519012, + 0.11635004729032516, + 0.08132700622081757, + 0.1265832781791687, + 0.08037932217121124, + 0.023634325712919235, + 0.08902925997972488, + -0.0010731304064393044, + -0.1460232436656952, + 0.033553991466760635, + 0.016357824206352234, + -0.05352485924959183, + -0.12734289467334747, + -0.1593739092350006, + 0.1387009471654892, + 0.23013260960578918, + 0.013456808403134346 + ] + ], + [ + [ + -0.1549985557794571, + -0.01321776956319809, + -0.007201786153018475, + -0.062320295721292496, + 0.010205157101154327, + -0.17918308079242706, + 0.15608087182044983, + -0.0968640148639679, + -0.012084675952792168, + 0.14978022873401642, + -0.0658554658293724, + 0.17832250893115997, + 0.04007741063833237, + -0.11569791287183762, + 0.01109990756958723, + -0.12882521748542786, + -0.11347950994968414, + -0.0048828995786607265, + 0.007190017495304346, + 0.1494084596633911, + -0.09371009469032288, + -0.005529151763767004, + 0.21108423173427582, + 0.05033067986369133, + -0.13369178771972656, + -0.12906739115715027, + -0.00630826223641634, + -0.08312691003084183, + 0.06665851920843124, + 0.1263391077518463, + 0.30492737889289856, + -0.0025490710977464914 + ] + ], + [ + [ + -0.3068568706512451, + -0.1846717894077301, + -0.02109808661043644, + -0.4918447732925415, + -0.321227490901947, + -0.07657162845134735, + 0.39704349637031555, + -0.03081171214580536, + -0.11057454347610474, + 0.19340722262859344, + -0.08745270222425461, + 0.04195729270577431, + 0.1019301787018776, + 0.08512803167104721, + -0.054887399077415466, + -0.07200728356838226, + -0.48504531383514404, + -0.11254840344190598, + -0.16786061227321625, + -0.008081807754933834, + -0.3768254816532135, + 0.020580215379595757, + 0.053681161254644394, + 0.0004208620230201632, + 0.12196599692106247, + -0.45994678139686584, + 0.02109074778854847, + 0.11954407393932343, + 0.31784120202064514, + -0.09134554862976074, + 0.009095195680856705, + -0.012676450423896313 + ] + ] + ] + ], + [ + 0.30992940068244934, + 0.5528377890586853, + 0.31296661496162415, + 0.44302070140838623, + 0.5749708414077759, + -0.09435456246137619, + -0.04262005165219307, + -0.21977251768112183, + 0.2938917279243469, + 0.4683896005153656, + 0.6673905849456787, + -0.05627855286002159, + 0.15337666869163513, + 0.14326898753643036, + 0.3228438198566437, + -0.3382425010204315, + 0.5086042881011963, + 0.6113627552986145, + -0.336405485868454, + 0.3320351839065552, + 0.5395300984382629, + 0.5703149437904358, + 0.16775688529014587, + -0.08323061466217041, + -0.06603558361530304, + 0.6771699786186218, + 1.0468562841415405, + -0.24344830214977264, + 0.05202765390276909, + 0.04662943258881569, + 0.15568453073501587, + 0.17148442566394806 + ] + ] + }, + { + "type": "conv2d", + "activation": "sigmoid", + "shape": [ + 1, + null, + 88, + 1 + ], + "kernel_size_time": 7, + "kernel_size_feature": 3, + "dilation": 1, + "strides": 1, + "num_filters_in": 32, + "num_features_in": 88, + "num_filters_out": 1, + "padding": "same", + "weights": [ + [ + [ + [ + [ + 0.001481340965256095 + ], + [ + -0.0010722398292273283 + ], + [ + 0.008976168930530548 + ], + [ + -0.012706873938441277 + ], + [ + -0.007912646979093552 + ], + [ + 0.015039559453725815 + ], + [ + 0.17812688648700714 + ], + [ + 0.0005603506579063833 + ], + [ + 0.0052274297922849655 + ], + [ + 0.009872213937342167 + ], + [ + -0.001090780831873417 + ], + [ + 0.0854351744055748 + ], + [ + 0.0050952560268342495 + ], + [ + -0.003656568005681038 + ], + [ + 0.009366330690681934 + ], + [ + -0.0013940595090389252 + ], + [ + -0.018289590254426003 + ], + [ + 0.0053630066104233265 + ], + [ + 0.12504321336746216 + ], + [ + 0.010858419351279736 + ], + [ + -0.01148258987814188 + ], + [ + 0.008993578143417835 + ], + [ + 0.011284369975328445 + ], + [ + 0.013365612365305424 + ], + [ + -0.007517021149396896 + ], + [ + -0.021230870857834816 + ], + [ + 0.008196801878511906 + ], + [ + -0.020785734057426453 + ], + [ + 0.16706745326519012 + ], + [ + -0.017602505162358284 + ], + [ + 0.012477638199925423 + ], + [ + 0.006293073762208223 + ] + ], + [ + [ + -0.005024676211178303 + ], + [ + -0.012609307654201984 + ], + [ + -0.022178834304213524 + ], + [ + -0.006890051532536745 + ], + [ + -0.00909355841577053 + ], + [ + -0.06624735891819 + ], + [ + 0.07376153022050858 + ], + [ + -0.02067001909017563 + ], + [ + -0.02030550315976143 + ], + [ + -0.013574851676821709 + ], + [ + -0.014845304191112518 + ], + [ + 0.007364984601736069 + ], + [ + -0.014342628419399261 + ], + [ + -0.0030801338143646717 + ], + [ + -0.01627899333834648 + ], + [ + 0.03492803871631622 + ], + [ + -0.004268106073141098 + ], + [ + -0.030394364148378372 + ], + [ + 0.08853264153003693 + ], + [ + -0.02100525237619877 + ], + [ + -0.010227237828075886 + ], + [ + -0.03060613013803959 + ], + [ + 0.00020983642025385052 + ], + [ + -0.02775660715997219 + ], + [ + -0.02392319217324257 + ], + [ + -0.01585640199482441 + ], + [ + -0.028935683891177177 + ], + [ + 0.008372362703084946 + ], + [ + -0.030529474839568138 + ], + [ + 0.00802359078079462 + ], + [ + -0.004146063234657049 + ], + [ + -0.01749446429312229 + ] + ], + [ + [ + 0.0019645567517727613 + ], + [ + -0.020354600623250008 + ], + [ + 0.012793239206075668 + ], + [ + 0.005261154379695654 + ], + [ + -0.009219547733664513 + ], + [ + 0.038908328860998154 + ], + [ + -0.016299379989504814 + ], + [ + 0.046491414308547974 + ], + [ + 0.005742197390645742 + ], + [ + -0.013754131272435188 + ], + [ + -0.02043626829981804 + ], + [ + -0.013710016384720802 + ], + [ + -0.001318634720519185 + ], + [ + -0.005671447608619928 + ], + [ + 0.00962299294769764 + ], + [ + 0.04210091754794121 + ], + [ + -0.003293141955509782 + ], + [ + 0.01114841178059578 + ], + [ + 0.040069907903671265 + ], + [ + 0.015564178116619587 + ], + [ + 0.006929343566298485 + ], + [ + 0.008185413666069508 + ], + [ + -0.007387201767414808 + ], + [ + 0.03531130403280258 + ], + [ + 0.016944970935583115 + ], + [ + -0.0012877038680016994 + ], + [ + -0.0005793428281322122 + ], + [ + -0.03930984437465668 + ], + [ + 0.0618661567568779 + ], + [ + -0.004922386258840561 + ], + [ + 0.003835167270153761 + ], + [ + -0.0012045876355841756 + ] + ] + ], + [ + [ + [ + -0.004474983550608158 + ], + [ + -0.001626688172109425 + ], + [ + 0.0075042941607534885 + ], + [ + -0.01682303659617901 + ], + [ + -0.012147871777415276 + ], + [ + 0.0017836021725088358 + ], + [ + 0.1953427642583847 + ], + [ + -0.0038650105707347393 + ], + [ + -0.001406820141710341 + ], + [ + 0.01032265555113554 + ], + [ + -0.002415494294837117 + ], + [ + 0.08929836750030518 + ], + [ + 0.0050307996571063995 + ], + [ + 0.0034290512558072805 + ], + [ + 0.00886925496160984 + ], + [ + -0.006632228847593069 + ], + [ + -0.020378943532705307 + ], + [ + 0.004850173369050026 + ], + [ + 0.14426836371421814 + ], + [ + 0.010884813964366913 + ], + [ + -0.015406910330057144 + ], + [ + 0.008837041445076466 + ], + [ + 0.011566106230020523 + ], + [ + 0.0033722782973200083 + ], + [ + -0.009199456311762333 + ], + [ + -0.02663523703813553 + ], + [ + 0.006666651926934719 + ], + [ + -0.023821109905838966 + ], + [ + 0.18442295491695404 + ], + [ + -0.015078341588377953 + ], + [ + 0.014852063730359077 + ], + [ + 0.004930990748107433 + ] + ], + [ + [ + -0.00974707119166851 + ], + [ + -0.014525307342410088 + ], + [ + -0.02515215240418911 + ], + [ + -0.007640560623258352 + ], + [ + -0.012004896067082882 + ], + [ + -0.06258871406316757 + ], + [ + 0.07927205413579941 + ], + [ + -0.01603245735168457 + ], + [ + -0.029933592304587364 + ], + [ + -0.01243545487523079 + ], + [ + -0.017130011692643166 + ], + [ + 0.009007430635392666 + ], + [ + -0.01250187773257494 + ], + [ + 0.0001531178568257019 + ], + [ + -0.019241727888584137 + ], + [ + 0.04794779419898987 + ], + [ + -0.005071415100246668 + ], + [ + -0.03300448879599571 + ], + [ + 0.1026202067732811 + ], + [ + -0.020881103351712227 + ], + [ + -0.010534199886023998 + ], + [ + -0.033267635852098465 + ], + [ + 0.000559788488317281 + ], + [ + -0.027924787253141403 + ], + [ + -0.026962243020534515 + ], + [ + -0.018763866275548935 + ], + [ + -0.03323042765259743 + ], + [ + 0.012566769495606422 + ], + [ + -0.040676653385162354 + ], + [ + 0.009691138751804829 + ], + [ + -0.00027338246582075953 + ], + [ + -0.01665526069700718 + ] + ], + [ + [ + 0.00130364834330976 + ], + [ + -0.023994574323296547 + ], + [ + 0.011424039490520954 + ], + [ + 0.00439398642629385 + ], + [ + -0.011634768918156624 + ], + [ + 0.04029976576566696 + ], + [ + -0.007044651545584202 + ], + [ + 0.04795359820127487 + ], + [ + 0.0010256766108796 + ], + [ + -0.016587994992733 + ], + [ + -0.0249444842338562 + ], + [ + -0.009419383481144905 + ], + [ + 0.0012559214374050498 + ], + [ + -0.0008864991250447929 + ], + [ + 0.010551090352237225 + ], + [ + 0.04384007677435875 + ], + [ + -0.002482656156644225 + ], + [ + 0.010527222417294979 + ], + [ + 0.06659236550331116 + ], + [ + 0.01628417707979679 + ], + [ + 0.006765374448150396 + ], + [ + 0.00739154452458024 + ], + [ + -0.010724284686148167 + ], + [ + 0.032626181840896606 + ], + [ + 0.017613057047128677 + ], + [ + -0.0032586471643298864 + ], + [ + -0.0024003975559026003 + ], + [ + -0.047057319432497025 + ], + [ + 0.08178674429655075 + ], + [ + 0.00012109500676160678 + ], + [ + 0.008527103811502457 + ], + [ + -0.001718105748295784 + ] + ] + ], + [ + [ + [ + -0.014835532754659653 + ], + [ + -0.005276950541883707 + ], + [ + 0.004903269466012716 + ], + [ + -0.02207232639193535 + ], + [ + -0.022663645446300507 + ], + [ + -0.006068066228181124 + ], + [ + 0.20472770929336548 + ], + [ + -0.003157337661832571 + ], + [ + -0.006822197698056698 + ], + [ + 0.008909969590604305 + ], + [ + -0.006392151582986116 + ], + [ + 0.08706966042518616 + ], + [ + 0.00654451223090291 + ], + [ + 0.00794136244803667 + ], + [ + 0.00538872042670846 + ], + [ + -0.0033815973438322544 + ], + [ + -0.024197092279791832 + ], + [ + 0.0018462619045749307 + ], + [ + 0.15102984011173248 + ], + [ + 0.004651728086173534 + ], + [ + -0.021891679614782333 + ], + [ + 0.005475315731018782 + ], + [ + 0.01350683905184269 + ], + [ + -0.0061402576975524426 + ], + [ + -0.005345907062292099 + ], + [ + -0.03473057970404625 + ], + [ + 0.002262330148369074 + ], + [ + -0.025889558717608452 + ], + [ + 0.18956358730793 + ], + [ + -0.017033955082297325 + ], + [ + 0.012308410368859768 + ], + [ + -0.0012087845243513584 + ] + ], + [ + [ + -0.018272511661052704 + ], + [ + -0.019214846193790436 + ], + [ + -0.029581354930996895 + ], + [ + -0.009930386207997799 + ], + [ + -0.020089786499738693 + ], + [ + -0.054264795035123825 + ], + [ + 0.06803062558174133 + ], + [ + -0.005556810647249222 + ], + [ + -0.03743671253323555 + ], + [ + -0.014045169577002525 + ], + [ + -0.022128351032733917 + ], + [ + 0.005921203643083572 + ], + [ + -0.010136776603758335 + ], + [ + 2.361638325965032e-05 + ], + [ + -0.02620960772037506 + ], + [ + 0.06479863077402115 + ], + [ + -0.007734538987278938 + ], + [ + -0.03823523223400116 + ], + [ + 0.11304055154323578 + ], + [ + -0.028142603114247322 + ], + [ + -0.013790377415716648 + ], + [ + -0.03897940367460251 + ], + [ + 0.0018914839019998908 + ], + [ + -0.02710585668683052 + ], + [ + -0.024257348850369453 + ], + [ + -0.024690086022019386 + ], + [ + -0.04094599932432175 + ], + [ + 0.016463572159409523 + ], + [ + -0.05745692923665047 + ], + [ + 0.009631992317736149 + ], + [ + -0.0015518896980211139 + ], + [ + -0.020388508215546608 + ] + ], + [ + [ + -0.004103606566786766 + ], + [ + -0.030495624989271164 + ], + [ + 0.007655817084014416 + ], + [ + 0.002567746676504612 + ], + [ + -0.0203687846660614 + ], + [ + 0.04418456181883812 + ], + [ + -0.005204596556723118 + ], + [ + 0.05168861150741577 + ], + [ + -0.0017903404077515006 + ], + [ + -0.021741706877946854 + ], + [ + -0.03187606483697891 + ], + [ + -0.017309173941612244 + ], + [ + 0.005365918390452862 + ], + [ + 0.0008120872662402689 + ], + [ + 0.00782791618257761 + ], + [ + 0.04770228639245033 + ], + [ + -0.004107963293790817 + ], + [ + 0.007446151692420244 + ], + [ + 0.08263694494962692 + ], + [ + 0.012174791656434536 + ], + [ + 0.004603852983564138 + ], + [ + 0.0038914002943784 + ], + [ + -0.01142507791519165 + ], + [ + 0.03269509971141815 + ], + [ + 0.02131597138941288 + ], + [ + -0.008701611310243607 + ], + [ + -0.0077586411498487 + ], + [ + -0.05209863930940628 + ], + [ + 0.08579306304454803 + ], + [ + 0.0013376917922869325 + ], + [ + 0.007617253344506025 + ], + [ + -0.005921213421970606 + ] + ] + ], + [ + [ + [ + -0.03501325473189354 + ], + [ + -0.020933622494339943 + ], + [ + -0.0024137517903000116 + ], + [ + -0.03865482285618782 + ], + [ + -0.044246405363082886 + ], + [ + -0.007402354385703802 + ], + [ + 0.20016349852085114 + ], + [ + -0.0011804160894826055 + ], + [ + -0.01900044083595276 + ], + [ + -0.003320021089166403 + ], + [ + -0.023120282217860222 + ], + [ + 0.09012289345264435 + ], + [ + -0.0037227484863251448 + ], + [ + -0.006400755140930414 + ], + [ + -0.010527858510613441 + ], + [ + 0.003911816049367189 + ], + [ + -0.04406788572669029 + ], + [ + -0.011997777037322521 + ], + [ + 0.14041976630687714 + ], + [ + -0.009396317414939404 + ], + [ + -0.041113026440143585 + ], + [ + -0.009300990030169487 + ], + [ + 0.00471755163744092 + ], + [ + -0.013269457966089249 + ], + [ + 0.0009010108187794685 + ], + [ + -0.05745866522192955 + ], + [ + -0.014434294775128365 + ], + [ + -0.027455221861600876 + ], + [ + 0.1648261845111847 + ], + [ + -0.027443530037999153 + ], + [ + -0.0030136527493596077 + ], + [ + -0.00445133913308382 + ] + ], + [ + [ + -0.03473816439509392 + ], + [ + -0.03439198061823845 + ], + [ + -0.041404057294130325 + ], + [ + -0.021965717896819115 + ], + [ + -0.037259649485349655 + ], + [ + -0.04388388618826866 + ], + [ + 0.004487510304898024 + ], + [ + 0.004482209216803312 + ], + [ + -0.05257248133420944 + ], + [ + -0.029682951048016548 + ], + [ + -0.03916902095079422 + ], + [ + 0.006395578384399414 + ], + [ + -0.02267325296998024 + ], + [ + -0.018421774730086327 + ], + [ + -0.04758007824420929 + ], + [ + 0.07482849806547165 + ], + [ + -0.022240525111556053 + ], + [ + -0.05542898550629616 + ], + [ + 0.11671867221593857 + ], + [ + -0.04513709992170334 + ], + [ + -0.028985867276787758 + ], + [ + -0.05771414935588837 + ], + [ + -0.007751682307571173 + ], + [ + -0.026046669110655785 + ], + [ + -0.017521347850561142 + ], + [ + -0.043810177594423294 + ], + [ + -0.06274589896202087 + ], + [ + 0.018222752958536148 + ], + [ + -0.09512107819318771 + ], + [ + 0.004430439788848162 + ], + [ + -0.018242239952087402 + ], + [ + -0.021550729870796204 + ] + ], + [ + [ + -0.018665974959731102 + ], + [ + -0.05003925785422325 + ], + [ + -0.0013252984499558806 + ], + [ + -0.00713772838935256 + ], + [ + -0.04013339430093765 + ], + [ + 0.04962824657559395 + ], + [ + -0.041154202073812485 + ], + [ + 0.0557391382753849 + ], + [ + -0.009991247206926346 + ], + [ + -0.041609928011894226 + ], + [ + -0.05272086709737778 + ], + [ + -0.00820484571158886 + ], + [ + -0.005377582740038633 + ], + [ + -0.015846559777855873 + ], + [ + -0.006319240666925907 + ], + [ + 0.05141899734735489 + ], + [ + -0.019986864179372787 + ], + [ + -0.0056953406892716885 + ], + [ + 0.08152961730957031 + ], + [ + 0.00127418152987957 + ], + [ + -0.007304568774998188 + ], + [ + -0.01054863166064024 + ], + [ + -0.026576625183224678 + ], + [ + 0.037175703793764114 + ], + [ + 0.02654322050511837 + ], + [ + -0.028002075850963593 + ], + [ + -0.02702493965625763 + ], + [ + -0.05348871275782585 + ], + [ + 0.0379607193171978 + ], + [ + -0.005906934384256601 + ], + [ + -0.009338729083538055 + ], + [ + -0.007558315992355347 + ] + ] + ], + [ + [ + [ + -0.018629277125000954 + ], + [ + -0.0033636176958680153 + ], + [ + 0.010408216156065464 + ], + [ + -0.020443493500351906 + ], + [ + -0.021334726363420486 + ], + [ + -0.004886861890554428 + ], + [ + 0.18457648158073425 + ], + [ + 0.0016945685492828488 + ], + [ + 0.004800880793482065 + ], + [ + 0.005957797169685364 + ], + [ + -0.0032674672547727823 + ], + [ + 0.07197432965040207 + ], + [ + 0.003551367437466979 + ], + [ + 0.0004893814329989254 + ], + [ + 0.004539854358881712 + ], + [ + 0.009558476507663727 + ], + [ + -0.025790823623538017 + ], + [ + 0.002952098846435547 + ], + [ + 0.11515873670578003 + ], + [ + 0.0013715749373659492 + ], + [ + -0.02288205921649933 + ], + [ + 0.003976837266236544 + ], + [ + 0.006828612182289362 + ], + [ + -0.014098802581429482 + ], + [ + 0.005375291220843792 + ], + [ + -0.03085837885737419 + ], + [ + 0.003012107452377677 + ], + [ + -0.027947379276156425 + ], + [ + 0.14012792706489563 + ], + [ + -0.01370043121278286 + ], + [ + -0.005436690524220467 + ], + [ + 0.01417312677949667 + ] + ], + [ + [ + -0.018684959039092064 + ], + [ + -0.01772211119532585 + ], + [ + -0.02441970258951187 + ], + [ + -0.007250973954796791 + ], + [ + -0.017923226580023766 + ], + [ + -0.03692144155502319 + ], + [ + 0.031826574355363846 + ], + [ + 0.009427135810256004 + ], + [ + -0.02906171791255474 + ], + [ + -0.01845296286046505 + ], + [ + -0.020457914099097252 + ], + [ + 0.0049233222380280495 + ], + [ + -0.013088242150843143 + ], + [ + -0.011407344602048397 + ], + [ + -0.03145676478743553 + ], + [ + 0.07249484956264496 + ], + [ + -0.00955582782626152 + ], + [ + -0.036505550146102905 + ], + [ + 0.10972929745912552 + ], + [ + -0.031945664435625076 + ], + [ + -0.012853377498686314 + ], + [ + -0.03929871320724487 + ], + [ + -0.00573907932266593 + ], + [ + -0.02314998023211956 + ], + [ + -0.00987969245761633 + ], + [ + -0.02089545503258705 + ], + [ + -0.042570810765028 + ], + [ + 0.01740778610110283 + ], + [ + -0.08505723625421524 + ], + [ + 0.008917082101106644 + ], + [ + -0.021167917177081108 + ], + [ + -0.0001983542606467381 + ] + ], + [ + [ + -0.002719433046877384 + ], + [ + -0.029252314940094948 + ], + [ + 0.011258485727012157 + ], + [ + 0.006137605756521225 + ], + [ + -0.016606956720352173 + ], + [ + 0.050869476050138474 + ], + [ + -0.002365328138694167 + ], + [ + 0.05658167600631714 + ], + [ + 0.009826010093092918 + ], + [ + -0.027933023869991302 + ], + [ + -0.02965865284204483 + ], + [ + -0.0003010671935044229 + ], + [ + 0.0014546985039487481 + ], + [ + -0.005421615671366453 + ], + [ + 0.005626651458442211 + ], + [ + 0.05281081795692444 + ], + [ + -0.00427806144580245 + ], + [ + 0.00772947957739234 + ], + [ + 0.06715437769889832 + ], + [ + 0.008770826272666454 + ], + [ + 0.005558024160563946 + ], + [ + 0.003553982125595212 + ], + [ + -0.022784585133194923 + ], + [ + 0.040220655500888824 + ], + [ + 0.028096791356801987 + ], + [ + -0.004202091135084629 + ], + [ + -0.007201294414699078 + ], + [ + -0.049773912876844406 + ], + [ + 0.03221551701426506 + ], + [ + 0.004128735046833754 + ], + [ + -0.013871069066226482 + ], + [ + 0.011374128982424736 + ] + ] + ], + [ + [ + [ + -0.01721307635307312 + ], + [ + 0.001756036770530045 + ], + [ + 0.01313034724444151 + ], + [ + -0.018150778487324715 + ], + [ + -0.015903757885098457 + ], + [ + -0.002982205944135785 + ], + [ + 0.1527395248413086 + ], + [ + 0.003218426601961255 + ], + [ + 0.011552220210433006 + ], + [ + 0.00840207003057003 + ], + [ + 0.0013706374447792768 + ], + [ + 0.043857965618371964 + ], + [ + 0.006849384866654873 + ], + [ + -0.0017437494825571775 + ], + [ + 0.009266471490263939 + ], + [ + 0.00986719410866499 + ], + [ + -0.023562639951705933 + ], + [ + 0.005489524453878403 + ], + [ + 0.07677199691534042 + ], + [ + 0.00702084694057703 + ], + [ + -0.019664006307721138 + ], + [ + 0.0069479565136134624 + ], + [ + 0.005224296823143959 + ], + [ + -0.011296220123767853 + ], + [ + 0.009536420926451683 + ], + [ + -0.02232687547802925 + ], + [ + 0.007808384019881487 + ], + [ + -0.02638314664363861 + ], + [ + 0.10514841228723526 + ], + [ + -0.013483485206961632 + ], + [ + -0.004195716697722673 + ], + [ + 0.014758649282157421 + ] + ], + [ + [ + -0.015996083617210388 + ], + [ + -0.012535616755485535 + ], + [ + -0.023775804787874222 + ], + [ + -0.004738034680485725 + ], + [ + -0.012711659073829651 + ], + [ + -0.03782045468688011 + ], + [ + 0.027812151238322258 + ], + [ + 0.006218118127435446 + ], + [ + -0.025004297494888306 + ], + [ + -0.016767647117376328 + ], + [ + -0.015889335423707962 + ], + [ + 0.006119988393038511 + ], + [ + -0.007976677268743515 + ], + [ + -0.013614759780466557 + ], + [ + -0.027995796874165535 + ], + [ + 0.06356241554021835 + ], + [ + -0.007303033489733934 + ], + [ + -0.03333907201886177 + ], + [ + 0.0985192209482193 + ], + [ + -0.026875320822000504 + ], + [ + -0.009638355113565922 + ], + [ + -0.03596724569797516 + ], + [ + -0.006934445817023516 + ], + [ + -0.023830922320485115 + ], + [ + -0.0008801163057796657 + ], + [ + -0.01397104561328888 + ], + [ + -0.038186270743608475 + ], + [ + 0.015409024432301521 + ], + [ + -0.0601053349673748 + ], + [ + 0.006904572248458862 + ], + [ + -0.022598451003432274 + ], + [ + 0.0020094625651836395 + ] + ], + [ + [ + 0.0011495149228721857 + ], + [ + -0.023387592285871506 + ], + [ + 0.01525920256972313 + ], + [ + 0.009242480620741844 + ], + [ + -0.010358717292547226 + ], + [ + 0.05196266621351242 + ], + [ + 0.026408467441797256 + ], + [ + 0.05743761733174324 + ], + [ + 0.015503019094467163 + ], + [ + -0.025801103562116623 + ], + [ + -0.02438756823539734 + ], + [ + 0.0037542441859841347 + ], + [ + 0.0030667143873870373 + ], + [ + -0.004641159903258085 + ], + [ + 0.010545255616307259 + ], + [ + 0.05428018048405647 + ], + [ + -0.0014570956118404865 + ], + [ + 0.009939831681549549 + ], + [ + 0.0392838679254055 + ], + [ + 0.012002283707261086 + ], + [ + 0.008184538222849369 + ], + [ + 0.006213190499693155 + ], + [ + -0.026971137151122093 + ], + [ + 0.04359257221221924 + ], + [ + 0.03168822079896927 + ], + [ + 0.0031622296664863825 + ], + [ + -0.0018866914324462414 + ], + [ + -0.04017825424671173 + ], + [ + 0.03976175934076309 + ], + [ + 0.0028490873519331217 + ], + [ + -0.014933954924345016 + ], + [ + 0.012876136228442192 + ] + ] + ], + [ + [ + [ + -0.019920002669095993 + ], + [ + 0.0003644130192697048 + ], + [ + 0.009922351688146591 + ], + [ + -0.023280641064047813 + ], + [ + -0.01810023933649063 + ], + [ + -0.0006317022489383817 + ], + [ + 0.12539426982402802 + ], + [ + 0.004687235224992037 + ], + [ + 0.011444947682321072 + ], + [ + 0.009984162636101246 + ], + [ + 0.002715576207265258 + ], + [ + 0.007958375848829746 + ], + [ + 0.006574873346835375 + ], + [ + -0.0015312759205698967 + ], + [ + 0.006938503589481115 + ], + [ + 0.0057076276279985905 + ], + [ + -0.025747189298272133 + ], + [ + 0.004567367024719715 + ], + [ + 0.03214260935783386 + ], + [ + 0.005130273289978504 + ], + [ + -0.02280561625957489 + ], + [ + 0.008379426784813404 + ], + [ + 0.004218920599669218 + ], + [ + -0.005562096368521452 + ], + [ + 0.012865287251770496 + ], + [ + -0.02121102809906006 + ], + [ + 0.009063998237252235 + ], + [ + -0.02348656952381134 + ], + [ + 0.0799282118678093 + ], + [ + -0.02138582058250904 + ], + [ + -0.0017535503720864654 + ], + [ + 0.007872640155255795 + ] + ], + [ + [ + -0.017481956630945206 + ], + [ + -0.013595838099718094 + ], + [ + -0.03372375667095184 + ], + [ + -0.006716336589306593 + ], + [ + -0.012735042721033096 + ], + [ + -0.044751785695552826 + ], + [ + 0.00039268925320357084 + ], + [ + -0.0035133440978825092 + ], + [ + -0.02923496998846531 + ], + [ + -0.01690652035176754 + ], + [ + -0.014407970011234283 + ], + [ + 0.0060001858510077 + ], + [ + -0.00750757846981287 + ], + [ + -0.015564258210361004 + ], + [ + -0.03406710550189018 + ], + [ + 0.04949060082435608 + ], + [ + -0.0064655509777367115 + ], + [ + -0.0365564227104187 + ], + [ + 0.09347373247146606 + ], + [ + -0.031799931079149246 + ], + [ + -0.011015056632459164 + ], + [ + -0.03772525489330292 + ], + [ + -0.007134381216019392 + ], + [ + -0.027612602338194847 + ], + [ + 0.00036793662002310157 + ], + [ + -0.012810178101062775 + ], + [ + -0.039592765271663666 + ], + [ + 0.011923912912607193 + ], + [ + -0.02947213500738144 + ], + [ + 0.002995139919221401 + ], + [ + -0.022194581106305122 + ], + [ + -0.00433340622112155 + ] + ], + [ + [ + 0.003190513700246811 + ], + [ + -0.02708600088953972 + ], + [ + 0.014368954114615917 + ], + [ + 0.008493374101817608 + ], + [ + -0.010880623944103718 + ], + [ + 0.05337965115904808 + ], + [ + 0.04406927898526192 + ], + [ + 0.05841870233416557 + ], + [ + 0.016514183953404427 + ], + [ + -0.027597934007644653 + ], + [ + -0.024422094225883484 + ], + [ + -0.001955220475792885 + ], + [ + 0.0033952356316149235 + ], + [ + -0.005405749659985304 + ], + [ + 0.011933187022805214 + ], + [ + 0.055325914174318314 + ], + [ + -0.001007402315735817 + ], + [ + 0.009149466641247272 + ], + [ + 0.0024425345472991467 + ], + [ + 0.01047919224947691 + ], + [ + 0.007910770364105701 + ], + [ + 0.006267447955906391 + ], + [ + -0.033736031502485275 + ], + [ + 0.04664919525384903 + ], + [ + 0.0360703244805336 + ], + [ + 0.004686158150434494 + ], + [ + -0.0009687012061476707 + ], + [ + -0.026742324233055115 + ], + [ + 0.0604107528924942 + ], + [ + -0.003017239971086383 + ], + [ + -0.01178413163870573 + ], + [ + 0.007678373716771603 + ] + ] + ] + ], + [ + -0.6187598705291748 + ] + ] + } + ] +} \ No newline at end of file diff --git a/model_data/cnn_onset_1_model.json b/model_data/cnn_onset_1_model.json new file mode 100644 index 0000000..2e6e7ec --- /dev/null +++ b/model_data/cnn_onset_1_model.json @@ -0,0 +1,6926 @@ +{ + "in_shape": [ + 1, + null, + 264, + 8 + ], + "layers": [ + { + "type": "conv2d", + "activation": "relu", + "shape": [ + 1, + null, + 88, + 32 + ], + "kernel_size_time": 5, + "kernel_size_feature": 5, + "dilation": 1, + "strides": 3, + "num_filters_in": 8, + "num_features_in": 264, + "num_filters_out": 32, + "padding": "same", + "weights": [ + [ + [ + [ + [ + -0.21944934129714966, + 0.05897047370672226, + 0.16477330029010773, + -0.14918804168701172, + 0.2043820470571518, + 0.058847736567258835, + 0.3775934875011444, + -0.14750123023986816, + -0.019823770970106125, + -0.14805752038955688, + 0.0033334081526845694, + 0.06783727556467056, + 0.3646200895309448, + -0.3073735535144806, + -0.005107240751385689, + 0.06415027379989624, + -0.03208678215742111, + 0.0896400734782219, + 0.4646148979663849, + -0.4104118347167969, + 0.19407062232494354, + -0.12443545460700989, + 0.002648968482390046, + 0.06744951009750366, + 0.30176565051078796, + -0.2304145097732544, + 0.2695867121219635, + -0.19262073934078217, + 0.03706088289618492, + 0.3174671530723572, + -0.12330760061740875, + -0.10214212536811829 + ], + [ + -0.022502567619085312, + -0.3799973130226135, + 0.014478757977485657, + 0.18529044091701508, + -0.13154014945030212, + -0.12731364369392395, + 0.24624235928058624, + 1.092437505722046, + 0.4284019470214844, + -0.3693486452102661, + 0.025407670065760612, + -0.5756756067276001, + 0.07203837484121323, + -0.23858784139156342, + -0.3029121458530426, + -0.6749658584594727, + -0.3017691671848297, + -0.9123948216438293, + 0.007465270813554525, + 0.148410826921463, + -0.503353476524353, + -0.061574410647153854, + -1.2817975282669067, + -0.2872045338153839, + -1.0745604038238525, + -0.2641303241252899, + 0.40181732177734375, + 0.7165117859840393, + 0.09756284952163696, + -1.429378867149353, + 0.003533007111400366, + 0.08549229800701141 + ], + [ + -0.013682556338608265, + 0.37246173620224, + 0.06258662045001984, + 0.04116068407893181, + -0.0021210163831710815, + -0.04376533627510071, + -0.33057868480682373, + 0.5434480905532837, + 0.08022872358560562, + 0.16475491225719452, + -0.022593054920434952, + 0.1109907329082489, + 0.20510883629322052, + -0.008754418231546879, + -0.15994739532470703, + -0.5659238696098328, + -0.28494197130203247, + -0.571863055229187, + 0.27379360795021057, + -0.1822698712348938, + -0.50795578956604, + -0.07529393583536148, + -0.4820334315299988, + 0.017122715711593628, + -0.5626227259635925, + -0.2607761323451996, + 0.048133257776498795, + -0.5128642916679382, + 0.16955365240573883, + -0.575302004814148, + -0.07835711538791656, + 0.5951685309410095 + ], + [ + -0.08226504176855087, + 0.47344258427619934, + 0.02328505367040634, + -0.030543681234121323, + -0.02265353314578533, + -0.14772078394889832, + -0.17515519261360168, + -0.15349510312080383, + 0.08344254642724991, + -0.12745152413845062, + -0.04807217791676521, + 0.18605948984622955, + 0.1512538343667984, + -0.04151114448904991, + 0.09538104385137558, + -0.5043067932128906, + -0.02643544413149357, + -0.46834373474121094, + 0.3468303382396698, + 0.004004035610705614, + -0.4220770299434662, + 0.038778454065322876, + 0.016156937927007675, + -0.018880316987633705, + -0.3553681969642639, + -0.0803103968501091, + -0.22795231640338898, + -0.5076409578323364, + -0.07908182591199875, + -0.33922097086906433, + -0.26490119099617004, + 0.05650978535413742 + ], + [ + 0.09802880138158798, + 0.27810442447662354, + 0.02957029454410076, + 0.01145877968519926, + -0.01693027839064598, + -0.170567125082016, + -0.06840421259403229, + -0.0945669412612915, + 0.031600117683410645, + 0.07828302681446075, + -0.08180706948041916, + 0.36660656332969666, + 0.14680393040180206, + -0.027936385944485664, + 0.10192196071147919, + -0.2530248165130615, + -0.04828129708766937, + -0.37582042813301086, + 0.2552221119403839, + 0.16565904021263123, + -0.22276850044727325, + -0.12198073416948318, + -0.07946022599935532, + -0.2545432448387146, + -0.14065489172935486, + 0.05424186959862709, + -0.1933126002550125, + -0.49437007308006287, + 0.1054951623082161, + -0.1716962456703186, + -0.06872667372226715, + 0.251488596200943 + ], + [ + 0.042716387659311295, + 0.31972000002861023, + -0.010500585660338402, + -0.2671748697757721, + 0.03439102694392204, + -0.1448071002960205, + 0.07574623823165894, + -0.0386587418615818, + 0.27850911021232605, + 0.005499227438122034, + -0.06075119227170944, + 0.3770084083080292, + 0.19361630082130432, + -0.117194764316082, + 0.06701774895191193, + -0.19666139781475067, + -0.042083386331796646, + -0.35198548436164856, + 0.21252110600471497, + -0.052135124802589417, + -0.24764281511306763, + -0.1359873265028, + 0.08763523399829865, + 0.028500249609351158, + -0.19216541945934296, + -0.043621379882097244, + -0.32090267539024353, + -1.0384470224380493, + 0.08564361929893494, + -0.1050434559583664, + -0.13982775807380676, + -0.27040591835975647 + ], + [ + -0.1547738015651703, + 0.010156060568988323, + 0.025730807334184647, + -0.18915437161922455, + 0.04497160017490387, + -0.1833949238061905, + 0.3464733064174652, + 0.18731598556041718, + 0.20525187253952026, + -0.3639664053916931, + -0.08459082990884781, + 0.2601427435874939, + -0.1316128522157669, + -0.06030351668596268, + 0.03120589256286621, + 0.036628466099500656, + 0.06424691528081894, + 0.00354331498965621, + 0.16427737474441528, + 0.06946113705635071, + -0.01557729672640562, + -0.08808280527591705, + 0.00928956363350153, + -0.04818645492196083, + 0.1540774554014206, + -0.0539434589445591, + -0.15051674842834473, + -0.46083953976631165, + 0.14556056261062622, + 0.08693238347768784, + 0.06635166704654694, + 0.288321316242218 + ], + [ + 0.21069493889808655, + 0.3775405287742615, + 0.02781510539352894, + -0.15061214566230774, + 0.036228153854608536, + -0.06393110007047653, + 0.2870612144470215, + -0.24592220783233643, + 0.1634010225534439, + -0.19797903299331665, + -0.024444397538900375, + 0.12285908311605453, + -0.08909658342599869, + 0.10783249139785767, + -0.0034670308232307434, + -0.2731111943721771, + 0.0075285290367901325, + -0.13786768913269043, + 0.31370052695274353, + -0.35591286420822144, + -0.23767901957035065, + -0.057755593210458755, + 0.0024891456123441458, + -0.16962304711341858, + -0.01837261952459812, + -0.06682877987623215, + 0.11332356929779053, + -0.4132934808731079, + 0.11556407809257507, + -0.08507954329252243, + -0.32733064889907837, + 0.010065789334475994 + ] + ], + [ + [ + -0.18605123460292816, + 0.11739983409643173, + 0.05586269125342369, + -0.1525053232908249, + 0.03911933675408363, + -0.10893291234970093, + 0.3402596712112427, + 0.2954506278038025, + -0.377069354057312, + -0.19278830289840698, + -0.13508599996566772, + 0.1949634850025177, + 0.34523847699165344, + -0.24765416979789734, + 0.0005459623644128442, + 0.38576817512512207, + -0.006529714446514845, + 0.10977904498577118, + 0.3342397212982178, + -0.05794365704059601, + 0.4818582832813263, + -0.033771295100450516, + 0.49911755323410034, + -0.10129129886627197, + 0.12037386745214462, + 0.15710341930389404, + 0.5359261631965637, + -0.8134608268737793, + -0.2020881474018097, + 0.5905288457870483, + 0.02588370442390442, + -0.06120625510811806 + ], + [ + -0.14155341684818268, + -0.19374480843544006, + -0.223773792386055, + -0.3910347819328308, + -0.1515883058309555, + -0.19531217217445374, + 0.17938441038131714, + 0.9836187958717346, + 0.11785119026899338, + -0.3991227149963379, + -0.0061414530500769615, + -0.37866732478141785, + -0.0741126760840416, + -0.17509669065475464, + -0.6497463583946228, + -0.2112569659948349, + -0.1671578288078308, + -0.07656087726354599, + -0.33108946681022644, + -0.12559936940670013, + 0.4011346995830536, + 0.07961590588092804, + -1.0314326286315918, + -0.20486971735954285, + -1.165649652481079, + -0.10849560052156448, + 0.4967435896396637, + 0.05184348672628403, + 0.13053011894226074, + -0.7026184797286987, + -0.049826208502054214, + 0.4964008033275604 + ], + [ + -0.08895966410636902, + 0.11976306885480881, + -0.15883876383304596, + -0.3941223919391632, + -0.013609763234853745, + -0.1925201267004013, + -0.06455516070127487, + -0.05195235088467598, + 0.36853426694869995, + 0.2750532627105713, + 0.034973032772541046, + 0.17595553398132324, + -0.37064337730407715, + -0.2315579205751419, + -0.40490368008613586, + -0.45892101526260376, + -0.3543330729007721, + -0.13017813861370087, + -0.26918524503707886, + -0.050356876105070114, + 0.012799620628356934, + -0.04474528506398201, + -0.4468500018119812, + -0.059326380491256714, + -0.4762979745864868, + 0.0076547469943761826, + -0.09993913769721985, + -0.05269715189933777, + 0.3258320391178131, + -0.044682826846838, + -0.025637304410338402, + 0.12454556673765182 + ], + [ + -0.2910231649875641, + -0.00820113904774189, + -0.15722934901714325, + -0.23343400657176971, + -0.21504907310009003, + -0.07639383524656296, + 0.2466769963502884, + 0.2817111015319824, + 0.026309674605727196, + 0.10946693271398544, + 0.07965335249900818, + 0.04697227478027344, + -0.09442166984081268, + -0.346798300743103, + -0.26046454906463623, + -0.2677125632762909, + -0.2047855257987976, + -0.28626278042793274, + -0.23367901146411896, + -0.004334359895437956, + 0.050044916570186615, + 0.1356775164604187, + -0.23354335129261017, + 0.14692945778369904, + -0.38647177815437317, + 0.0908605232834816, + -0.17546023428440094, + -0.062431249767541885, + 0.005997927393764257, + 0.08385997265577316, + 0.0723731517791748, + 0.076249860227108 + ], + [ + -0.15532058477401733, + 0.07783746719360352, + -0.026132775470614433, + -0.35442042350769043, + -0.1767459660768509, + 0.03794235736131668, + 0.5910180807113647, + 0.09572941809892654, + 0.024622702971100807, + 0.12307054549455643, + 0.05102112889289856, + 0.007838956080377102, + 0.04435709863901138, + -0.39599502086639404, + -0.11485210061073303, + 0.009748689830303192, + -0.11458301544189453, + -0.11168165504932404, + -0.13311606645584106, + -0.1860145479440689, + 0.18216295540332794, + -0.011088608764111996, + -0.11642128229141235, + 0.07626084983348846, + -0.25643283128738403, + -0.10956339538097382, + -0.028293220326304436, + 0.045495081692934036, + 0.09061814844608307, + 0.142351433634758, + -0.03699753060936928, + 0.15781742334365845 + ], + [ + -0.19630606472492218, + -0.029060717672109604, + 0.01905205100774765, + -0.3468301296234131, + -0.015559244900941849, + -0.003851408837363124, + 0.33676034212112427, + -0.20477192103862762, + 0.12707500159740448, + 0.03135872259736061, + 0.04245160520076752, + -0.006606426555663347, + -0.11417613923549652, + -0.31113770604133606, + -0.11124864965677261, + -0.11994823813438416, + 0.08377886563539505, + -0.11686141788959503, + -0.1563534289598465, + -0.021299660205841064, + -0.041770853102207184, + 0.09161850810050964, + -0.11260680109262466, + -0.14646802842617035, + -0.33934304118156433, + -0.041638389229774475, + 0.09977477043867111, + 0.27113306522369385, + 0.1221589520573616, + -0.07131507247686386, + -0.04921165853738785, + -0.11478307098150253 + ], + [ + -0.08496753126382828, + 0.2197299748659134, + -0.0058780452236533165, + -0.10259278118610382, + 0.14255167543888092, + 0.023506231606006622, + 0.4519461393356323, + -0.32096409797668457, + -0.05761801451444626, + -0.22227703034877777, + -0.08117204904556274, + 0.24260008335113525, + 0.07173830270767212, + -0.14069518446922302, + -0.030554894357919693, + -0.11892729997634888, + -0.016068831086158752, + -0.18782036006450653, + -0.11972972750663757, + -0.3551541864871979, + 0.0010849792743101716, + -0.038821760565042496, + 0.016583306714892387, + 0.024776922538876534, + -0.26719075441360474, + 0.0029158717952668667, + -0.34605634212493896, + 0.19318978488445282, + 0.15093708038330078, + 0.10118932276964188, + -0.05608859285712242, + -0.06538078933954239 + ], + [ + -0.03474864736199379, + 0.24370679259300232, + -0.06378818303346634, + -0.0404290147125721, + -0.2842838764190674, + -0.009178698994219303, + 0.25901538133621216, + 0.08513029664754868, + 0.33120977878570557, + -0.16132278740406036, + -0.060041606426239014, + 0.07716406136751175, + 0.08822618424892426, + -0.16203051805496216, + 0.15926043689250946, + -0.2859940528869629, + -0.09214240312576294, + -0.0695091038942337, + 0.01800079643726349, + 0.19664987921714783, + -0.17581625282764435, + -0.11338654160499573, + -0.19712378084659576, + 0.0028066427912563086, + -0.2037237286567688, + 0.19516976177692413, + -0.40012964606285095, + -0.9559646844863892, + 0.08546072244644165, + -0.17629027366638184, + -0.03889702260494232, + 0.2418515682220459 + ] + ], + [ + [ + 0.12032230198383331, + 0.013065250590443611, + 0.12752984464168549, + -0.07687355577945709, + 0.050580453127622604, + -0.06263372302055359, + 0.2974441945552826, + -0.1913822591304779, + -0.3005852997303009, + -0.25267091393470764, + -0.03695594146847725, + -0.21138346195220947, + 0.2850322723388672, + -0.24092626571655273, + 0.015197086147964, + 0.2751503586769104, + 0.1513373851776123, + 0.08605948090553284, + 0.23217687010765076, + -0.2525770664215088, + 0.334405779838562, + -0.0411946140229702, + 0.016762059181928635, + 0.10989265143871307, + 0.08107607066631317, + 0.05664850026369095, + 0.12859439849853516, + -0.21693825721740723, + 0.11827380955219269, + 0.40185147523880005, + 0.000737464870326221, + -0.2750431299209595 + ], + [ + -0.06130131706595421, + -0.05091743543744087, + -0.1531989723443985, + 0.2821974456310272, + -0.24127693474292755, + -0.037970658391714096, + 0.4496169686317444, + 1.1373172998428345, + 0.5992786884307861, + -0.4296382963657379, + -0.05948203429579735, + -0.9739806056022644, + -0.5149722099304199, + 0.0920015275478363, + -0.3930518329143524, + -0.7643133997917175, + -0.36353442072868347, + -0.9364622235298157, + -0.7815986275672913, + -0.3364103436470032, + -0.29220283031463623, + -0.3335016667842865, + -1.6890398263931274, + 0.3614567816257477, + -0.8663331866264343, + -0.1773153692483902, + 0.19393514096736908, + 0.3984612822532654, + 0.4264069199562073, + -1.1584887504577637, + -0.2045130431652069, + 0.6417514085769653 + ], + [ + -0.1548616737127304, + 0.49504345655441284, + -0.049440667033195496, + -0.033372797071933746, + -0.2904796004295349, + 0.007262376602739096, + -0.5881791710853577, + 0.6216495037078857, + -0.0045819031074643135, + 0.24544177949428558, + -0.08410613238811493, + -0.16524344682693481, + -0.17749132215976715, + 0.408099889755249, + -0.46355506777763367, + -0.8520978093147278, + -0.09662514179944992, + -0.41523465514183044, + -0.1736365258693695, + -0.18461711704730988, + -0.415865957736969, + -0.08616755157709122, + -0.9101094603538513, + 0.4324384331703186, + -0.3805653154850006, + 0.16787102818489075, + -0.30729347467422485, + -0.24807782471179962, + 0.3254038691520691, + -0.23076952993869781, + -0.12113510072231293, + 0.5927037596702576 + ], + [ + -0.24020807445049286, + 0.2736341655254364, + -0.1011374369263649, + -0.08312955498695374, + 0.09364327043294907, + 0.02101838029921055, + -0.36471012234687805, + 0.25472497940063477, + 0.3525984585285187, + 0.0625881627202034, + -0.10157220810651779, + -0.13424862921237946, + -0.2882073223590851, + 0.4236393868923187, + -0.3569248616695404, + -0.5658575296401978, + -0.12343456596136093, + -0.36205652356147766, + -0.19078035652637482, + -0.1668127477169037, + -0.25640448927879333, + -0.04522630572319031, + -0.5605080127716064, + 0.03243792802095413, + -0.31260910630226135, + 0.0918007418513298, + -0.20608098804950714, + -0.3315582871437073, + 0.5010361075401306, + -0.13910861313343048, + -0.32718566060066223, + -0.2812751531600952 + ], + [ + -0.2960871458053589, + 0.20136402547359467, + 0.03444705158472061, + 0.0017662415048107505, + -0.027674652636051178, + 0.021399443969130516, + -0.40615570545196533, + -0.03125041350722313, + 0.09841649979352951, + -0.0763588696718216, + 0.015589933842420578, + -0.1544322520494461, + -0.30687475204467773, + 0.44404444098472595, + -0.11590741574764252, + -0.48005300760269165, + 0.23288658261299133, + -0.2843776345252991, + -0.003898805705830455, + -0.05664750561118126, + -0.13241349160671234, + -0.08027520775794983, + -0.3626725971698761, + 0.29015547037124634, + -0.14136762917041779, + 0.029761506244540215, + -0.09610302001237869, + -0.4377540349960327, + 0.16085058450698853, + -0.07196350395679474, + -0.11059610545635223, + 0.029181715101003647 + ], + [ + -0.07587147504091263, + 0.5751363039016724, + -0.05742675065994263, + 0.2693050503730774, + 0.08822890371084213, + -0.0057360525242984295, + -0.4613089859485626, + 0.026163948699831963, + -0.005501875653862953, + 0.07286220788955688, + -0.08094843477010727, + -0.028906602412462234, + -0.20255479216575623, + 0.4330625832080841, + -0.07771210372447968, + -0.3461516201496124, + -0.15813042223453522, + -0.19382354617118835, + -0.1161712035536766, + 0.053784243762493134, + -0.23769181966781616, + -0.13103018701076508, + -0.16893912851810455, + 0.09951672703027725, + -0.09229983389377594, + 0.06506495922803879, + -0.3144543766975403, + 0.08827842026948929, + 0.35228514671325684, + -0.1012420505285263, + -0.07657808065414429, + 0.23310592770576477 + ], + [ + -0.09603124111890793, + 0.4518109858036041, + -0.014988605864346027, + -0.03175123780965805, + 0.09352632611989975, + -0.13752037286758423, + -0.1908067762851715, + -0.03419505059719086, + 0.01590650901198387, + -0.044251780956983566, + -0.0837441235780716, + -0.14741112291812897, + -0.18113262951374054, + 0.2480458766222, + -0.11633697152137756, + -0.48468536138534546, + 0.11364537477493286, + -0.10570629686117172, + 0.010274759493768215, + -0.31010159850120544, + -0.20390400290489197, + -0.03764929622411728, + -0.26157817244529724, + 0.11477465182542801, + 0.005369789898395538, + 0.09862540662288666, + 0.11143352836370468, + -0.13725464046001434, + 0.08181245625019073, + -0.016917942091822624, + -0.3360675573348999, + 0.1740008294582367 + ], + [ + -0.1611892729997635, + 0.162135049700737, + -0.028105953708291054, + -0.25185316801071167, + -0.02111389860510826, + 0.017542289569973946, + 0.36085593700408936, + -0.10859667509794235, + 0.24312573671340942, + -0.15807275474071503, + -0.06079357862472534, + 0.05087890848517418, + -0.2526106834411621, + -0.04231014847755432, + -0.01040763221681118, + -0.14318402111530304, + 0.1686774641275406, + -0.2039654403924942, + 0.0907057598233223, + 0.2626534402370453, + 0.028325024992227554, + -0.013995477929711342, + -0.3018431067466736, + -0.16776089370250702, + -0.3818683922290802, + 0.20923824608325958, + -0.2687510848045349, + -0.14199304580688477, + 0.11078774183988571, + 0.02480337955057621, + -0.15040677785873413, + -0.07711506634950638 + ] + ], + [ + [ + -0.10963869094848633, + 0.01396549679338932, + 0.006351398304104805, + -0.13310623168945312, + -0.07966906577348709, + -0.06861972063779831, + 0.6662306785583496, + -0.06549125164747238, + 0.13311675190925598, + 0.17622010409832, + 0.0923064723610878, + 0.36890116333961487, + 0.2740646004676819, + -0.075152687728405, + -0.07239384949207306, + 0.04339810460805893, + 0.049556031823158264, + 0.023183548822999, + 0.6414496302604675, + -0.1474793404340744, + 0.0039022802375257015, + -0.08819551020860672, + 0.22860591113567352, + -0.036745306104421616, + 0.150071382522583, + -0.07951180636882782, + 0.12000011652708054, + -0.15472960472106934, + -0.056879304349422455, + 0.3065168261528015, + 0.10336397588253021, + 0.22763022780418396 + ], + [ + 0.06858190149068832, + -0.268001526594162, + 0.10577720403671265, + 0.5300593376159668, + -0.16277562081813812, + -0.14633235335350037, + 0.34024062752723694, + 0.672913134098053, + 0.45452865958213806, + -0.5045267939567566, + 0.0024824426509439945, + -0.2953639626502991, + -0.34422582387924194, + 0.24135494232177734, + -0.15139992535114288, + -0.16631750762462616, + -0.146169975399971, + -0.3423013687133789, + -0.8816781640052795, + 0.27303194999694824, + -0.4977717399597168, + -0.409960001707077, + -0.6506439447402954, + 0.5509560704231262, + -0.9138875007629395, + 0.0002619207079987973, + -0.0827883929014206, + 1.2183959484100342, + 0.3686019778251648, + -1.4259581565856934, + -0.3078993260860443, + 0.3975030183792114 + ], + [ + 0.24514029920101166, + 0.13086114823818207, + 0.06069979816675186, + 0.5347840189933777, + -0.23598258197307587, + -0.16329875588417053, + -0.8852187395095825, + 0.08319123834371567, + 0.0997975692152977, + 0.27715596556663513, + 0.02560489997267723, + -0.2575121521949768, + -0.37361523509025574, + 0.05857258662581444, + 0.08506428450345993, + -0.45584583282470703, + 0.07903332263231277, + -0.35220998525619507, + 0.21170459687709808, + 0.3283860683441162, + -0.45460769534111023, + -0.22871309518814087, + -0.13893088698387146, + 0.1977406144142151, + -0.7517579793930054, + -0.0741233080625534, + -0.5572832822799683, + -0.6520438194274902, + 0.3788811266422272, + -0.6866037845611572, + -0.12460516393184662, + 0.6071924567222595 + ], + [ + 0.13080726563930511, + 0.2705743610858917, + 0.12230049818754196, + 0.6753602623939514, + -0.3102819621562958, + -0.15881796181201935, + -0.6729056239128113, + 0.2818000316619873, + 0.2850337326526642, + -0.0700572282075882, + -0.11874202638864517, + -0.314498633146286, + -0.36602863669395447, + 0.3513075113296509, + 0.1796017289161682, + -0.35999056696891785, + 0.01051675621420145, + -0.19946235418319702, + 0.15670321881771088, + 0.11383389681577682, + -0.4767802357673645, + -0.037755709141492844, + 0.0021350602619349957, + 0.2564750611782074, + -0.37105587124824524, + 0.12387122958898544, + 0.027125444263219833, + -0.25869399309158325, + 0.41085880994796753, + -0.5173730254173279, + -0.05825566127896309, + -0.044659074395895004 + ], + [ + 0.13103623688220978, + 0.0514400489628315, + 0.09505796432495117, + 0.27628567814826965, + -0.13824839890003204, + -0.17226767539978027, + -0.38585567474365234, + -0.15684030950069427, + 0.08586953580379486, + -0.10090917348861694, + -0.036365918815135956, + -0.07563205063343048, + -0.1845574975013733, + 0.05797381326556206, + 0.010913686826825142, + -0.13317321240901947, + -0.029745176434516907, + -0.05814499780535698, + 0.17446759343147278, + 0.28393083810806274, + -0.3165554702281952, + 0.04344512149691582, + 0.17378166317939758, + -0.02410314232110977, + -0.004268135875463486, + -0.06901207566261292, + 0.08178813010454178, + -0.29917189478874207, + 0.5421503782272339, + -0.20252785086631775, + 0.03511355072259903, + 0.09191235899925232 + ], + [ + -0.19579248130321503, + 0.09037438780069351, + -0.05334984138607979, + 0.29415422677993774, + -0.20865392684936523, + -0.005476294085383415, + -0.3110634982585907, + 0.09254439920186996, + 0.10921569913625717, + -0.13584664463996887, + -0.10138717293739319, + -0.26525822281837463, + -0.1927466243505478, + 0.30781814455986023, + -0.13147760927677155, + -0.023379923775792122, + 0.22946393489837646, + -0.019885998219251633, + 0.04026765376329422, + 0.27874478697776794, + -0.18041375279426575, + -0.08370291441679001, + -0.02302468940615654, + 0.12272486835718155, + 0.07037805020809174, + -0.11036732792854309, + 0.25530070066452026, + -0.3853299021720886, + 0.2798207700252533, + 0.020777182653546333, + -0.1527324616909027, + -0.2216588258743286 + ], + [ + -0.1806962937116623, + 0.5052217245101929, + -0.04909288510680199, + 0.1004984900355339, + -0.07784369587898254, + -0.12430038303136826, + -0.044534437358379364, + 0.17571492493152618, + 0.13416743278503418, + -0.09532487392425537, + -0.027021531015634537, + 0.16900621354579926, + -0.20147040486335754, + 0.33566489815711975, + -0.009426111355423927, + 0.08531876653432846, + 0.09824929386377335, + -0.08551376312971115, + 0.16805003583431244, + 0.3058200478553772, + -0.31195276975631714, + 0.0482872799038887, + 0.16903111338615417, + 0.017846740782260895, + -0.09700009971857071, + 0.059826649725437164, + -0.14817887544631958, + -0.20170196890830994, + 0.2920738458633423, + -0.11366693675518036, + 0.10163288563489914, + 0.19782575964927673 + ], + [ + -0.08066987246274948, + 0.11024926602840424, + 0.0678630843758583, + 0.20057666301727295, + 0.08678722381591797, + -0.1482822448015213, + -0.2651008367538452, + -0.20166964828968048, + 0.10384856909513474, + -0.12155111879110336, + 0.07175661623477936, + -0.016095135360956192, + 0.011020783334970474, + 0.41908079385757446, + 0.09845248609781265, + -0.2800842523574829, + 0.11196138709783554, + 0.08798867464065552, + -0.01972333900630474, + -0.045045334845781326, + -0.2615768313407898, + 0.03148965165019035, + 0.15109752118587494, + 0.1248755007982254, + -0.070142962038517, + -0.05502995103597641, + -0.03330467268824577, + 0.22213412821292877, + 0.31435540318489075, + -0.20529884099960327, + -0.1363195925951004, + -0.04616208001971245 + ] + ], + [ + [ + -0.15522029995918274, + 0.14525572955608368, + -0.048701975494623184, + -0.2419920116662979, + 0.11578179895877838, + -0.02918826788663864, + 0.41177821159362793, + 0.1013314500451088, + -0.28776827454566956, + -0.16570332646369934, + 0.0344313308596611, + 0.269475519657135, + -0.11209665238857269, + -0.388430118560791, + 0.09064523875713348, + 0.4344412684440613, + 0.023057835176587105, + 0.2894280254840851, + 0.8105983734130859, + 0.10955885052680969, + 0.1437934935092926, + -0.0644819512963295, + -0.09407263249158859, + 0.01081524882465601, + -0.16649353504180908, + 0.02169632911682129, + -0.10669901967048645, + -0.46243786811828613, + -0.06400925666093826, + 0.45741602778434753, + -0.12969756126403809, + -0.31587961316108704 + ], + [ + 0.2310161590576172, + 0.1513911485671997, + -0.1525915265083313, + 0.07010916620492935, + -0.2706226110458374, + -0.056375354528427124, + 0.23115521669387817, + 0.735762894153595, + 0.10389408469200134, + -0.057095449417829514, + 0.10413786768913269, + 0.1952919065952301, + -0.5224527716636658, + -0.7331411838531494, + 0.2581283748149872, + 0.2576152980327606, + -0.30482837557792664, + 0.4209546446800232, + -0.9551002979278564, + 0.3839029371738434, + 0.0884646475315094, + -0.1911327838897705, + -0.1653972715139389, + -0.1057778149843216, + -0.3412792980670929, + -0.07738825678825378, + -0.1607174575328827, + -0.4477510154247284, + -0.026686057448387146, + -0.2688215672969818, + -0.16976667940616608, + 0.2426142394542694 + ], + [ + -0.11564157903194427, + 0.08146050572395325, + -0.044162504374980927, + 0.3418678045272827, + -0.17309454083442688, + -0.08297457545995712, + -0.4471215605735779, + -0.11962295323610306, + 0.3238963484764099, + 0.10388045758008957, + -0.030211009085178375, + 0.1704922914505005, + -0.38037875294685364, + -0.39982327818870544, + 0.28026625514030457, + 0.07205957919359207, + -0.23660171031951904, + 0.5913487672805786, + 0.0534408874809742, + -0.05378042906522751, + -0.20640210807323456, + -0.0898679569363594, + 0.3239456117153168, + -0.03441619873046875, + -0.1371658593416214, + -0.0330335795879364, + -0.16033734381198883, + -0.248163104057312, + 0.32018181681632996, + 0.0023370925337076187, + 0.024295397102832794, + 0.37708213925361633 + ], + [ + -0.09167583286762238, + -0.2286205142736435, + 0.013891136273741722, + 0.02823999524116516, + -0.2918164134025574, + 0.0036015422083437443, + 0.037132058292627335, + -0.10412953794002533, + 0.06021200120449066, + 0.13501079380512238, + -0.02347973734140396, + 0.0028234869241714478, + -0.30785053968429565, + -0.5104283690452576, + 0.17403441667556763, + 0.18982470035552979, + 0.10314636677503586, + 0.5480068325996399, + -0.22152499854564667, + 0.1505189687013626, + -0.041013386100530624, + -0.013330471701920033, + 0.19736842811107635, + -0.1860719919204712, + 0.08084568381309509, + 0.06829535216093063, + 0.2762707471847534, + -0.09565240889787674, + 0.2291594296693802, + 0.09286974370479584, + 0.037248395383358, + -0.2691025733947754 + ], + [ + 0.121305912733078, + 0.04695378243923187, + -0.02402561716735363, + 0.10849283635616302, + -0.14987102150917053, + -0.06926077604293823, + -0.05328619107604027, + -0.0022421961184591055, + 0.19420604407787323, + 0.16170334815979004, + -0.07530751824378967, + -0.23412451148033142, + -0.21630242466926575, + -0.13343945145606995, + 0.39397650957107544, + 0.385067880153656, + -0.16512146592140198, + 0.6379542946815491, + -0.09167581051588058, + -0.10673955082893372, + -0.1480279117822647, + -0.06966269016265869, + 0.2265280783176422, + 0.03420054912567139, + 0.07961857318878174, + 0.08605347573757172, + -0.2520245611667633, + 0.24459406733512878, + 0.1172320544719696, + 0.07307584583759308, + 0.24031303822994232, + 0.12776996195316315 + ], + [ + 0.2408185750246048, + 0.14767110347747803, + -0.012874491512775421, + 0.04851546511054039, + 0.03134090453386307, + 0.08992753177881241, + 0.2824068069458008, + -0.3923397362232208, + 0.08742185682058334, + -0.05591224506497383, + -0.028862349689006805, + -0.45367246866226196, + 0.04893018305301666, + -0.39136987924575806, + 0.18128176033496857, + 0.05215567350387573, + -0.10009770840406418, + 0.3572053015232086, + -0.208544060587883, + -0.09196128696203232, + 0.1685018390417099, + -0.06778997927904129, + 0.1520647406578064, + 0.06650543212890625, + 0.06193838268518448, + -0.09910833090543747, + 0.13432639837265015, + 0.4747888445854187, + 0.11700759083032608, + 0.08246634155511856, + 0.09387682378292084, + -0.15453428030014038 + ], + [ + 0.04149376228451729, + 0.08418284356594086, + 0.02521502785384655, + 0.12901747226715088, + -0.052177734673023224, + -0.03588453307747841, + 0.17664910852909088, + -0.3296016752719879, + -0.028861748054623604, + 0.13370881974697113, + 0.041424356400966644, + -0.21252360939979553, + -0.06339697539806366, + -0.2308209240436554, + 0.017751067876815796, + 0.09419068694114685, + 0.000689395354129374, + 0.42961323261260986, + -0.11830809712409973, + -0.24170850217342377, + -0.028695017099380493, + -0.052149899303913116, + 0.019938349723815918, + 0.07820472121238708, + 0.117585189640522, + -0.012605034746229649, + -0.031079962849617004, + 0.402763694524765, + 0.3229021728038788, + 0.08512917906045914, + -0.17632730305194855, + -0.17149485647678375 + ], + [ + -0.11428394168615341, + 0.28277161717414856, + 0.02848120778799057, + 0.17491692304611206, + 0.01928136684000492, + 0.06738340109586716, + -0.015375936403870583, + -0.0344187468290329, + -0.19040395319461823, + -0.3711230158805847, + -0.12858332693576813, + -0.2517153024673462, + 0.22246557474136353, + -0.04411255568265915, + -0.14632858335971832, + 0.13609157502651215, + 0.15789073705673218, + 0.08029817044734955, + -0.20524752140045166, + 0.3099493682384491, + 0.06402911990880966, + 0.04081747308373451, + 0.24348732829093933, + 0.08192925155162811, + 0.47054147720336914, + 0.005552643910050392, + -0.07621400058269501, + 0.5066249966621399, + 0.4109703004360199, + 0.06126030161976814, + -0.18827471137046814, + -0.16013994812965393 + ] + ] + ], + [ + [ + [ + 0.05618710815906525, + 0.014742618426680565, + 0.08161060512065887, + 0.24941712617874146, + -0.2026374340057373, + -0.12262936681509018, + -0.23106923699378967, + -0.08339240401983261, + -0.024148376658558846, + 0.14004549384117126, + 0.04115758091211319, + -0.39953044056892395, + 0.1621273159980774, + 0.4588371813297272, + -0.118478924036026, + 0.047532692551612854, + -0.029377752915024757, + 0.03422075882554054, + -0.3540397882461548, + 0.2625093162059784, + -0.15071487426757812, + 0.18052905797958374, + -0.1722453534603119, + -0.053645651787519455, + 0.0020375533495098352, + 0.009204947389662266, + 0.2177763432264328, + 0.17310069501399994, + 0.12912891805171967, + -0.06042107939720154, + 0.13731031119823456, + -0.27062079310417175 + ], + [ + 0.02295878157019615, + -0.44790324568748474, + -0.16937507688999176, + 0.31960466504096985, + -0.1634877622127533, + 0.02603898197412491, + 0.4822300970554352, + 0.3082602620124817, + -0.0233797337859869, + -0.2353743612766266, + 0.08727748692035675, + 0.12027788907289505, + 0.2713911235332489, + -0.2180953174829483, + 0.20745743811130524, + -0.44654691219329834, + -0.40183529257774353, + -0.5613242983818054, + 0.483064740896225, + 0.21047474443912506, + -0.3610187768936157, + 0.10901857912540436, + -0.19461500644683838, + -0.5574713349342346, + -0.3218102753162384, + -0.3876219391822815, + -0.032913874834775925, + -0.29552367329597473, + 0.22890564799308777, + -0.3549991548061371, + -0.223785400390625, + 0.22990548610687256 + ], + [ + -0.057321202009916306, + 0.13390900194644928, + -0.04663621261715889, + 0.021786658093333244, + 0.07985735684633255, + -0.040841445326805115, + 0.47903791069984436, + 0.34492820501327515, + 0.20337030291557312, + 0.12482786923646927, + -0.027179570868611336, + -0.05760405957698822, + 0.11388981342315674, + -0.515198290348053, + 0.21558338403701782, + 0.0839480608701706, + -0.2705117464065552, + 0.04700968787074089, + 0.3561597168445587, + -0.1093420684337616, + -0.30195197463035583, + -0.012714849784970284, + -0.12706606090068817, + -0.10964373499155045, + -0.058842048048973083, + -0.13339976966381073, + 0.0006926903733983636, + 0.36834049224853516, + -0.28436794877052307, + -0.10567167401313782, + 0.1385418027639389, + 0.22753559052944183 + ], + [ + -0.11593851447105408, + -0.2860642969608307, + 0.0651230737566948, + 0.028456397354602814, + 0.012279183603823185, + 0.030857563018798828, + 0.29234930872917175, + 0.11617198586463928, + -0.02304977737367153, + 0.14359457790851593, + -0.08329035341739655, + 0.12978971004486084, + 0.11805657297372818, + -0.2049829214811325, + -0.011209837161004543, + 0.11414430290460587, + -0.3274945020675659, + -0.1871969997882843, + 0.3304104208946228, + 0.25815606117248535, + -0.044937871396541595, + 0.03306027874350548, + 0.027001887559890747, + -0.25431734323501587, + 0.22827458381652832, + 0.06670690327882767, + 0.012925866059958935, + -0.4176064729690552, + 0.2068270742893219, + -0.020652128383517265, + 0.03784060478210449, + 0.2556353509426117 + ], + [ + -0.15306930243968964, + 0.09543973952531815, + 0.03490293025970459, + -0.11920275539159775, + 0.08105555176734924, + 0.0343380942940712, + 0.23957528173923492, + 0.11018899083137512, + -0.06275911629199982, + -0.03373870998620987, + 0.026398619636893272, + -0.005780048202723265, + 0.045261774212121964, + -0.18058985471725464, + 0.009626229293644428, + 0.14973828196525574, + -0.2520337402820587, + -0.074486143887043, + 0.2775489091873169, + 0.07796528935432434, + -0.3763485848903656, + 0.0908668115735054, + 0.2996059060096741, + -0.11312079429626465, + 0.2775276005268097, + 0.05677064508199692, + -0.19819442927837372, + -0.39602887630462646, + -0.005818302743136883, + 0.14206452667713165, + 0.11794886738061905, + -0.038719482719898224 + ], + [ + -0.06954924017190933, + -0.21995460987091064, + -0.0319267213344574, + 0.1454881876707077, + -0.17055393755435944, + 0.058908961713314056, + 0.3823865056037903, + 0.21508020162582397, + -0.021357186138629913, + -0.0159929022192955, + -0.011036688461899757, + 0.0377209410071373, + 0.1757315695285797, + -0.16022838652133942, + 0.062494467943906784, + -0.04606318846344948, + -0.22432896494865417, + -0.0077841682359576225, + 0.29029756784439087, + 0.1370837390422821, + -0.21806341409683228, + -0.15511241555213928, + -0.3122311532497406, + -0.27022022008895874, + 0.10008127242326736, + 0.08382752537727356, + -0.26991698145866394, + -0.721613883972168, + -0.058419499546289444, + 0.09714669734239578, + -0.015242043882608414, + 0.10857681185007095 + ], + [ + 0.08160270750522614, + 0.04224899038672447, + 0.042207684367895126, + 0.0953151136636734, + -0.11016616225242615, + 0.009339702315628529, + 0.3409062922000885, + -0.08013148605823517, + -0.12226229161024094, + 0.15922102332115173, + 0.06999826431274414, + -0.0026650000363588333, + 0.21156585216522217, + -0.004097582306712866, + 0.09360912442207336, + -0.05990602821111679, + -0.21353265643119812, + -0.0970572680234909, + 0.25824615359306335, + 0.08663678914308548, + -0.09541067481040955, + -0.08840994536876678, + 0.16691811382770538, + -0.0746266320347786, + 0.23518982529640198, + 0.005076142027974129, + 0.022857528179883957, + -0.4271358251571655, + 0.1846206784248352, + 0.16351275146007538, + 0.014971992932260036, + -0.0687781348824501 + ], + [ + -0.16466666758060455, + -0.14889462292194366, + -0.02575751021504402, + 0.1445641815662384, + 0.051800746470689774, + 0.049370795488357544, + 0.5182511210441589, + -0.03020973689854145, + 0.09208135306835175, + 0.05846567451953888, + 0.012347221374511719, + 0.12137185782194138, + 0.04212742671370506, + -0.27627959847450256, + -0.020932627841830254, + -0.02974984049797058, + -0.09215491265058517, + -0.23096926510334015, + 0.1352856606245041, + -0.4980470836162567, + -0.034078199416399, + 0.01104156393557787, + 0.07852305471897125, + -0.1504376083612442, + 0.12206463515758514, + -0.005363043863326311, + 0.18606334924697876, + 0.04606827348470688, + 0.11067815124988556, + 0.16268958151340485, + -0.16986492276191711, + -0.09959129244089127 + ] + ], + [ + [ + 0.11038229614496231, + 0.23469972610473633, + 0.0013567684218287468, + 0.21232733130455017, + -0.18186408281326294, + 0.1371629387140274, + -0.03953371196985245, + 0.1727396845817566, + -0.058657143265008926, + -0.39859136939048767, + -0.003843278856948018, + -0.20111626386642456, + 0.14332512021064758, + 0.18631646037101746, + 0.05056046321988106, + 0.009826398454606533, + 0.17126622796058655, + 0.11644414812326431, + -0.035054512321949005, + 0.1209537535905838, + 0.02943466603755951, + -0.023617777973413467, + -0.3883809745311737, + 0.068825863301754, + -0.3770301342010498, + -0.006897368934005499, + 0.1040172427892685, + 0.23688142001628876, + 0.21308569610118866, + -0.033904239535331726, + 0.18087483942508698, + 0.01494187954813242 + ], + [ + -0.3487277626991272, + -0.03466952219605446, + -0.18985438346862793, + -0.22934384644031525, + 0.017970040440559387, + -0.026277858763933182, + 0.049000900238752365, + 0.7392961978912354, + 0.7347911596298218, + -0.534899890422821, + 0.08316449820995331, + -0.40732643008232117, + 0.22212383151054382, + -0.5070199370384216, + -0.4238615036010742, + -0.42017245292663574, + -0.479999840259552, + -0.2248159646987915, + 0.1295083463191986, + 0.13110166788101196, + 0.008596968837082386, + 0.07620701938867569, + -0.7596149444580078, + -0.06902110576629639, + -0.6961783170700073, + -0.26065966486930847, + 0.225581094622612, + 0.5892044305801392, + 0.048487428575754166, + -0.7745305895805359, + -0.28635984659194946, + 0.8133048415184021 + ], + [ + -0.3076243996620178, + 0.11174389719963074, + -0.10658503323793411, + -0.15453343093395233, + -0.08196619898080826, + 0.16873303055763245, + 0.3243827521800995, + 0.2990114688873291, + 0.16968950629234314, + 0.14196008443832397, + 0.007899822667241096, + -0.43231531977653503, + -0.12941758334636688, + -0.39087262749671936, + -0.28226035833358765, + 0.2912120521068573, + -0.3955308794975281, + -0.04322029650211334, + 0.16795311868190765, + -0.15859079360961914, + -0.0127711221575737, + -0.022519700229167938, + -0.5283705592155457, + 0.21248865127563477, + -0.32199153304100037, + 0.0275728702545166, + 0.4289063811302185, + 0.08269382268190384, + 0.11162815243005753, + -0.5212677121162415, + -0.15510772168636322, + 0.305446594953537 + ], + [ + -0.03956734016537666, + 0.12565980851650238, + -0.07121805846691132, + -0.17451751232147217, + -0.1983986347913742, + 0.038582105189561844, + 0.4150651693344116, + 0.3202030062675476, + 0.20969781279563904, + -0.08547845482826233, + -0.040083982050418854, + -0.06788869202136993, + -0.2322598099708557, + -0.15134887397289276, + -0.1923501342535019, + 0.0564018078148365, + -0.003038455033674836, + -0.10204089432954788, + 0.12755241990089417, + -0.046919796615839005, + -0.1579822301864624, + 0.05917482450604439, + -0.505948543548584, + -0.0303952656686306, + -0.389944851398468, + 0.24850307404994965, + 0.08260957151651382, + -0.08696568757295609, + 0.2058102935552597, + -0.2339814007282257, + -0.16453421115875244, + 0.251152902841568 + ], + [ + -0.276606023311615, + -0.07547767460346222, + -0.04232488200068474, + -0.12131515145301819, + 0.08489348739385605, + -0.09545544534921646, + 0.37857043743133545, + 0.03857461363077164, + 0.32249411940574646, + 0.02466672472655773, + -0.012632947415113449, + -0.26537200808525085, + -0.27586671710014343, + -0.13788101077079773, + -0.24745842814445496, + 0.1599281132221222, + -0.3684237599372864, + -0.013804962858557701, + 0.08678814768791199, + -0.2311169058084488, + -0.22683532536029816, + -0.09876476973295212, + -0.11255563050508499, + -0.15861625969409943, + -0.23976865410804749, + 0.05930674821138382, + -0.07632430642843246, + -0.17713379859924316, + 0.167583629488945, + -0.262178510427475, + -0.21919168531894684, + 0.2840808928012848 + ], + [ + 0.02008093148469925, + -0.1710129827260971, + -0.10278470069169998, + 0.023775633424520493, + -0.2916693687438965, + 0.08742409944534302, + 0.1800025850534439, + 0.20395484566688538, + 0.26294776797294617, + 0.17517486214637756, + -0.03397725895047188, + -0.10495627671480179, + -0.4375390112400055, + 0.08998925238847733, + -0.25143271684646606, + -0.18675924837589264, + -0.016954315826296806, + -0.06725282222032547, + -0.022294335067272186, + -0.14795109629631042, + -0.042231835424900055, + -0.007685631979256868, + -0.10392385721206665, + 0.1405908167362213, + -0.37867271900177, + 0.1089153066277504, + -0.23034121096134186, + -0.29017174243927, + -0.016286250203847885, + -0.23944249749183655, + -0.09180551022291183, + 0.24119070172309875 + ], + [ + 0.002089473884552717, + -0.02264351397752762, + -0.06039208918809891, + -0.1421719491481781, + -0.1990894079208374, + 0.03286843001842499, + 0.21450093388557434, + -0.11461979895830154, + 0.3300413489341736, + 0.09199963510036469, + 0.004217677284032106, + -0.08019622415304184, + -0.16940632462501526, + -0.24722543358802795, + 0.0020360418129712343, + -0.05656198412179947, + 0.058692723512649536, + -0.0422261580824852, + 0.1011413186788559, + -0.16115702688694, + 0.03629511594772339, + 0.07239188998937607, + 0.06348738819360733, + -0.0688871517777443, + -0.017147013917565346, + -0.0019385628402233124, + 0.15734350681304932, + -0.4827706813812256, + 0.07977954298257828, + -0.0005073967622593045, + -0.14355304837226868, + 0.4165703356266022 + ], + [ + 0.03201448544859886, + -0.2545100450515747, + -0.07428832352161407, + -0.22834673523902893, + -0.07815517485141754, + 0.08297977596521378, + 0.15556548535823822, + 0.1586798131465912, + 0.17891645431518555, + -0.10573206841945648, + 0.055231913924217224, + -0.1269317865371704, + -0.11894815415143967, + 0.018188443034887314, + -0.11345478892326355, + -0.28281933069229126, + -0.24280695617198944, + -0.20244839787483215, + 0.21633663773536682, + 0.11456606537103653, + -0.25770631432533264, + -0.06718549877405167, + -0.06298644095659256, + -0.14829233288764954, + -0.052813366055488586, + 0.13417497277259827, + 0.10956938564777374, + -0.970233678817749, + -0.03659971430897713, + -0.047605182975530624, + 0.1203070729970932, + 0.034226879477500916 + ] + ], + [ + [ + 0.0014888126170262694, + 0.09941323101520538, + 0.05025782436132431, + 0.3089746832847595, + -0.010965579189360142, + -0.015273399651050568, + 0.21788974106311798, + -0.007592557463794947, + 0.01637805625796318, + -0.0829370766878128, + -0.1160246729850769, + -0.2870008051395416, + 0.2562498152256012, + 0.10308419913053513, + 0.06268415600061417, + -0.18416154384613037, + -0.0027219888288527727, + 0.08805465698242188, + -0.28983351588249207, + -0.13716842234134674, + -0.21528169512748718, + -0.0137243140488863, + -0.07526183128356934, + -0.1322629153728485, + -0.12759165465831757, + -0.07813521474599838, + 0.451229065656662, + 0.3382684886455536, + -0.2707102298736572, + 0.15963061153888702, + 0.2766605317592621, + 0.39709237217903137 + ], + [ + -0.03591116890311241, + 0.08800338953733444, + -0.23847296833992004, + -0.42863667011260986, + 0.2507750988006592, + -0.13577404618263245, + 0.23723174631595612, + 0.26103848218917847, + 0.3927045166492462, + -0.8256406784057617, + -0.04741542413830757, + 0.4490744173526764, + 0.09716543555259705, + 0.11444162577390671, + -0.20189030468463898, + -0.5269771814346313, + 0.09636779874563217, + -0.6760370135307312, + 0.9351149797439575, + -0.04598120227456093, + -0.387926310300827, + -0.21752090752124786, + -0.9219740629196167, + -0.21143962442874908, + -0.8334089517593384, + 0.005427941679954529, + -0.29939278960227966, + 0.9791685938835144, + 0.06225080043077469, + -0.635109007358551, + 0.038746386766433716, + 0.25958070158958435 + ], + [ + -0.15680892765522003, + -0.01816670037806034, + -0.0623992420732975, + -0.22157524526119232, + 0.1640087217092514, + -0.08959291875362396, + 0.4383052587509155, + -0.2448488026857376, + 0.3617546260356903, + -0.3160429000854492, + 0.10072017461061478, + 0.3927256762981415, + -0.3855833113193512, + 0.1373552680015564, + -0.09159179031848907, + 0.028691641986370087, + -0.05191386118531227, + -0.3965790569782257, + 0.1798325926065445, + -0.34369373321533203, + 0.10231759399175644, + 0.08637318760156631, + -0.5620458722114563, + 0.27868083119392395, + -0.36031374335289, + 0.05245880037546158, + -0.23084372282028198, + 0.36513230204582214, + -0.0020429505966603756, + -0.3831276595592499, + 0.14311839640140533, + 0.24046121537685394 + ], + [ + 0.03216347098350525, + 0.021368013694882393, + 0.012323960661888123, + -0.1631166934967041, + 0.09813076257705688, + -0.10749125480651855, + 0.3030565679073334, + 0.14321550726890564, + -0.04266679286956787, + -0.0417398065328598, + 0.0017723060445860028, + 0.21139030158519745, + -0.3532627820968628, + 0.11610377579927444, + -0.08375456184148788, + -0.004155078902840614, + -0.05883026123046875, + -0.3426551818847656, + 0.23244717717170715, + 0.033427126705646515, + -0.26837486028671265, + -0.04837961494922638, + -0.43198132514953613, + -0.11768216639757156, + -0.2919982671737671, + 0.1643252670764923, + -0.09689566493034363, + 0.043895963579416275, + 0.0406561978161335, + -0.37879031896591187, + -0.015223391354084015, + 0.34204912185668945 + ], + [ + 0.08946303278207779, + -0.021513869985938072, + -0.07711855322122574, + -0.14158034324645996, + -0.06610175967216492, + 0.044320449233055115, + -0.09589829295873642, + 0.031959522515535355, + 0.35787567496299744, + -0.07767336070537567, + -0.01946990191936493, + 0.4056803584098816, + -0.12129899114370346, + 0.30741527676582336, + -0.2788259983062744, + -0.009434198960661888, + -0.06897026300430298, + -0.18672072887420654, + 0.12695737183094025, + 0.012410114519298077, + -0.12013211101293564, + -0.0161605067551136, + -0.13954268395900726, + -0.018484776839613914, + -0.1950521469116211, + 0.08860577642917633, + -0.12306352704763412, + -0.379783034324646, + 0.1653977334499359, + -0.2119220793247223, + -0.030651021748781204, + 0.08797299116849899 + ], + [ + 0.06664231419563293, + -0.212351992726326, + -0.04872344061732292, + -0.15980315208435059, + 0.101871058344841, + -0.10658649355173111, + -0.16941741108894348, + -0.011730659753084183, + 0.004767062142491341, + -0.21128222346305847, + 0.0605681836605072, + 0.27719399333000183, + -0.09782913327217102, + 0.01237318105995655, + -0.13911905884742737, + 0.18894419074058533, + -0.10808057337999344, + -0.06590951234102249, + 0.14474669098854065, + 0.12879931926727295, + -0.23584629595279694, + -0.013558324426412582, + -0.1852128803730011, + 0.2941496968269348, + 0.006644833367317915, + -0.038042981177568436, + 0.12306424230337143, + -0.10958727449178696, + 0.2243364155292511, + 0.04377589747309685, + -0.014747611247003078, + 0.2950264811515808 + ], + [ + 0.075571209192276, + -0.021781256422400475, + 0.0714406743645668, + -0.16428078711032867, + 0.049929048866033554, + 0.12422499805688858, + -0.10810834914445877, + -0.11310413479804993, + 0.12373224645853043, + 0.08107759058475494, + 0.012324098497629166, + 0.17972980439662933, + -0.4210054278373718, + 0.11944692581892014, + -0.12779416143894196, + 0.07229633629322052, + -0.2208864837884903, + -0.12366579473018646, + 0.06097937375307083, + 0.35456207394599915, + -0.15234193205833435, + 0.057927899062633514, + -0.2436833530664444, + 0.015507221221923828, + -0.20653927326202393, + 0.09087104350328445, + -0.18091140687465668, + -0.12127195298671722, + 0.24806232750415802, + -0.1834123432636261, + 0.058253213763237, + 0.2159404158592224 + ], + [ + -0.015471096150577068, + -0.06852225959300995, + -0.16829662024974823, + 0.19682753086090088, + -0.13678570091724396, + -0.00640078354626894, + 0.18169398605823517, + 0.2520599365234375, + 0.3769625425338745, + -0.029883205890655518, + -0.06368209421634674, + 0.2952517569065094, + -0.45494019985198975, + 0.02759290114045143, + -0.06260386854410172, + 0.009218775667250156, + -0.28268468379974365, + 0.05692040175199509, + 0.09690944105386734, + 0.013953075744211674, + -0.4117162227630615, + -0.18567922711372375, + -0.13065709173679352, + -0.01634671539068222, + -0.28179681301116943, + 0.12000752985477448, + -0.39707309007644653, + -0.5099807977676392, + 0.1224963441491127, + -0.19843561947345734, + 0.11665673553943634, + 0.39624321460723877 + ] + ], + [ + [ + 0.2529001235961914, + -0.14984029531478882, + -0.008915399201214314, + 0.08978370577096939, + -0.15320773422718048, + 0.12116200476884842, + -0.034351248294115067, + -0.16427940130233765, + -0.055057644844055176, + -0.4565562307834625, + 0.04754174128174782, + -0.16606676578521729, + 0.03910689055919647, + -0.18196648359298706, + -0.009428711608052254, + -0.012939803302288055, + 0.15753427147865295, + -0.05449286848306656, + -0.18322676420211792, + 0.2933662235736847, + -0.0778035968542099, + -0.03221903741359711, + -0.2731773257255554, + -0.08333298563957214, + 0.07380363345146179, + -0.24547958374023438, + -0.19622820615768433, + 0.1790900081396103, + 0.07490827143192291, + -0.27675506472587585, + 0.029213232919573784, + -0.3904981017112732 + ], + [ + 0.11067550629377365, + -0.2438645213842392, + 0.045713696628808975, + -0.0984351634979248, + 0.252705454826355, + -0.07920299470424652, + 0.10276281088590622, + 0.26163598895072937, + 0.025986509397625923, + -0.28100743889808655, + 2.9890998121118173e-05, + -0.5323917865753174, + 0.22031673789024353, + 0.4131523072719574, + -0.030097946524620056, + -0.38608628511428833, + 0.26566368341445923, + -0.26641446352005005, + -0.5306909680366516, + -0.17850156128406525, + -0.20269092917442322, + -0.20321068167686462, + 0.42494630813598633, + 0.2906365990638733, + 0.4235316514968872, + -0.15886081755161285, + -0.1544882208108902, + -0.03324969485402107, + 0.28846052289009094, + -0.12308380752801895, + -0.298678457736969, + -0.5427786111831665 + ], + [ + -0.009767926298081875, + -0.25209569931030273, + 0.10935380309820175, + 0.0913584902882576, + 0.2855498194694519, + -0.06336914747953415, + -0.23433850705623627, + -0.2283344268798828, + 0.11025145649909973, + -0.42417219281196594, + 0.032476674765348434, + -0.3259270489215851, + -0.2468731552362442, + 0.16523081064224243, + -0.11125031113624573, + 0.18558688461780548, + 0.04354429244995117, + 0.2312915325164795, + -0.18301154673099518, + 0.36041122674942017, + 0.03505290672183037, + 0.12106224149465561, + 0.37312427163124084, + -0.07418409734964371, + 0.4702182710170746, + -0.2145678699016571, + -0.15412558615207672, + 0.6153035759925842, + -0.17973555624485016, + 0.0758664458990097, + 0.007673894986510277, + -0.13020466268062592 + ], + [ + -0.04987119138240814, + -0.24582518637180328, + 0.06452871859073639, + -0.04812224581837654, + 0.2834939956665039, + -0.021005704998970032, + -0.4918654263019562, + -0.1157083511352539, + -0.15325310826301575, + -0.1419564187526703, + 0.023868273943662643, + -0.05057079344987869, + -0.11700387299060822, + -0.13101370632648468, + -0.1450263261795044, + 0.24425972998142242, + -0.10506214201450348, + 0.057433515787124634, + -0.08352479338645935, + 0.2481752187013626, + -0.03205658122897148, + -0.10172934830188751, + 0.19399431347846985, + -0.04259907081723213, + 0.34257325530052185, + 0.0308684054762125, + -0.14111678302288055, + 0.20319871604442596, + 0.3516712188720703, + 0.08381558954715729, + 0.0676141083240509, + 0.25068551301956177 + ], + [ + 0.14774315059185028, + -0.12268801778554916, + -0.03157839551568031, + 0.079156294465065, + 0.04918449744582176, + 0.01856081187725067, + -0.3023219406604767, + 0.13525529205799103, + -0.045067768543958664, + -0.2711930572986603, + -0.12250111252069473, + -0.30906566977500916, + -0.1782984882593155, + 0.3109871447086334, + -0.15281325578689575, + 0.10075286775827408, + 0.1510602831840515, + 0.10796248912811279, + -0.07704947143793106, + 0.20950642228126526, + -0.13345161080360413, + 0.0035079692024737597, + 0.0418722964823246, + -0.06583095341920853, + 0.23563162982463837, + -0.03677667677402496, + 0.09561250358819962, + 0.1768677681684494, + 0.34054097533226013, + 0.08106201887130737, + 0.01957312598824501, + -0.02057858183979988 + ], + [ + 0.2042473703622818, + -0.04051496833562851, + 0.04751221463084221, + -0.07441355288028717, + 0.2051640748977661, + 0.015245628543198109, + -0.3984416425228119, + 0.18884624540805817, + 0.10234139859676361, + -0.1700032502412796, + -0.01575326733291149, + -0.009153525345027447, + -0.17561475932598114, + -0.06261410564184189, + -0.12658195197582245, + 0.05860790237784386, + 0.15018951892852783, + 0.18980197608470917, + -0.16309307515621185, + 0.15932561457157135, + 0.15987974405288696, + -0.029353713616728783, + 0.09539192169904709, + 0.011339697986841202, + 0.43775320053100586, + -0.15376274287700653, + -0.17022603750228882, + 0.7709530591964722, + 0.42167559266090393, + 0.060714758932590485, + 0.0715838372707367, + 0.02384505420923233 + ], + [ + -0.028310032561421394, + -0.3756102919578552, + 0.07099619507789612, + 0.062382668256759644, + 0.10432564467191696, + -0.1417359858751297, + -0.14749327301979065, + 0.0269527155905962, + 0.14353103935718536, + -0.05825190991163254, + 0.1250399649143219, + -0.18883980810642242, + -0.024539778009057045, + 0.3030798137187958, + 0.09264521300792694, + -0.12326698005199432, + -0.08788897842168808, + 0.17555329203605652, + 0.05062760412693024, + 0.09978032112121582, + -0.09199552237987518, + -0.04596409574151039, + -0.05190824717283249, + 0.024269262328743935, + 0.23029549419879913, + -0.09262162446975708, + -0.30028313398361206, + -0.14022232592105865, + 0.07982252538204193, + 0.13204000890254974, + 0.09254946559667587, + -0.02738766558468342 + ], + [ + 0.08747363835573196, + -0.24290016293525696, + 0.010025122202932835, + -0.038012467324733734, + 0.02805471420288086, + 0.09989643841981888, + -0.490162193775177, + -0.07885989546775818, + 0.16421689093112946, + -0.00710345758125186, + 0.025093208998441696, + -0.1771431267261505, + -0.031029148027300835, + 0.3236205577850342, + -0.23345211148262024, + -0.0035724295303225517, + -0.07251066714525223, + -0.023613883182406425, + 0.10980350524187088, + 0.07653970271348953, + -0.02330264076590538, + 0.03797293081879616, + -0.03822101652622223, + -0.025611894205212593, + 0.24029769003391266, + 0.05430206283926964, + 0.17291682958602905, + 0.4336904287338257, + 0.12955299019813538, + 0.13602297008037567, + -0.2614920139312744, + -0.12213940918445587 + ] + ], + [ + [ + 0.10758640617132187, + -0.1066097542643547, + -0.034547168761491776, + -0.07152900844812393, + -0.04713268578052521, + 0.09796339273452759, + -0.0407547689974308, + -0.11045531928539276, + 0.07695962488651276, + -0.028484491631388664, + -0.031915515661239624, + 0.2368079125881195, + 0.3572951555252075, + 0.41496458649635315, + 0.04922135919332504, + -0.14444568753242493, + -0.04209912568330765, + -0.20732524991035461, + -0.3224070966243744, + 0.3762803375720978, + -0.14413970708847046, + -0.023058254271745682, + 0.24399787187576294, + -0.24306581914424896, + 0.24853576719760895, + -0.11509696394205093, + 0.32137057185173035, + 0.5868581533432007, + 0.027875710278749466, + -0.0797942727804184, + 0.016625836491584778, + -0.09026090055704117 + ], + [ + -0.1264650672674179, + -0.2475736290216446, + -0.00451040081679821, + 0.44890937209129333, + -0.11235392093658447, + 0.021102141588926315, + 0.1518680453300476, + 0.21644151210784912, + -0.05397303029894829, + -0.25146734714508057, + 0.10938208550214767, + -0.36342328786849976, + 0.10774196684360504, + 0.21492783725261688, + -0.2738198935985565, + -0.2538232207298279, + -0.18781515955924988, + 0.18739613890647888, + -1.0177700519561768, + 0.12054305523633957, + -0.17507623136043549, + -0.027806375175714493, + 0.48409804701805115, + -0.03745982423424721, + 0.3969500660896301, + 0.10903672128915787, + 0.5370165705680847, + -0.12549559772014618, + 0.18765009939670563, + -0.14770792424678802, + -0.038979098200798035, + -0.4329484701156616 + ], + [ + 0.16781046986579895, + -0.17428506910800934, + 0.07534120976924896, + 0.04066381976008415, + 0.05172299966216087, + 0.03292765095829964, + -0.18131759762763977, + -0.03645344823598862, + -0.1315544694662094, + -0.06047938019037247, + -0.018408620730042458, + -0.2396673858165741, + 0.08979777246713638, + -0.022176504135131836, + -0.08563694357872009, + 0.1376412808895111, + -0.15659388899803162, + 0.29729029536247253, + -0.5016410946846008, + 0.13460448384284973, + 0.13829882442951202, + 0.11928513646125793, + 0.19491378962993622, + 0.04545734450221062, + 0.39069193601608276, + -0.05772941932082176, + 0.5487991571426392, + -0.3311261236667633, + -0.04821820184588432, + 0.17610545456409454, + 0.08445975929498672, + -0.26857125759124756 + ], + [ + -0.03648415952920914, + 0.03490525856614113, + 0.0025109238922595978, + 0.12471301853656769, + 0.22969068586826324, + -0.06982764601707458, + -0.29017725586891174, + -0.1199064627289772, + 0.08046868443489075, + 0.13838694989681244, + -0.014539075084030628, + -0.5154176354408264, + 0.019284222275018692, + -0.19954857230186462, + -0.11677432060241699, + 0.11342614889144897, + -0.22265073657035828, + 0.3207307457923889, + -0.38328129053115845, + -0.20174150168895721, + 0.11130379885435104, + 0.060675278306007385, + -0.018973251804709435, + -0.03245120495557785, + 0.3697308599948883, + -0.16486100852489471, + 0.36919111013412476, + 0.32777678966522217, + -0.06963923573493958, + 0.10788220912218094, + -0.024942707270383835, + -0.33215296268463135 + ], + [ + -0.23708805441856384, + -0.26384079456329346, + -0.011150405742228031, + 0.22418496012687683, + 0.1213463842868805, + 0.09467966109514236, + -0.2606104910373688, + -0.021988559514284134, + -0.21970561146736145, + 0.2538839876651764, + 0.061800118535757065, + -0.29742032289505005, + -0.16571423411369324, + -0.3661664128303528, + -0.1784290224313736, + 0.15041561424732208, + -0.020328883081674576, + 0.23529131710529327, + -0.27967166900634766, + -0.1919585019350052, + -0.03162036091089249, + 0.0987367108464241, + 0.015046295709908009, + -0.010358558036386967, + 0.455435574054718, + -0.13345517218112946, + 0.36925625801086426, + 0.3025376796722412, + -0.03958076611161232, + 0.25013235211372375, + -0.14700987935066223, + 0.3222046196460724 + ], + [ + 0.09509896486997604, + -0.2331826239824295, + -0.026236040517687798, + 0.4572395384311676, + -0.01944737695157528, + 0.09129352867603302, + -0.12107618898153305, + 0.06983094662427902, + -0.16156870126724243, + 0.250825434923172, + -0.04110603407025337, + -0.15009939670562744, + -0.10173831135034561, + -0.20600636303424835, + 0.13239365816116333, + 0.26721009612083435, + -0.13329114019870758, + -0.09893223643302917, + -0.10369456559419632, + -0.30164462327957153, + -0.17928358912467957, + 0.11710726469755173, + 0.1068180575966835, + -0.0445486381649971, + 0.14524146914482117, + -0.12924690544605255, + 0.4207090735435486, + 0.654988706111908, + 0.15838706493377686, + 0.12912674248218536, + -0.26582857966423035, + -0.049303557723760605 + ], + [ + 0.10997051000595093, + -0.24400639533996582, + -0.027082031592726707, + 0.21518683433532715, + -0.039645154029130936, + 0.08487781882286072, + -0.2142634391784668, + 0.0038130481261759996, + -0.04209204763174057, + 0.014901112765073776, + 0.045483045279979706, + -0.26693451404571533, + 0.025493590161204338, + -0.02487180195748806, + -0.026078613474965096, + 0.02983996458351612, + 0.007210391573607922, + -0.23262786865234375, + 0.02378525771200657, + -0.2254951149225235, + 0.09810619801282883, + -0.04030188173055649, + 0.18720386922359467, + -0.12485617399215698, + 0.2201305627822876, + -0.08005623519420624, + 0.22803528606891632, + 0.6161028146743774, + 0.051451049745082855, + 0.11932464689016342, + 0.0614798441529274, + 0.24684718251228333 + ], + [ + -0.17768467962741852, + -0.07364902645349503, + 0.04242340102791786, + 0.11184095591306686, + 0.077653668820858, + -0.14228802919387817, + -0.4172130823135376, + 0.06325268000364304, + -0.1330447643995285, + -0.04066029191017151, + -0.016797572374343872, + -0.42623427510261536, + -0.2621777355670929, + 0.22190336883068085, + -0.125748410820961, + -0.054081082344055176, + 0.06215369701385498, + 0.2560312747955322, + -0.21188268065452576, + 0.06295470148324966, + 0.014680630527436733, + 0.12847328186035156, + 0.02728288620710373, + -0.06984888762235641, + 0.30441948771476746, + -0.043865446001291275, + -0.19140693545341492, + 0.4496334195137024, + 0.3801708221435547, + 0.1382894665002823, + -0.11455588787794113, + 0.2567425072193146 + ] + ] + ], + [ + [ + [ + 0.13990843296051025, + -0.16603446006774902, + -0.029458340257406235, + 0.32391685247421265, + 0.22284366190433502, + 0.06877076625823975, + -0.28510957956314087, + -0.3687794804573059, + -0.20975518226623535, + 0.646129846572876, + 0.027947327122092247, + 0.4165104329586029, + 0.0986189991235733, + -0.06664925813674927, + 0.3107096254825592, + -0.09194434434175491, + 0.033104415982961655, + 0.041335005313158035, + -0.12599816918373108, + 0.029418498277664185, + -0.10179930925369263, + 0.2829092741012573, + -0.06344598531723022, + -0.16561567783355713, + -0.042938925325870514, + -0.09682425111532211, + 0.18277981877326965, + 0.6001458764076233, + -0.151955246925354, + -0.11969953775405884, + 0.11034200340509415, + 0.16196346282958984 + ], + [ + 0.17296811938285828, + 0.20956562459468842, + -0.37303653359413147, + 0.2120080590248108, + -0.24603399634361267, + 0.05638207495212555, + 0.20939257740974426, + 0.03214745968580246, + -0.33833637833595276, + 0.21143189072608948, + 0.018509328365325928, + 1.1182438135147095, + 0.40298891067504883, + -0.1789366602897644, + 0.4369707405567169, + -0.4769471287727356, + -0.21392187476158142, + 0.9221126437187195, + 0.5811058878898621, + -0.020044321194291115, + -0.3004109263420105, + -0.06372947990894318, + 0.22287791967391968, + -0.6086147427558899, + 0.17830149829387665, + 0.012513111345469952, + -0.1874048262834549, + -0.37595152854919434, + -0.2705613672733307, + 0.3404756188392639, + -0.35254061222076416, + -0.03150482103228569 + ], + [ + 0.24937357008457184, + -0.09110026061534882, + -0.0640563815832138, + 0.6097769141197205, + -0.16737568378448486, + 0.06816169619560242, + 0.22244541347026825, + -0.15189430117607117, + -0.013888640329241753, + 0.39591315388679504, + -0.09298226237297058, + 0.38431525230407715, + 0.5371072888374329, + 0.05686555802822113, + 0.44025352597236633, + 0.14519819617271423, + -0.05227727070450783, + 0.44747665524482727, + 0.3639891743659973, + 0.013464267365634441, + 0.06521619111299515, + 0.16149713099002838, + -0.010249205864965916, + -0.04487397521734238, + 0.050052709877491, + -0.1196225956082344, + -0.18663042783737183, + -0.30549344420433044, + -0.0799974650144577, + 0.24396976828575134, + 0.08012601733207703, + -0.8288331627845764 + ], + [ + -0.14549852907657623, + -0.37692657113075256, + -0.06006961315870285, + 0.3933120667934418, + -0.06623055785894394, + -0.09688296169042587, + 0.18265065550804138, + 0.009808721952140331, + -0.3845120966434479, + 0.27350670099258423, + 0.03534191474318504, + 0.2915570139884949, + 0.4012463390827179, + 0.065943144261837, + 0.12954875826835632, + 0.07467318326234818, + -0.06427927315235138, + 0.36325812339782715, + 0.16167762875556946, + -0.39990073442459106, + 0.0037284104619175196, + 0.21989518404006958, + -0.010846743360161781, + -0.4283963739871979, + 0.04615297541022301, + 0.10433976352214813, + 0.014746463857591152, + 0.29783281683921814, + -0.21050803363323212, + 0.3264945447444916, + 0.156197652220726, + -0.34520119428634644 + ], + [ + -0.035901136696338654, + -0.3811475336551666, + -0.07868453860282898, + 0.24959693849086761, + 0.06604736298322678, + -0.08736318349838257, + -0.05035490170121193, + -0.06485919654369354, + -0.2262091189622879, + 0.47954410314559937, + -0.023618323728442192, + 0.06625701487064362, + 0.2093934416770935, + -0.15241344273090363, + 0.1370580792427063, + -0.21775957942008972, + -0.07668839395046234, + 0.23210756480693817, + 0.11633448302745819, + 0.09890445321798325, + 0.14153894782066345, + -0.039744965732097626, + -0.20406682789325714, + -0.050474755465984344, + 0.051302116364240646, + -0.09583768248558044, + -0.2813621461391449, + 0.3283902406692505, + -0.03748178482055664, + 0.0710688978433609, + 0.2620144486427307, + -0.32586702704429626 + ], + [ + -0.07318082451820374, + 0.12223214656114578, + -0.04270673543214798, + 0.16611842811107635, + -0.12155959755182266, + 0.10095252841711044, + 0.2798100709915161, + -0.2485608458518982, + -0.09805099666118622, + 0.16900663077831268, + -0.08228272944688797, + 0.21120738983154297, + 0.2491137683391571, + -0.07225260138511658, + 0.16523006558418274, + -0.06644268333911896, + -0.18191012740135193, + 0.014562824741005898, + 0.15396101772785187, + -0.017260072752833366, + 0.00797137338668108, + -0.024585548788309097, + 0.016532907262444496, + -0.05696326121687889, + -0.04652181640267372, + -0.03240172192454338, + 0.4572070837020874, + 0.3329165279865265, + -0.05301506072282791, + 0.020762156695127487, + 0.0648508295416832, + -0.21480692923069 + ], + [ + 0.13815730810165405, + -0.43789929151535034, + -0.029938731342554092, + 0.05124734342098236, + 0.2541476786136627, + 0.06871429830789566, + 0.11815036833286285, + -0.2470780611038208, + -0.2929939925670624, + 0.03379863128066063, + 0.06680756062269211, + 0.23642443120479584, + 0.1729763001203537, + 0.022766247391700745, + 0.04434053972363472, + -0.011595615185797215, + 0.12361777573823929, + 0.0829310193657875, + -0.006236638408154249, + 0.012295197695493698, + 0.10879316180944443, + -0.03422463312745094, + 0.26946380734443665, + -0.11234935373067856, + 0.136173814535141, + 0.025468453764915466, + 0.06462110579013824, + 0.48533785343170166, + -0.14830011129379272, + 0.08138947933912277, + 0.18523016571998596, + -0.3956752121448517 + ], + [ + -0.10225557535886765, + -0.4099736213684082, + -0.0013623841805383563, + 0.048389747738838196, + 0.1409413367509842, + -0.1398897022008896, + 0.3489733636379242, + -0.3209477961063385, + -0.36610299348831177, + 0.059160515666007996, + 0.07161826640367508, + 0.2934921681880951, + 0.15205833315849304, + 0.24018631875514984, + 0.08203626424074173, + 0.09095987677574158, + -0.06756536662578583, + 0.35441574454307556, + 0.17752157151699066, + -0.20368614792823792, + 0.23299671709537506, + -0.027608266100287437, + 0.08642521500587463, + 0.10365531593561172, + 0.15836885571479797, + -0.13708649575710297, + -0.17649854719638824, + 0.40891364216804504, + 0.0993676483631134, + 0.09736160933971405, + 0.11317165195941925, + -0.22252312302589417 + ] + ], + [ + [ + 0.0033278660848736763, + 0.12011580914258957, + -0.08763009309768677, + -0.04978034272789955, + 0.055204976350069046, + -0.0025958744809031487, + -0.6965973973274231, + -0.3578717112541199, + 0.21549168229103088, + 0.4206133484840393, + -0.11019521951675415, + -0.00447456631809473, + 0.109644815325737, + 0.08189058303833008, + -0.04715937376022339, + -0.1758602410554886, + -0.11929281800985336, + -0.16828440129756927, + -0.20021358132362366, + -0.02227962017059326, + -0.19681395590305328, + -0.0676986426115036, + 0.1475769281387329, + -0.09603490680456161, + 0.03156639635562897, + 0.04375902935862541, + -0.292345255613327, + 0.1059068962931633, + -0.09080349653959274, + -0.21963192522525787, + -0.10553409159183502, + 0.018912464380264282 + ], + [ + 0.15270620584487915, + -0.24866490066051483, + -0.23374010622501373, + -0.014474626630544662, + -0.4158261716365814, + 0.1671232283115387, + -0.1061972826719284, + -0.18110071122646332, + 0.10310093313455582, + -0.3233785629272461, + 0.14617472887039185, + 0.05871963873505592, + 0.22174160182476044, + -0.11431774497032166, + 0.46707433462142944, + -0.27161601185798645, + -0.3265071213245392, + -0.4093521237373352, + 0.2093256562948227, + 0.3229571282863617, + -0.5388345122337341, + -0.1138942614197731, + -0.35616374015808105, + -0.20960545539855957, + -0.6728543043136597, + -0.05953926220536232, + -0.2878872752189636, + -0.21418067812919617, + -0.04485223442316055, + -0.9078348875045776, + -0.11830741167068481, + 0.4932243525981903 + ], + [ + -0.137464702129364, + -0.2612091898918152, + 0.06842838227748871, + -0.1420900672674179, + -0.26640555262565613, + 0.15458573400974274, + 0.06071013957262039, + 0.1557978391647339, + 0.34173640608787537, + 0.16412372887134552, + -0.005678538233041763, + -0.006598673295229673, + -0.1873921900987625, + 0.07848600298166275, + -0.012283426709473133, + -0.01596023701131344, + -0.05613531172275543, + -0.038903236389160156, + 0.1339721977710724, + 0.007664666511118412, + -0.1759381890296936, + 0.026997053995728493, + 0.05460529774427414, + 0.2687670886516571, + -0.5961458683013916, + -0.05479663982987404, + -0.15761929750442505, + -0.4037388265132904, + 0.09502650797367096, + -0.4616786241531372, + -0.18678323924541473, + 0.13679060339927673 + ], + [ + 0.04472925886511803, + 0.09540660679340363, + 0.05016350373625755, + -0.023638617247343063, + -0.401552677154541, + 0.06822983175516129, + 0.417092502117157, + -0.052857838571071625, + 0.3100595474243164, + 0.059128716588020325, + -0.003902732627466321, + -0.27066993713378906, + -0.017671028152108192, + -0.0892743468284607, + 0.09070975333452225, + -0.09079980105161667, + -0.35727792978286743, + -0.12701484560966492, + 0.4688652753829956, + -0.0193377323448658, + -0.26240530610084534, + 0.02857981063425541, + -0.03892165422439575, + -0.12440421432256699, + -0.4059055745601654, + 0.32413774728775024, + 0.2525023818016052, + -0.7266688346862793, + -0.13476097583770752, + -0.3808610737323761, + -0.2426530420780182, + 0.05643507093191147 + ], + [ + 0.008031873032450676, + -0.11921753734350204, + -0.04352014139294624, + -0.05185336247086525, + -0.40550073981285095, + 0.06949248164892197, + 0.36024874448776245, + -0.19374306499958038, + 0.1770574003458023, + 0.03997659310698509, + -0.017595531418919563, + -0.0411904938519001, + -0.07047993689775467, + 0.135053813457489, + -0.05948558449745178, + 0.05218632519245148, + -0.002515143482014537, + -0.1996205896139145, + 0.27307388186454773, + 0.03774888813495636, + -0.24301950633525848, + 0.0849563479423523, + 0.037715230137109756, + -0.16559472680091858, + -0.29601651430130005, + 0.018903443589806557, + 0.40785759687423706, + -0.24194161593914032, + -0.1372877061367035, + -0.05105876550078392, + -0.2484508901834488, + -0.07243049144744873 + ], + [ + 0.2041180282831192, + -0.14588724076747894, + -0.04140792787075043, + -0.05339909344911575, + 0.05060906335711479, + -0.005172134377062321, + 0.29112374782562256, + -0.06283735483884811, + 0.32517412304878235, + 0.0041630868799984455, + -0.05061502754688263, + -0.3321976661682129, + -0.21447913348674774, + -0.25624880194664, + 0.14208070933818817, + 0.10019708424806595, + -0.14735224843025208, + -0.026885759085416794, + 0.015199767425656319, + -0.20411445200443268, + -0.20251500606536865, + 0.0599774494767189, + -0.009313817135989666, + -0.22325751185417175, + -0.37945520877838135, + -0.09926851093769073, + -0.02788401022553444, + -0.4247887134552002, + -0.06653627753257751, + -0.2692055404186249, + -0.0663735643029213, + 0.20785830914974213 + ], + [ + -0.14251334965229034, + -0.01656835898756981, + 0.0020490027964115143, + -0.1065363734960556, + -0.1958310753107071, + -0.08119802922010422, + 0.3566097915172577, + 0.3162807822227478, + -0.09526165574789047, + 0.30695679783821106, + -0.03639897704124451, + -0.202446848154068, + -0.23924344778060913, + -0.19491919875144958, + -0.06868144869804382, + 0.09063016623258591, + -0.2441837042570114, + 0.07978865504264832, + 0.22479148209095, + -0.30851754546165466, + -0.11121612787246704, + 0.07842817157506943, + -0.23927995562553406, + -0.13152599334716797, + -0.26993972063064575, + -0.04005880653858185, + 0.03890283778309822, + 0.2340167611837387, + 0.06811206042766571, + -0.01386750303208828, + 0.09722571074962616, + 0.09690161794424057 + ], + [ + 0.11182501167058945, + -0.09293200820684433, + 0.005038785748183727, + 0.11418667435646057, + -0.24766959249973297, + 0.023312203586101532, + 0.28493231534957886, + -0.22338835895061493, + 0.13068421185016632, + 0.17511816322803497, + -0.06958970427513123, + 0.13333088159561157, + -0.08367723226547241, + -0.5370684266090393, + 0.14897212386131287, + -0.302157998085022, + -0.046852122992277145, + -0.11983384191989899, + 0.024704966694116592, + -0.07728137820959091, + -0.1031244769692421, + 0.017119083553552628, + 0.027816250920295715, + -0.0933525338768959, + -0.21504423022270203, + -0.06013945862650871, + 0.17268003523349762, + -0.6791911125183105, + 0.06003040820360184, + -0.07468819618225098, + 0.007816024124622345, + -0.21824093163013458 + ] + ], + [ + [ + 0.029195239767432213, + -0.2350163459777832, + -0.018235577270388603, + 0.056731659919023514, + 0.16609254479408264, + 0.10048788040876389, + -0.48700588941574097, + -0.3716243803501129, + 0.06817092001438141, + 0.25718629360198975, + -0.12235025316476822, + -0.05302664265036583, + -0.0033899375703185797, + 0.5994347333908081, + 0.005696080159395933, + 0.0030949977226555347, + 0.008905326016247272, + -0.11482711136341095, + -0.20246174931526184, + 0.04506148397922516, + 0.1470552235841751, + 0.1664588302373886, + 0.16492748260498047, + -0.07337204366922379, + 0.08716592937707901, + 0.07030224800109863, + -0.28305697441101074, + 0.05781641975045204, + 0.09362398833036423, + -0.4013492166996002, + -0.18658214807510376, + 0.22542467713356018 + ], + [ + 0.2428566962480545, + 0.0319037102162838, + -0.3337654173374176, + -0.2297404557466507, + -0.1421785205602646, + 0.10945544391870499, + -0.27871865034103394, + 0.1925830841064453, + -0.2207852005958557, + -0.10612450540065765, + -0.04259522259235382, + 1.8018375635147095, + 0.05108318477869034, + -0.350822389125824, + 0.3749508559703827, + -0.10733351111412048, + 0.27525779604911804, + 0.3589179813861847, + 0.9271144270896912, + 0.2270146906375885, + -0.34699055552482605, + -0.25929003953933716, + 0.2549799978733063, + -0.09452192485332489, + -0.34046974778175354, + -0.11386911571025848, + -0.8318452835083008, + -0.6819998621940613, + -0.2919938862323761, + -0.16486798226833344, + 0.10653267055749893, + -0.12350604683160782 + ], + [ + 0.043648798018693924, + 0.022231101989746094, + -0.0711451843380928, + -0.007128810044378042, + 0.11357326060533524, + 0.04205019399523735, + 0.5453894734382629, + 0.06643234938383102, + 0.06765421479940414, + -0.34158822894096375, + -0.04061922803521156, + 0.5791428685188293, + -0.13038364052772522, + -0.27869412302970886, + 0.4503949284553528, + 0.24633032083511353, + 0.03765139356255531, + 0.21190859377384186, + 0.30909544229507446, + -0.28711605072021484, + -0.23038800060749054, + -0.18473175168037415, + 0.3423629105091095, + 0.23607417941093445, + -0.2824151813983917, + -0.024334443733096123, + -0.2800808846950531, + -0.5341071486473083, + -0.47655776143074036, + -0.2101980745792389, + 0.06628517806529999, + -0.4764931797981262 + ], + [ + 0.02604709565639496, + -0.30473071336746216, + -0.09787827730178833, + -0.07956475764513016, + -0.006243294570595026, + 0.11447826772928238, + 0.45616868138313293, + -0.2255997657775879, + 0.15004774928092957, + -0.0047508953139185905, + -0.06014961004257202, + 0.5432338118553162, + 0.04190630838274956, + 0.064865842461586, + 0.04251528158783913, + 0.29173293709754944, + -0.1923958659172058, + -0.06520266085863113, + 0.03831111267209053, + -0.16712382435798645, + -0.24250619113445282, + -0.1099153533577919, + 0.4151211082935333, + -0.0851958841085434, + -0.19616954028606415, + 0.35036951303482056, + -0.46754857897758484, + -0.03774556145071983, + -0.21750880777835846, + -0.11924846470355988, + -0.021844759583473206, + -0.47471100091934204 + ], + [ + 0.18829993903636932, + -0.11388149857521057, + -0.07561702281236649, + -0.028629586100578308, + 0.17641688883304596, + 0.10877251625061035, + 0.35213416814804077, + -0.24397055804729462, + -0.17458274960517883, + -0.09929115325212479, + 0.09310638159513474, + 0.15124918520450592, + -0.2572510540485382, + -0.4227010905742645, + 0.18778328597545624, + 0.24645322561264038, + -0.014549064449965954, + -0.11107147485017776, + -0.03231094032526016, + -0.1569262593984604, + -0.20803788304328918, + -0.09287557005882263, + 0.14168858528137207, + 0.13861900568008423, + -0.23397031426429749, + 0.2242468297481537, + -0.3292693495750427, + 0.3114551305770874, + 0.029756981879472733, + -0.20619943737983704, + 0.21204395592212677, + -0.29911234974861145 + ], + [ + -0.07944826036691666, + -0.02725861966609955, + -0.0016047647222876549, + -0.04306129366159439, + 0.22247682511806488, + -0.0019070853013545275, + 0.13470123708248138, + -0.3165449798107147, + 0.06522860378026962, + -0.05488650128245354, + 0.07629188895225525, + 0.37064093351364136, + -0.1257496029138565, + -0.06051534041762352, + 0.17231571674346924, + 0.08322744816541672, + -0.006864510010927916, + -0.015757227316498756, + -0.03647872805595398, + -0.04207223281264305, + 0.009635319001972675, + -0.004377535544335842, + 0.3547567129135132, + 0.26432543992996216, + 0.07236974686384201, + 0.023555437102913857, + -0.4608323574066162, + 0.17533916234970093, + -0.1675371676683426, + -0.0585583820939064, + 0.049765992909669876, + -0.322380930185318 + ], + [ + -0.08195760101079941, + -0.1529020220041275, + 0.015624133870005608, + 0.09483330696821213, + -0.14515084028244019, + -0.06693942844867706, + 0.07391861826181412, + -0.2057441771030426, + 0.26196572184562683, + 0.08181632310152054, + 0.0587734691798687, + 0.343505322933197, + -0.23920972645282745, + -0.10627646744251251, + 0.1814487725496292, + 0.40692058205604553, + 0.010944191366434097, + -0.10249241441488266, + 0.008974921889603138, + -0.23678922653198242, + -0.22710329294204712, + -0.09467151761054993, + 0.40969526767730713, + 0.27401211857795715, + -0.17258836328983307, + 0.17567376792430878, + 0.08255106955766678, + -0.5547881722450256, + -0.16680291295051575, + -0.22977215051651, + -0.1312180459499359, + -0.12610694766044617 + ], + [ + 0.18753349781036377, + -0.08869149535894394, + -0.09552310407161713, + 0.11321202665567398, + -0.0378742590546608, + -0.01431140024214983, + 0.37436965107917786, + 0.15319469571113586, + -0.11310172080993652, + 0.13953888416290283, + 0.015315519645810127, + -0.11373379826545715, + -0.21864140033721924, + -0.20804233849048615, + 0.23802751302719116, + 0.18060944974422455, + -0.17200806736946106, + -0.28349992632865906, + 0.10051938146352768, + -0.21133635938167572, + -0.12256352603435516, + 0.0652894452214241, + 0.08509358763694763, + -0.04862962290644646, + 0.0066766622476279736, + 0.05673383176326752, + 0.0799979567527771, + 0.09327559918165207, + 0.16082467138767242, + -0.19250190258026123, + -0.178436741232872, + -0.24168114364147186 + ] + ], + [ + [ + 0.30670368671417236, + -0.3759997487068176, + 0.03066113591194153, + 0.21624110639095306, + 0.1176081970334053, + -0.06785210967063904, + -0.5802224278450012, + -0.06458081305027008, + 0.13061335682868958, + 0.3433685302734375, + -0.06039655581116676, + 0.24697722494602203, + -0.1390620321035385, + 0.3167809545993805, + -0.039082013070583344, + -0.027363166213035583, + 0.07923128455877304, + -0.15907208621501923, + -0.3329041600227356, + 0.08547677099704742, + 0.031120413914322853, + 0.1861925721168518, + 0.279743492603302, + -0.11389197409152985, + 0.24751339852809906, + -0.08336135745048523, + 0.2990586757659912, + 0.20894968509674072, + 0.24882930517196655, + 0.0054617151618003845, + -0.07662498205900192, + -0.12709417939186096 + ], + [ + -0.2303892821073532, + 0.09070535749197006, + -0.0009211364085786045, + -0.7183072566986084, + 0.39319151639938354, + 0.09837675094604492, + -0.12541866302490234, + -0.4064134955406189, + -0.5905455946922302, + 0.35719114542007446, + -0.07510707527399063, + 1.3098602294921875, + 0.08412284404039383, + -0.12170594930648804, + -0.36424216628074646, + -0.39490750432014465, + 0.47344809770584106, + 0.5538473725318909, + 0.4408288300037384, + -0.154671773314476, + 0.0408182255923748, + -9.017964475788176e-05, + 0.8742865324020386, + 0.33373743295669556, + 0.29476651549339294, + -0.006123809609562159, + -0.11888642609119415, + -0.8428882360458374, + 0.1020166277885437, + 0.6465941667556763, + -0.3332286477088928, + -0.7446061968803406 + ], + [ + -0.024740809574723244, + -0.22530828416347504, + 0.06554795056581497, + -0.2811891436576843, + 0.38314178586006165, + 0.0764741450548172, + -0.10634259134531021, + -0.024726979434490204, + -0.3329421877861023, + 0.00021766024292446673, + 0.09068460762500763, + 0.22900766134262085, + 0.14992138743400574, + 0.11447077989578247, + -0.29132288694381714, + -0.027856895700097084, + 0.158420592546463, + 0.25266748666763306, + -0.16421040892601013, + 0.10907779633998871, + 0.20073698461055756, + 0.08518533408641815, + 0.2429226189851761, + 0.01838613487780094, + 0.29791173338890076, + -0.007441937457770109, + -0.294171005487442, + 0.12365972250699997, + 0.06498461216688156, + 0.33211034536361694, + 0.07467753440141678, + -0.4994457960128784 + ], + [ + 0.2030831277370453, + 0.013583279214799404, + 0.13773906230926514, + -0.1280762255191803, + 0.1626998335123062, + -0.06875865906476974, + -0.22269922494888306, + -0.030548250302672386, + -0.2047915905714035, + -0.2459034025669098, + 0.06482002139091492, + 0.22372211515903473, + 0.3928837180137634, + 0.00587328989058733, + -0.02941030263900757, + 0.07918617874383926, + 0.06396358460187912, + 0.12272000312805176, + -0.16816121339797974, + 0.20903301239013672, + 0.032122284173965454, + -0.04932351037859917, + 0.32887592911720276, + 0.26827555894851685, + 0.23950962722301483, + -0.0721241757273674, + -0.13646364212036133, + 0.7328242659568787, + -0.224042147397995, + 0.0938066765666008, + -0.048937469720840454, + -0.2612192928791046 + ], + [ + 0.21349740028381348, + -0.21110408008098602, + 0.12177273631095886, + -0.014619707129895687, + 0.14462797343730927, + -0.014606024138629436, + -0.18122701346874237, + -0.14179429411888123, + -0.24041317403316498, + 0.07854601740837097, + 0.015353660099208355, + 0.248647540807724, + 0.3431304395198822, + -0.2519536316394806, + -0.06003564968705177, + 0.31365591287612915, + 0.07055758684873581, + 0.10696885734796524, + -0.07574553042650223, + 0.20162789523601532, + 0.22474181652069092, + 0.23035159707069397, + 0.22683440148830414, + 0.04635833576321602, + 0.20975244045257568, + -0.20755332708358765, + -0.1518123894929886, + 0.7146691083908081, + -0.11218785494565964, + 0.11674706637859344, + -0.01864267699420452, + -0.6935837268829346 + ], + [ + -0.05972188711166382, + -0.21767748892307281, + 0.08580240607261658, + -0.17776374518871307, + 0.14253807067871094, + -0.007191624492406845, + -0.19553707540035248, + -0.33324775099754333, + -0.28077441453933716, + 0.04179739952087402, + 0.07633712887763977, + 0.08482418954372406, + 0.17240746319293976, + 0.2889474332332611, + -0.11892922222614288, + -0.08732090145349503, + 0.22182680666446686, + -0.008336669765412807, + -0.06676257401704788, + 0.07410957664251328, + -0.06008773297071457, + 0.18604719638824463, + 0.3655361533164978, + -0.003071705810725689, + 0.06322585791349411, + 0.013291491195559502, + -0.1926327496767044, + -0.165904700756073, + 0.16323496401309967, + -0.038504596799612045, + 0.018434442579746246, + -0.36313727498054504 + ], + [ + -0.0046124933287501335, + -0.20889729261398315, + -0.05160985887050629, + 0.05644628778100014, + 0.0037938060704618692, + 0.015730226412415504, + -0.023478295654058456, + -0.19226957857608795, + -0.1708337664604187, + -0.10694121569395065, + -0.03979530930519104, + -0.008107002824544907, + -0.16820357739925385, + -0.20472173392772675, + -0.03549210727214813, + -0.0027272170409560204, + 0.16327813267707825, + -0.005503588356077671, + -0.07021263241767883, + 0.38444891571998596, + 0.10602610558271408, + 0.025376077741384506, + 0.34485524892807007, + 0.07765895128250122, + 0.1890965700149536, + 0.10256603360176086, + -0.3924614489078522, + 0.6062885522842407, + -0.03942011296749115, + -0.003933690022677183, + 0.12744559347629547, + -0.5080903768539429 + ], + [ + 0.1353752762079239, + -0.0793192908167839, + -0.010276056826114655, + -0.09024874866008759, + 0.11006076633930206, + -0.04630637541413307, + -0.32409805059432983, + -0.20187988877296448, + -0.10830337554216385, + -0.07514338195323944, + -0.03966401889920235, + 0.3796505033969879, + 0.11841608583927155, + -0.27100738883018494, + 0.16662032902240753, + 0.2728138267993927, + 0.024808362126350403, + 0.13438469171524048, + -0.18725454807281494, + -0.06834891438484192, + 0.05653739348053932, + 0.18347185850143433, + 0.24668866395950317, + 0.2643004357814789, + 0.15603311359882355, + -0.06715074181556702, + 0.051660459488630295, + 0.1887359917163849, + -0.26494941115379333, + 0.06054963544011116, + 0.018575279042124748, + -0.278828501701355 + ] + ], + [ + [ + 0.14387039840221405, + -0.1992550790309906, + -0.06001484766602516, + 0.280141681432724, + -0.07323245704174042, + -0.06415276229381561, + -0.3279683291912079, + -0.17802831530570984, + 0.15102094411849976, + 0.3202308118343353, + 0.03107699565589428, + -0.2556663453578949, + 0.0214626956731081, + -0.040254224091768265, + 0.1834298074245453, + -0.0819639265537262, + 0.1304350197315216, + -0.10625983774662018, + -0.31660300493240356, + -0.1391557902097702, + 0.3061111867427826, + 0.021518878638744354, + -0.19998110830783844, + 0.24930927157402039, + 0.14388881623744965, + 0.2056519240140915, + -0.06244711950421333, + 0.19454535841941833, + -0.21433933079242706, + -0.1532827615737915, + -0.07764808088541031, + -0.42415186762809753 + ], + [ + -0.3851286768913269, + 0.20741355419158936, + -0.022246714681386948, + -0.250749796628952, + 0.412179172039032, + 0.32986214756965637, + -0.9810655117034912, + -0.1996615082025528, + -0.1541159451007843, + 0.3569817543029785, + -0.016356294974684715, + -0.4542996883392334, + 0.22198431193828583, + 0.4976895749568939, + -0.26415881514549255, + -0.041999369859695435, + -0.00627802824601531, + 0.4301114082336426, + -0.6683260202407837, + -0.010216601192951202, + -0.1646524965763092, + -0.0015242183580994606, + -0.002550938632339239, + -0.05587681755423546, + 0.13554736971855164, + 0.06766516715288162, + 0.3166961669921875, + -0.5503972172737122, + -0.1503661572933197, + 0.42210304737091064, + -0.5721291899681091, + -0.6603180766105652 + ], + [ + 0.04013437405228615, + -0.14869125187397003, + 0.10552678257226944, + -0.10188091546297073, + 0.04381682351231575, + 0.0926082581281662, + -0.6579253673553467, + 0.17065352201461792, + 0.0770612582564354, + -0.05656593292951584, + 0.07616668939590454, + -0.4010752737522125, + 0.11357571929693222, + -0.2331959754228592, + -0.10165634006261826, + 0.17840681970119476, + 0.02369847148656845, + -0.07425134629011154, + -0.3895520567893982, + -0.01924068294465542, + -0.031110119074583054, + 0.27002304792404175, + -0.2777494192123413, + -0.14802174270153046, + 0.1677461564540863, + 0.1367250382900238, + 0.2690589129924774, + 0.0401017852127552, + -0.290983647108078, + 0.18607592582702637, + -0.10307320952415466, + -0.7499489784240723 + ], + [ + 0.0694640576839447, + -0.063662588596344, + 0.03554651886224747, + -0.18755891919136047, + 0.08760815113782883, + 0.114765964448452, + -0.5214653015136719, + 0.0571192167699337, + -0.08095400035381317, + -0.08343566954135895, + 0.08042934536933899, + -0.0629797875881195, + 0.07968239486217499, + 0.3177703619003296, + -0.3109084367752075, + 0.25372156500816345, + 0.14856016635894775, + 0.04633447155356407, + -0.1531716138124466, + -0.000564651854801923, + -0.07462530583143234, + 0.20148707926273346, + 0.1305159628391266, + -0.029584191739559174, + 0.05658057704567909, + -0.15337957441806793, + 0.04806900769472122, + -0.07239856570959091, + 0.14967885613441467, + 0.11016056686639786, + -0.3398953974246979, + -0.11027693748474121 + ], + [ + -0.09870871156454086, + 0.16358113288879395, + 0.025784162804484367, + -0.06789737194776535, + -0.08851974457502365, + 0.09129858016967773, + -0.34513410925865173, + -0.2925410270690918, + -0.08386219292879105, + 0.11382218450307846, + -0.014649411663413048, + 0.15440315008163452, + -0.013798448257148266, + 0.2961573004722595, + 0.008001461625099182, + -0.009658209048211575, + 0.20956413447856903, + 0.10182516276836395, + -0.06760881096124649, + 0.2496936023235321, + 0.005820685997605324, + 0.2580016851425171, + 0.15256746113300323, + -0.024314628913998604, + -0.13873283565044403, + 0.015904655680060387, + 0.2028484046459198, + -0.1949644535779953, + 0.05081550404429436, + -0.027211511507630348, + -0.3091191053390503, + -0.4362914264202118 + ], + [ + -0.05161524936556816, + 0.2580585181713104, + 0.047352977097034454, + -0.036912932991981506, + 0.07293321937322617, + 0.05874193087220192, + -0.5852078795433044, + 0.11741170287132263, + -0.1375768482685089, + 0.14358673989772797, + -0.07549656927585602, + -0.028381390497088432, + 0.18881277740001678, + 0.11338365823030472, + -0.20731684565544128, + 0.1053382158279419, + -0.128074049949646, + 0.20297706127166748, + 0.07746200263500214, + 0.19949813187122345, + -0.0634765550494194, + 0.12969401478767395, + 0.10334251075983047, + -0.030837856233119965, + -0.1278436779975891, + 0.013669418171048164, + 0.37914931774139404, + -0.5544689297676086, + -0.28662994503974915, + 0.018947064876556396, + -0.20250144600868225, + -0.16398443281650543 + ], + [ + 0.028214948251843452, + -0.024129671975970268, + -0.05388138070702553, + 0.11127995699644089, + 0.09398937970399857, + 0.09533551335334778, + -0.010188226588070393, + -0.06947676837444305, + -0.12465008348226547, + 0.2825733423233032, + -0.07442492246627808, + 0.17493127286434174, + 0.01807701773941517, + -0.039777446538209915, + 0.19072318077087402, + 0.3086857199668884, + 0.017522668465971947, + -0.043597444891929626, + 0.005979732144623995, + 0.07541722059249878, + -0.17625316977500916, + 0.09037709981203079, + -0.09531217813491821, + 0.047704581171274185, + -0.13278689980506897, + -0.16990098357200623, + 0.24349573254585266, + -0.14383047819137573, + 0.15557105839252472, + 0.15803973376750946, + 0.007203086744993925, + -0.010332885198295116 + ], + [ + 0.10673892498016357, + -0.24601075053215027, + 0.05619770288467407, + -0.1285020262002945, + 0.017790423706173897, + 0.03461308404803276, + -0.18521685898303986, + 0.2129679173231125, + -0.21285280585289001, + 0.29897668957710266, + -0.0740969255566597, + -0.10113254934549332, + -0.14737297594547272, + 0.10684303194284439, + -0.37205904722213745, + 0.005199951585382223, + 0.032168518751859665, + 0.28121429681777954, + -0.03828441724181175, + 0.3391612768173218, + -0.06317013502120972, + 0.07530516386032104, + 0.12446839362382889, + 0.14087866246700287, + -0.17895877361297607, + 0.1367444097995758, + -0.10331624001264572, + 0.05859815329313278, + -0.03336004167795181, + -0.06944300979375839, + -0.16787545382976532, + -0.5554865598678589 + ] + ] + ], + [ + [ + [ + 0.12989675998687744, + -0.04517862945795059, + 0.032918717712163925, + -0.12533476948738098, + -0.23309019207954407, + 0.0050028301775455475, + -0.2160588949918747, + -0.11831840127706528, + 0.11981314420700073, + -0.05711368843913078, + 0.12597134709358215, + -0.15134382247924805, + -0.24477985501289368, + -0.2289140373468399, + 0.17078955471515656, + -0.23457756638526917, + -0.33866995573043823, + -0.16250382363796234, + -0.40120962262153625, + -0.10265209525823593, + 0.04174662008881569, + 0.1654457002878189, + 0.2614818513393402, + -0.045516237616539, + 0.026618409901857376, + -0.0697396919131279, + -0.335953950881958, + -0.021586284041404724, + -0.08244685083627701, + -0.22594280540943146, + 0.03977235034108162, + -0.313544362783432 + ], + [ + 0.34076815843582153, + 0.23794199526309967, + -0.4579889476299286, + 0.19226518273353577, + -0.19747042655944824, + 0.24392040073871613, + -0.023128343746066093, + -0.1996755301952362, + -0.359723836183548, + 0.3094015121459961, + 0.2620558738708496, + 0.47444239258766174, + -0.11174119263887405, + -0.16635413467884064, + 0.5356983542442322, + 0.9394509792327881, + 0.08559046685695648, + 1.742148756980896, + 0.42305099964141846, + 0.4233430325984955, + 0.7317370772361755, + -0.17882923781871796, + 0.14277830719947815, + -0.4213402569293976, + 0.6366060376167297, + -0.23001334071159363, + -0.6178585886955261, + -0.9624831676483154, + -0.24280805885791779, + 1.0356206893920898, + 0.0261879563331604, + 0.05186522379517555 + ], + [ + 0.16007357835769653, + 0.0477144755423069, + 0.012606780976057053, + 0.3304745554924011, + 0.12810423970222473, + 0.046889662742614746, + 0.1309240758419037, + -0.5366519093513489, + -0.5572762489318848, + -0.12124534696340561, + 0.08674681186676025, + 0.06955204159021378, + 0.13772863149642944, + -0.12800627946853638, + 0.6063936948776245, + 0.040582261979579926, + -0.00018557810108177364, + 0.7177356481552124, + 0.098317950963974, + 0.20989084243774414, + 0.31224584579467773, + -0.1262890249490738, + 0.030209973454475403, + -0.035941656678915024, + 0.3742581605911255, + -0.17629371583461761, + -0.02004115842282772, + 0.5674691796302795, + -0.5405909419059753, + 0.30077409744262695, + 0.0971255674958229, + -0.34323400259017944 + ], + [ + 0.13946495950222015, + -0.16889819502830505, + 0.019446702674031258, + 0.39314255118370056, + -0.0034225957933813334, + 0.02616766095161438, + -0.16827596724033356, + -0.23767933249473572, + -0.2734069228172302, + 0.130742609500885, + 0.012412608601152897, + -0.08561839163303375, + 0.11375688761472702, + -0.17713887989521027, + 0.4148258864879608, + -0.19495131075382233, + 0.13714836537837982, + 0.6101315021514893, + -0.029718680307269096, + -0.16342073678970337, + 0.11605348438024521, + 0.17542240023612976, + 0.036962397396564484, + -0.10685107111930847, + 0.23439712822437286, + 0.09238147735595703, + -0.09808668494224548, + 0.933026134967804, + -0.2998422682285309, + 0.19791190326213837, + 0.1547544300556183, + -0.42142605781555176 + ], + [ + 0.06618838012218475, + -0.3468064069747925, + 0.07886799424886703, + 0.4932181239128113, + 0.13775834441184998, + 0.07827680557966232, + -0.32147735357284546, + 0.03463534265756607, + -0.048414114862680435, + 0.2642655372619629, + -0.07589151710271835, + -0.14893336594104767, + 0.11039790511131287, + 0.19669204950332642, + 0.30290529131889343, + 0.03694553300738335, + 0.026386365294456482, + 0.29852452874183655, + -0.031059294939041138, + -0.18104609847068787, + -0.0036518133711069822, + 0.1869298815727234, + 0.09182864427566528, + -0.06982512027025223, + 0.12243205308914185, + -0.1771441102027893, + 0.18344414234161377, + 0.3749955892562866, + -0.33909478783607483, + 0.1629810929298401, + 0.037679072469472885, + -0.009947082959115505 + ], + [ + 0.1778029352426529, + 0.07942375540733337, + -0.02891511283814907, + 0.3061537742614746, + -0.09208057820796967, + -0.07011471688747406, + -0.3805810809135437, + 0.1172289103269577, + -0.3319684565067291, + 0.4723719358444214, + 0.06886371970176697, + -0.5161396861076355, + 0.03476012870669365, + 0.2455643117427826, + 0.12927784025669098, + 0.04832262173295021, + 0.11835389584302902, + 0.1923554390668869, + 0.013986937701702118, + 0.0824362114071846, + 0.032929204404354095, + 0.1202406957745552, + 0.056696753948926926, + -0.015976250171661377, + 0.08817856758832932, + 0.038665130734443665, + -0.09813803434371948, + 0.2966574430465698, + -0.25990915298461914, + 0.17062592506408691, + -0.007897933013737202, + -0.23148445785045624 + ], + [ + -0.1290990710258484, + -0.05003567785024643, + -0.011143541894853115, + 0.12877027690410614, + -0.16331444680690765, + 0.06275290250778198, + -0.3329024016857147, + -0.16733138263225555, + -0.22893279790878296, + 0.12539558112621307, + 0.02930622734129429, + -0.17044934630393982, + 0.21481506526470184, + 0.09554442763328552, + 0.0025458657182753086, + -0.0891694650053978, + -0.0015701699303463101, + 0.12184114754199982, + -0.061820290982723236, + 0.10949677228927612, + -0.017741989344358444, + 0.09931975603103638, + -0.15137028694152832, + 0.13002517819404602, + -0.10157657414674759, + 0.01925632357597351, + 0.21032188832759857, + 0.0953536406159401, + -0.23182743787765503, + 0.00842980481684208, + -0.009512083604931831, + -0.19765877723693848 + ], + [ + -0.014370698481798172, + -0.23717963695526123, + 0.028081456199288368, + 0.24650806188583374, + 0.019929280504584312, + -0.05490358918905258, + -0.33469823002815247, + 0.060192231088876724, + -0.18713021278381348, + 0.28336861729621887, + -0.020655080676078796, + -0.20317746698856354, + 0.11114801466464996, + 0.01735503599047661, + 0.17464345693588257, + 0.06320668756961823, + 0.10093991458415985, + 0.13698388636112213, + -0.09725020825862885, + -0.07966253161430359, + 0.040120020508766174, + 0.11724333465099335, + 0.16341888904571533, + -0.13733802735805511, + -0.05715864524245262, + -0.17265571653842926, + 0.1541142612695694, + 0.6980870366096497, + -0.45086145401000977, + 0.06314481049776077, + 0.008300727233290672, + -0.0556473545730114 + ] + ], + [ + [ + 0.00012929461081512272, + 0.19960148632526398, + -0.022525735199451447, + -0.16641512513160706, + 0.036230508238077164, + -0.07165512442588806, + -0.3508664071559906, + -0.058194857090711594, + -0.034469813108444214, + -0.09001372009515762, + 0.03523261100053787, + 0.052809346467256546, + -0.2870227098464966, + -0.0913795679807663, + 0.010934186168015003, + -0.1896757036447525, + -0.09628212451934814, + 0.11170026659965515, + -0.05285082384943962, + -0.03094056062400341, + 0.10656749457120895, + 0.1681886911392212, + -0.00927028339356184, + 0.06670305877923965, + 0.2762855887413025, + -0.03514588624238968, + 0.09676877409219742, + -0.05458652973175049, + 0.166644886136055, + 0.13929831981658936, + 0.003097828943282366, + 0.20191225409507751 + ], + [ + 0.05801544710993767, + 0.13273033499717712, + -0.3402198553085327, + -0.010208101943135262, + -0.5174869894981384, + 0.46962669491767883, + 0.44054970145225525, + -0.18416178226470947, + 0.3870873749256134, + -0.3636643588542938, + 0.28628459572792053, + -0.11859992891550064, + -0.338765949010849, + -0.03102896735072136, + 0.07941452413797379, + 0.8891551494598389, + -0.05877891927957535, + 0.2917039096355438, + 0.8618091344833374, + 0.3024533987045288, + -0.3419055640697479, + -0.04561147466301918, + 0.16242989897727966, + -0.2367619425058365, + 0.19109128415584564, + -0.0389060378074646, + -0.4333372414112091, + -0.5268129110336304, + 0.0891050323843956, + 0.09483760595321655, + -0.17740462720394135, + 0.10697949677705765 + ], + [ + 0.16656209528446198, + 0.0574243925511837, + 0.019736172631382942, + 0.1529601514339447, + -0.5113698840141296, + 0.049475960433483124, + 0.14775121212005615, + -0.1940242350101471, + 0.4859648644924164, + -0.1618710607290268, + 0.0737488865852356, + -0.42933833599090576, + -0.23567494750022888, + -0.43127262592315674, + 0.2051834762096405, + 0.16967205703258514, + -0.35936662554740906, + 0.08476153761148453, + 0.47566211223602295, + 0.1557597666978836, + -0.12328600883483887, + 0.07868879288434982, + 0.28638818860054016, + 0.15428484976291656, + -0.1474449336528778, + 0.1322135031223297, + -0.14317192137241364, + -0.4498922526836395, + -0.2946045398712158, + -0.009307846426963806, + 0.05569858103990555, + -0.022124264389276505 + ], + [ + 0.21012234687805176, + -0.05996672064065933, + -0.11257380247116089, + 0.10548967868089676, + -0.23483726382255554, + 0.2381853461265564, + 0.1875465363264084, + -0.09863121807575226, + 0.19306351244449615, + 0.15645045042037964, + 0.040171850472688675, + -0.20891624689102173, + -0.40264466404914856, + -0.17198894917964935, + 0.21344386041164398, + 0.2813435196876526, + -0.0788925513625145, + 0.36656391620635986, + 0.38107866048812866, + 0.23168522119522095, + 0.04434534162282944, + 0.14973677694797516, + 0.26914238929748535, + -0.18838036060333252, + 0.04465021565556526, + 0.22219182550907135, + 0.008739297278225422, + -0.10245567560195923, + -0.17602424323558807, + 0.04325159266591072, + -0.17072126269340515, + -0.0032793835271149874 + ], + [ + 0.217793807387352, + 0.1919480711221695, + 0.06434020400047302, + 0.14378920197486877, + -0.07738050818443298, + 0.07690735906362534, + 0.14358404278755188, + 0.07957375049591064, + 0.21608620882034302, + 0.3097105622291565, + 0.06252864003181458, + -0.0669146329164505, + -0.1537957638502121, + -0.24321900308132172, + 0.22469672560691833, + -0.016796888783574104, + -0.02776501327753067, + 0.2155495136976242, + 0.18892167508602142, + -0.12891672551631927, + 0.0802050307393074, + 0.05321124941110611, + -0.07977604120969772, + 0.24242866039276123, + 0.07744431495666504, + 0.07287685573101044, + 0.22107216715812683, + 0.5591994524002075, + -0.1116136834025383, + -0.11276260018348694, + 0.10486926883459091, + 0.040585897862911224 + ], + [ + 0.1321059912443161, + -0.25750255584716797, + -0.07334403693675995, + -0.0034541303757578135, + -0.17120839655399323, + -0.025674449279904366, + 0.4391927421092987, + 0.32015547156333923, + 0.26591840386390686, + 0.09852655977010727, + -0.000300269341096282, + 0.018704446032643318, + -0.2686263620853424, + -0.07736790925264359, + 0.15729744732379913, + 0.26415660977363586, + 0.034574687480926514, + 0.2441847026348114, + 0.10660991072654724, + 0.05894095078110695, + 0.06014080345630646, + -0.06258171051740646, + -0.12944284081459045, + -0.0040337392129004, + -0.040382493287324905, + -0.05376889556646347, + 0.3253636956214905, + 0.9427987933158875, + -0.15263399481773376, + 0.012551604770123959, + 0.0676860511302948, + -0.41422584652900696 + ], + [ + 0.048968181014060974, + 0.08112471550703049, + 0.07097842544317245, + -0.006874416023492813, + 0.08774896711111069, + 0.08510598540306091, + -0.0810849517583847, + -0.25134000182151794, + 0.3153541684150696, + 0.11867120116949081, + 0.055445440113544464, + -0.2934209704399109, + -0.07034341245889664, + -0.023066557943820953, + 0.10173965990543365, + 0.11814241111278534, + -0.219507098197937, + 0.2548234462738037, + 0.29518842697143555, + -0.097417451441288, + -0.08284124732017517, + -0.007167372852563858, + 0.05371321365237236, + 0.027487769722938538, + 0.06384376436471939, + 0.004851100966334343, + -0.17742817103862762, + 0.07401534914970398, + -0.26374098658561707, + 0.027269206941127777, + -0.09689150750637054, + -0.2623137831687927 + ], + [ + 0.25077763199806213, + -0.18625350296497345, + -0.09767217189073563, + -0.13049481809139252, + -0.19652627408504486, + 0.0709087923169136, + -0.28322142362594604, + -0.0805673748254776, + -0.04794551804661751, + -0.11143603175878525, + -0.009762119501829147, + -0.34127527475357056, + 0.04529017582535744, + 0.2100125551223755, + -0.2336563766002655, + 0.30935031175613403, + 0.02234029397368431, + 0.001763770473189652, + -0.06324310600757599, + 0.5643035769462585, + 0.07545285671949387, + 0.05900813266634941, + -0.08984275907278061, + -0.252499520778656, + 0.1795310378074646, + -0.0799628272652626, + 0.275580495595932, + 0.08790479600429535, + -0.006706783082336187, + 0.22489558160305023, + 0.1373167484998703, + 0.00875071994960308 + ] + ], + [ + [ + -0.1430143266916275, + 0.048005033284425735, + 0.04735097289085388, + -0.14448735117912292, + -0.003078591311350465, + -0.07844721525907516, + 0.1175207644701004, + -0.03167227283120155, + 0.09495712071657181, + 0.06205993890762329, + -0.0009988815290853381, + 0.25582629442214966, + -0.282209187746048, + -0.03699629753828049, + 0.0987396091222763, + -0.28440341353416443, + 0.05667928233742714, + -0.0013298281701281667, + -0.1789368987083435, + 0.12226667255163193, + 0.022762663662433624, + 0.11673710495233536, + -0.09849882125854492, + 0.21407905220985413, + 0.027786362916231155, + -0.15713350474834442, + -0.01766657829284668, + 0.13017454743385315, + 0.03716980665922165, + -0.06842388957738876, + -0.21143634617328644, + -0.08684540539979935 + ], + [ + 0.1851160079240799, + 0.1491222083568573, + -0.4669366776943207, + -0.11005396395921707, + -0.26978471875190735, + 0.2679246664047241, + 0.23528361320495605, + -0.5386158227920532, + 0.07235343754291534, + 0.03483186289668083, + 0.10765937715768814, + 0.8984289765357971, + -0.4114305078983307, + -0.4428088366985321, + 0.6506851315498352, + 1.443001389503479, + 0.17413341999053955, + 0.9781240224838257, + 0.813730776309967, + 0.6430936455726624, + 0.31444624066352844, + -0.19037587940692902, + 1.5917361974716187, + -0.1342201679944992, + 0.862598717212677, + 0.04458237811923027, + -0.6462481021881104, + -0.7563241720199585, + 0.02126506343483925, + 0.20486941933631897, + 0.09903905540704727, + -0.01005230937153101 + ], + [ + 0.12049280852079391, + -0.20672675967216492, + -0.06352551281452179, + -0.14698302745819092, + 0.14669306576251984, + -0.051523007452487946, + 0.7327195405960083, + 0.09989892691373825, + -0.14946843683719635, + -0.29646193981170654, + 0.05225561559200287, + 0.7340328693389893, + -0.12798607349395752, + -0.4474382698535919, + 0.51537024974823, + 0.6624394059181213, + 0.042888764292001724, + 0.27368447184562683, + 0.2620099186897278, + 0.06758320331573486, + 0.24093222618103027, + -0.19876046478748322, + 0.6751323342323303, + 0.12526275217533112, + 0.07039317488670349, + 0.07521816343069077, + -0.00855968613177538, + -0.4459138810634613, + -0.3987720012664795, + 0.16001273691654205, + 0.3577705919742584, + -0.5753912329673767 + ], + [ + -0.009607205167412758, + 0.16012409329414368, + -0.02081925980746746, + 0.13080812990665436, + -0.06694064289331436, + 0.09910216927528381, + 0.5678929090499878, + 0.09150369465351105, + -0.18083776533603668, + -0.011567859910428524, + -0.04800918325781822, + 0.2086852341890335, + -0.047862619161605835, + -0.5554383397102356, + 0.6087705492973328, + 0.39143121242523193, + 0.1695721447467804, + 0.46691107749938965, + -0.10496785491704941, + 0.0172838494181633, + 0.460771381855011, + 0.06206816807389259, + 0.2867938280105591, + 0.02537154033780098, + -0.07634945958852768, + 0.26357701420783997, + -0.23026050627231598, + -0.33866453170776367, + -0.26256462931632996, + 0.14138799905776978, + 0.4141419529914856, + -0.15783269703388214 + ], + [ + 0.10178501904010773, + 0.10038681328296661, + -0.03358439728617668, + -0.1504582166671753, + 0.11221788078546524, + 0.03365330398082733, + 0.4821043908596039, + 0.19256284832954407, + 0.08748017251491547, + -0.06420604884624481, + -0.008804255165159702, + 0.12690865993499756, + -0.014358551241457462, + -0.23246555030345917, + 0.33934956789016724, + 0.3734395205974579, + -0.11692672967910767, + 0.2911449670791626, + -0.14123952388763428, + 0.006231657695025206, + 0.10729030519723892, + -0.30189526081085205, + 0.23585878312587738, + 0.26234155893325806, + -0.14139871299266815, + 0.018559735268354416, + -0.3467809855937958, + 0.30811256170272827, + -0.21978464722633362, + 0.10463979840278625, + 0.08489080518484116, + -0.2893516421318054 + ], + [ + -0.03865363448858261, + 0.017483551055192947, + -0.03168902173638344, + 0.044864214956760406, + -0.034548789262771606, + 0.07913751155138016, + 0.49004432559013367, + -0.0007560474914498627, + -0.19987589120864868, + -0.061643362045288086, + 0.10530898720026016, + 0.18291103839874268, + -0.003546187886968255, + -0.13850481808185577, + 0.2850182056427002, + 0.3709070682525635, + -0.02859513647854328, + 0.17004621028900146, + -0.22971275448799133, + -0.14460398256778717, + 0.42912864685058594, + -0.0290103517472744, + 0.05696798115968704, + -0.1633882224559784, + -0.15564027428627014, + 0.07762052118778229, + -0.19738627970218658, + -0.10048574954271317, + -0.35015833377838135, + 0.04508822783827782, + 0.11975730955600739, + -0.22955511510372162 + ], + [ + 0.08462638407945633, + -0.20382839441299438, + 0.05937567353248596, + -0.05084267258644104, + -0.1480686366558075, + 0.008774999529123306, + 0.12603211402893066, + 0.11361625790596008, + -0.14263863861560822, + 0.0803791880607605, + -0.013659752905368805, + -0.056652236729860306, + 0.08208045363426208, + -0.26601362228393555, + 0.05967842414975166, + 0.2304641455411911, + 0.12371645122766495, + 0.05235854908823967, + -0.264442503452301, + -0.13118630647659302, + 0.19118140637874603, + -0.2902815639972687, + -0.017010020092129707, + -0.03063066117465496, + -0.22270992398262024, + 0.09535205364227295, + 0.13021378219127655, + 0.6676625609397888, + -0.2622085511684418, + -0.058037467300891876, + 0.06052527576684952, + 0.18622951209545135 + ], + [ + -0.13324545323848724, + -0.20891788601875305, + 0.024177713319659233, + 0.14042197167873383, + -0.12123847752809525, + 0.13603198528289795, + 0.3203914165496826, + -0.13333892822265625, + 0.0481836162507534, + 0.2581212818622589, + 0.09825561940670013, + 0.024886662140488625, + -0.015203807502985, + -0.007082541938871145, + 0.08167946338653564, + 0.06016664206981659, + 0.023602064698934555, + 0.3716573715209961, + 0.05006733536720276, + 0.02592037059366703, + -0.08133784681558609, + -0.09440818428993225, + 0.16355302929878235, + 0.06833388656377792, + -0.2625890374183655, + 0.07101177424192429, + -0.22557805478572845, + -0.025715084746479988, + 0.14492765069007874, + 0.05107404664158821, + 0.03824464604258537, + -0.11919405311346054 + ] + ], + [ + [ + -0.13524127006530762, + -0.25696176290512085, + 0.046150822192430496, + -0.022381292656064034, + -0.00583410682156682, + -0.051222044974565506, + -0.3172220289707184, + -0.2725379168987274, + -0.0896119698882103, + 0.22363221645355225, + -0.03955160826444626, + -0.3765224516391754, + -0.15808668732643127, + -0.03669852390885353, + 0.00738118402659893, + -0.059414640069007874, + -0.2219475507736206, + -0.01633925922214985, + -0.2111695110797882, + 0.025441093370318413, + -0.23162458837032318, + 0.07481304556131363, + -0.11293589323759079, + 0.17639201879501343, + -0.001852431334555149, + -0.1622479408979416, + -0.42767083644866943, + 0.38221827149391174, + 0.2752920091152191, + -0.15730661153793335, + -0.1951296478509903, + 0.40679511427879333 + ], + [ + -0.23191705346107483, + 0.34969332814216614, + -0.03084067814052105, + -0.4416583180427551, + 0.6835706233978271, + 0.2448619306087494, + -0.4125019907951355, + -0.6287513971328735, + -0.7600018978118896, + 0.44711944460868835, + 0.00782698392868042, + -0.5592993497848511, + 0.038658980280160904, + 0.5331929326057434, + -0.14521439373493195, + 0.2434019297361374, + 0.26475635170936584, + 0.8561779260635376, + -0.25855502486228943, + -0.09403674304485321, + 1.3650407791137695, + -0.1515679657459259, + 0.23355232179164886, + -0.013780467212200165, + 0.6466450691223145, + 0.04766661301255226, + -0.23228907585144043, + -0.9092606902122498, + -0.1815183013677597, + 0.9818074107170105, + 0.47595077753067017, + -0.1155925914645195 + ], + [ + -0.0836147591471672, + -0.17713326215744019, + 0.16377902030944824, + -0.3352527618408203, + 0.3412916362285614, + 0.14987941086292267, + 0.16310018301010132, + -0.5597352385520935, + -0.5511837005615234, + 0.11285340040922165, + 0.057962387800216675, + -0.6209675073623657, + 0.5492247343063354, + 0.431560754776001, + -0.19368217885494232, + 0.1396542638540268, + 0.3622795045375824, + 0.1799832433462143, + -0.7486908435821533, + 0.09364058822393417, + 0.7761108875274658, + -0.06614936143159866, + 0.12769365310668945, + 0.35941290855407715, + 0.40940624475479126, + -0.23054622113704681, + 0.06020452827215195, + 0.8511754274368286, + -0.06540792435407639, + 0.3230683505535126, + 0.09971252083778381, + -0.4376351833343506 + ], + [ + -0.09898227453231812, + 0.15275096893310547, + 0.11398601531982422, + -0.17216350138187408, + 0.2874385416507721, + -0.10751504451036453, + 0.14092043042182922, + -0.3218402564525604, + -0.3302009403705597, + -0.008541044779121876, + -0.009282639250159264, + -0.3174600303173065, + 0.18286943435668945, + 0.08359921723604202, + -0.019406132400035858, + 0.04322372004389763, + 0.10376803576946259, + 0.11360383033752441, + -0.5076931118965149, + -0.1778416633605957, + 0.6992894411087036, + 0.1472184807062149, + -0.06798777729272842, + 0.09555283933877945, + 0.12115982919931412, + 0.010358436033129692, + 0.14181864261627197, + -0.30452829599380493, + -0.18691715598106384, + 0.15952354669570923, + -0.08069611340761185, + -0.323646605014801 + ], + [ + 0.038250915706157684, + 0.0785348191857338, + 0.018131660297513008, + 0.09277161210775375, + 0.3355741798877716, + -0.08697983622550964, + 0.05408177152276039, + -0.1732690930366516, + -0.28222721815109253, + -0.1744087040424347, + 0.08951134234666824, + -0.13045470416545868, + 0.03890249878168106, + 0.23279941082000732, + -0.10529188811779022, + -0.2640221118927002, + 0.03325921297073364, + 0.16903996467590332, + -0.47145402431488037, + 0.23099006712436676, + 0.6940712332725525, + 0.05316343531012535, + -0.19694195687770844, + 0.017574548721313477, + 0.07295520603656769, + -0.07382597029209137, + -0.1719493567943573, + 0.08131971955299377, + -0.3151188790798187, + 0.01738663762807846, + 0.18534491956233978, + -0.08018501847982407 + ], + [ + 0.16685406863689423, + -0.12789757549762726, + 0.11021511256694794, + -0.30348560214042664, + -0.10706882178783417, + 0.03958292677998543, + 0.027775324881076813, + -0.14609859883785248, + -0.13244377076625824, + -0.018285611644387245, + 0.12834574282169342, + -0.14779044687747955, + 0.05607180669903755, + 0.1429499238729477, + -0.2320782095193863, + -0.2316902130842209, + 0.18220874667167664, + 0.01716490089893341, + -0.16200967133045197, + 0.01796877011656761, + 0.20642337203025818, + 0.03629251569509506, + -0.07148803025484085, + 0.13340029120445251, + -0.02125367522239685, + -0.06845585256814957, + -0.04371485859155655, + -0.8076843023300171, + -0.2451436072587967, + -0.054857321083545685, + -0.2631370723247528, + -0.07475503534078598 + ], + [ + 0.10036636888980865, + -0.2791580259799957, + -0.04277689382433891, + -0.12211167067289352, + 0.10346586257219315, + 0.12259601056575775, + 0.05701703205704689, + -0.116954006254673, + -0.25236985087394714, + -0.3446960151195526, + -0.01876376010477543, + 0.005682604853063822, + 0.28134503960609436, + 0.15350373089313507, + 0.05718223750591278, + -0.09795930236577988, + 0.05137079581618309, + -0.1422009915113449, + -0.28030434250831604, + 0.44445300102233887, + 0.3196086287498474, + 0.17439110577106476, + 0.023986464366316795, + 0.13261179625988007, + -0.04936017468571663, + 0.06528699398040771, + -0.4009551703929901, + -0.1658109426498413, + -0.06491618603467941, + 0.06205412372946739, + -0.19189850986003876, + -0.1476569026708603 + ], + [ + -0.15146033465862274, + -0.025995926931500435, + -0.005979293491691351, + -0.10763993114233017, + 0.06918990612030029, + -0.0848044827580452, + -0.15475966036319733, + 0.010053782723844051, + -0.2250940501689911, + -0.07362049072980881, + -0.016133058816194534, + -0.2470390647649765, + 0.0583377406001091, + 0.12055279314517975, + 0.13727745413780212, + 0.16365498304367065, + 0.114634208381176, + -0.05121097341179848, + -0.23303958773612976, + -0.27812469005584717, + 0.29574140906333923, + 0.11571919173002243, + 0.07265443354845047, + -0.0667436495423317, + -0.09591983258724213, + 0.05014652758836746, + 0.27411067485809326, + -0.3572288155555725, + -0.16261200606822968, + -0.011811159551143646, + 0.18531732261180878, + 0.32546988129615784 + ] + ], + [ + [ + 0.011245929636061192, + 0.19064638018608093, + 0.0012399643892422318, + -0.17280951142311096, + 0.08441780507564545, + -0.006341775879263878, + 0.012661397457122803, + 0.16971604526042938, + 0.16021595895290375, + -0.005062483251094818, + 0.00174831529147923, + 0.10561350733041763, + -0.1703300178050995, + 0.22132304310798645, + -0.23452746868133545, + -0.012769055552780628, + 0.027292659506201744, + 0.3249305486679077, + -0.569064736366272, + -0.23471300303936005, + -0.14555059373378754, + 0.16802752017974854, + 0.14360903203487396, + 0.1678466945886612, + -0.07587282359600067, + 0.22181612253189087, + 0.09710665047168732, + -0.01909855753183365, + -0.15461693704128265, + -0.2028784155845642, + 0.0016229635803028941, + 0.2481217086315155 + ], + [ + -0.3619416654109955, + 0.2716912031173706, + -0.12519174814224243, + -1.2010393142700195, + 0.3546769618988037, + 0.3678126633167267, + -0.8640121817588806, + -0.019491281360387802, + -0.2088746279478073, + 0.4056839942932129, + 0.12704332172870636, + 0.09458184987306595, + 0.034137118607759476, + 0.39387401938438416, + -0.6729397773742676, + 0.042711012065410614, + 0.20924676954746246, + 0.5192292928695679, + -0.031329650431871414, + 0.07743903994560242, + 0.18249793350696564, + 0.20840822160243988, + -0.19139334559440613, + -0.18179848790168762, + -0.09924187511205673, + 0.2623027563095093, + 0.5176408886909485, + -0.3231904208660126, + -0.04916615039110184, + 0.39620983600616455, + 0.1279740035533905, + 0.09410256147384644 + ], + [ + -0.015676921233534813, + 0.1918691247701645, + -0.014106087386608124, + -0.6219682097434998, + 0.13139459490776062, + 0.10128847509622574, + -0.6373302340507507, + 0.015978438779711723, + -0.26688146591186523, + -0.05225566774606705, + 0.038250409066677094, + 0.2898293435573578, + 0.18751642107963562, + 0.628638744354248, + -0.6779073476791382, + -0.07917942851781845, + 0.29464006423950195, + 0.25329938530921936, + -0.35376453399658203, + 0.09578020125627518, + 0.02293466404080391, + 0.1304609626531601, + -0.06411541998386383, + -0.07043379545211792, + -0.10620326548814774, + 0.18411582708358765, + 0.34573206305503845, + -0.11436937004327774, + 0.04484706372022629, + 0.00868218857795, + -0.17505331337451935, + -0.2101234495639801 + ], + [ + 0.016032131388783455, + 0.09469752013683319, + 0.1262204945087433, + -0.4716610312461853, + 0.17165876924991608, + 0.054737936705350876, + -0.36573436856269836, + 0.06272802501916885, + -0.07792867720127106, + -0.18104340136051178, + 0.0997021496295929, + 0.29774919152259827, + 0.028303418308496475, + 0.16426023840904236, + -0.33684274554252625, + -0.2296411097049713, + 0.09713806211948395, + 0.06630238145589828, + -0.1395103633403778, + -0.20361362397670746, + 0.09245368838310242, + 0.18538686633110046, + -0.26579251885414124, + -0.0037404627073556185, + -0.18129175901412964, + 0.03074484132230282, + 0.3956203758716583, + -0.2619435787200928, + -0.4185847043991089, + -0.09346166253089905, + 0.026361890137195587, + 0.015814263373613358 + ], + [ + -0.0088859423995018, + -0.21140791475772858, + 0.12184888869524002, + -0.4989854693412781, + 0.2434346228837967, + -0.04104490950703621, + 0.21506367623806, + 0.1285170316696167, + 0.2142484039068222, + 0.07083716243505478, + 0.11258219927549362, + 0.014468859881162643, + 0.04617912694811821, + 0.16253069043159485, + -0.34588342905044556, + -0.11659596115350723, + -0.16249528527259827, + -0.10365265607833862, + 0.020912930369377136, + -0.32670751214027405, + -0.13237419724464417, + 0.10634757578372955, + -0.065067820250988, + 0.024682331830263138, + -0.1037580743432045, + -0.01906696893274784, + -0.22106480598449707, + -0.36209407448768616, + -0.18188798427581787, + 0.007273453753441572, + 0.19056794047355652, + -0.09867493063211441 + ], + [ + -0.10270878672599792, + -0.01006392017006874, + 0.0011165679898113012, + -0.5181496739387512, + -0.06156124547123909, + -0.10761125385761261, + -0.36782708764076233, + 0.2214369773864746, + 0.2159782499074936, + 0.35106217861175537, + -0.02381810173392296, + 0.08466847240924835, + -0.0717887356877327, + -0.03051825799047947, + -0.12745334208011627, + -0.12047600001096725, + 0.028332889080047607, + -0.14651808142662048, + 0.09687483310699463, + 0.10815602540969849, + 0.004871007055044174, + 0.1745954155921936, + -0.34856921434402466, + -0.11201220750808716, + -0.1328580379486084, + -0.02141672372817993, + -0.18058975040912628, + 0.033386651426553726, + -0.1502014547586441, + 0.049795690923929214, + -0.10959481447935104, + 0.0945938304066658 + ], + [ + -0.11078105121850967, + -0.23933525383472443, + 0.07689382135868073, + -0.3352739214897156, + 0.08130952715873718, + 0.002683413214981556, + 0.051160842180252075, + -0.09719241410493851, + 0.03624396771192551, + 0.13991324603557587, + -0.039273135364055634, + -0.008384729735553265, + -0.00133879529312253, + -0.07291875779628754, + -0.22765441238880157, + -0.07762976735830307, + 0.14086535573005676, + 0.020683852955698967, + 0.03943220525979996, + -0.034688159823417664, + 0.1348818838596344, + 0.11838796734809875, + 0.1014004573225975, + -0.18826605379581451, + -0.08574987202882767, + -0.048178039491176605, + -0.2383304089307785, + -0.33542388677597046, + -0.23207451403141022, + 0.09372331202030182, + 0.16227881610393524, + -0.05008118227124214 + ], + [ + -0.06501199305057526, + -0.1333860456943512, + -0.06949657946825027, + -0.41194289922714233, + 0.13667047023773193, + 0.06557831168174744, + 0.1118428036570549, + -0.2449331283569336, + 0.2616117298603058, + -0.05267081782221794, + -0.04041000083088875, + 0.3945257067680359, + -0.027511686086654663, + -0.001711956923827529, + -0.1203598901629448, + -0.07911645621061325, + 0.10704097896814346, + 0.12676064670085907, + 0.08619842678308487, + 0.060674600303173065, + -0.044800981879234314, + 0.10497460514307022, + -0.14299821853637695, + -0.11057855188846588, + -0.3504083752632141, + -0.13320022821426392, + -0.1915556639432907, + -0.3737933337688446, + -0.1475987583398819, + -0.010841034352779388, + 0.22287702560424805, + -0.295821875333786 + ] + ] + ], + [ + [ + [ + -0.23306506872177124, + -0.1387384831905365, + 0.11210787296295166, + -0.10855378955602646, + -0.09037191420793533, + -0.09667333960533142, + 0.4835786819458008, + -0.07640277594327927, + 0.09046448767185211, + 0.07576790452003479, + 0.06505728513002396, + 0.2343796342611313, + -0.26707011461257935, + 0.1365726888179779, + -0.1499757021665573, + -0.06939801573753357, + 0.019369078800082207, + 0.10120631754398346, + 0.0805845856666565, + -0.15611901879310608, + -0.24056655168533325, + 0.27042126655578613, + -0.16614104807376862, + -0.02962150052189827, + -0.2988046407699585, + -0.14316828548908234, + -0.217149019241333, + 0.02375517040491104, + 0.061584118753671646, + -0.1071092039346695, + -0.09365049004554749, + -0.4111120402812958 + ], + [ + 0.42004916071891785, + -0.03996746242046356, + -0.1969100683927536, + 0.5960530638694763, + -0.20332011580467224, + 0.17179429531097412, + -0.6893696784973145, + -0.6893175840377808, + -0.36487656831741333, + 0.20676147937774658, + 0.20438630878925323, + -0.9502484798431396, + -0.15063126385211945, + -0.3352248966693878, + 0.3362891972064972, + 1.7141101360321045, + 0.2920685410499573, + 0.4815584421157837, + -0.5761962532997131, + 0.2396606057882309, + 0.45813634991645813, + -0.02498445473611355, + 0.10341817885637283, + -0.16226565837860107, + 1.8985357284545898, + -0.17615877091884613, + -0.4462939202785492, + 0.7414244413375854, + 0.18041366338729858, + 1.5870192050933838, + 0.423315167427063, + -0.3397500216960907 + ], + [ + 0.2394450455904007, + -0.17901985347270966, + 0.029253629967570305, + 0.567072868347168, + 0.030081918463110924, + -0.01828325167298317, + -0.3623555600643158, + 0.1082402691245079, + -0.37372636795043945, + -0.041066549718379974, + 0.044210247695446014, + -0.6734482049942017, + 0.6434903740882874, + 0.059348203241825104, + 0.3622872531414032, + 0.5981597900390625, + 0.24066251516342163, + 0.002804695861414075, + -0.9240162968635559, + 0.004572646226733923, + 0.1483767181634903, + -0.0800786241889, + -0.27972373366355896, + 0.2961694002151489, + 0.8149831295013428, + -0.26719850301742554, + 0.12169276177883148, + 0.9697459936141968, + -0.015449268743395805, + 0.5981376767158508, + 0.10874950140714645, + 0.032835282385349274 + ], + [ + 0.26710063219070435, + -0.08970867842435837, + 0.10712624341249466, + 0.49375706911087036, + 0.5195204615592957, + -0.1286853700876236, + -0.2726675271987915, + -0.20735083520412445, + -0.24469724297523499, + 0.1046019196510315, + 0.08808492869138718, + -0.5869953632354736, + 0.35899096727371216, + 0.48899027705192566, + 0.45434990525245667, + 0.25941741466522217, + -0.04752064123749733, + -0.2843411862850189, + -0.7085121273994446, + 0.2751377522945404, + -0.05566667392849922, + 0.08060953766107559, + -0.3948501944541931, + -0.07807279378175735, + 0.0811496302485466, + -0.08270774781703949, + 0.20009595155715942, + 0.027651268988847733, + -0.17487561702728271, + 0.00596208032220602, + 0.17089959979057312, + 0.18171165883541107 + ], + [ + 0.016260160133242607, + 0.3830411732196808, + 0.0767698734998703, + 0.442423015832901, + 0.17583008110523224, + -0.02265009470283985, + -0.7561827301979065, + -0.014627434313297272, + -0.15007078647613525, + 0.14950743317604065, + 0.025276700034737587, + -0.35356736183166504, + 0.3322787284851074, + 0.20341576635837555, + 0.2336411476135254, + 0.17184320092201233, + 0.06050040200352669, + -0.038763608783483505, + -0.5744636058807373, + 0.03610791638493538, + 0.003686703974381089, + -0.0844530388712883, + -0.408540278673172, + 0.29082000255584717, + -0.20360183715820312, + -0.12292226403951645, + 0.37740880250930786, + -0.0065307593904435635, + -0.07120057940483093, + -0.20100682973861694, + -0.03267411142587662, + 0.356337308883667 + ], + [ + 0.1005653515458107, + -0.01897706277668476, + -0.03530992940068245, + 0.6124470829963684, + 0.05972253903746605, + -0.012197240255773067, + -0.9218688607215881, + 0.1600894182920456, + -0.27039635181427, + 0.05796094983816147, + -0.021957969292998314, + -0.356618732213974, + 0.01655203476548195, + 0.3265240490436554, + 0.31375205516815186, + 0.22676625847816467, + 0.36755359172821045, + 0.17146435379981995, + -0.37284713983535767, + 0.36996570229530334, + 0.0725410208106041, + -0.11413319408893585, + -0.12853994965553284, + -0.07747181504964828, + 0.5482784509658813, + -0.16518568992614746, + 0.33432772755622864, + 0.6911231875419617, + -0.1744849979877472, + 0.1077529564499855, + 0.19800513982772827, + 0.5133975744247437 + ], + [ + 0.08804845809936523, + 0.3290887475013733, + 0.07907306402921677, + 0.3450990319252014, + 0.2770085632801056, + -0.1583309918642044, + -0.8847423195838928, + 0.18719923496246338, + -0.010188160464167595, + -0.09213750064373016, + 0.07763629406690598, + -0.24395278096199036, + -0.007607427891343832, + 0.3096424341201782, + 0.06175990775227547, + -0.0798560157418251, + 0.17455394566059113, + -0.07223948836326599, + -0.50656658411026, + 0.10333908349275589, + -0.21429985761642456, + 0.1219419538974762, + -0.34353095293045044, + 0.003917441703379154, + -0.42757201194763184, + 0.07206320017576218, + -0.026425795629620552, + -0.6745452284812927, + -0.16066087782382965, + -0.3327265977859497, + 0.028588546440005302, + 0.3208146393299103 + ], + [ + 0.3495956361293793, + 0.3383358418941498, + 0.005266850348562002, + 0.10161113739013672, + 0.20134423673152924, + 0.005052013788372278, + -0.7766538858413696, + 0.3009302616119385, + -0.15420745313167572, + -0.13038493692874908, + -0.03437495604157448, + -0.2967709004878998, + 0.1394757181406021, + 0.22000496089458466, + 0.05657580494880676, + 0.18159328401088715, + 0.04510533809661865, + -0.04458943009376526, + -0.45499351620674133, + 0.17639298737049103, + -0.0917147770524025, + -0.09025375545024872, + -0.25397515296936035, + 0.00651407428085804, + -0.4554053843021393, + -0.23455089330673218, + -0.16039879620075226, + -0.6092105507850647, + -0.11711984127759933, + -0.20551125705242157, + 0.17021805047988892, + 0.22385993599891663 + ] + ], + [ + [ + -0.1958354413509369, + 0.2778851389884949, + 0.1516699343919754, + 0.053148917853832245, + 0.007711273618042469, + -0.04871435835957527, + 0.4578596353530884, + 0.3394324779510498, + 0.28433752059936523, + 0.0773925855755806, + 0.11615420132875443, + 0.2917326092720032, + -0.20244689285755157, + 0.0062970309518277645, + 0.09137346595525742, + 0.10738728940486908, + -0.03586828336119652, + -0.18476596474647522, + -0.06019403040409088, + -0.024249088019132614, + 0.022917743772268295, + 0.056018609553575516, + -0.1460045874118805, + 0.10257052630186081, + -0.08298202604055405, + -0.040058039128780365, + 0.011777374893426895, + -0.14642108976840973, + -0.19487644731998444, + -0.2499757558107376, + 0.06507836282253265, + -0.054250821471214294 + ], + [ + 0.3058096766471863, + -0.11523734778165817, + -0.1630752980709076, + 0.5140019655227661, + -0.72704017162323, + 0.10748423635959625, + -0.28386396169662476, + -0.3669167757034302, + -0.08493765443563461, + 0.04954967275261879, + 0.05793987587094307, + -0.004901977255940437, + -0.140789195895195, + -0.37108874320983887, + 0.21668480336666107, + 0.9733977317810059, + -0.14478734135627747, + -0.09048911184072495, + -1.1393948793411255, + 0.4068997800350189, + 0.547258198261261, + -0.12457756698131561, + 2.0573208332061768, + 0.03305937349796295, + 1.0969620943069458, + -0.08341655880212784, + 0.20100805163383484, + -0.16253100335597992, + 0.09513746947050095, + 2.7528109550476074, + 0.4198480546474457, + -0.5959774851799011 + ], + [ + 0.3836604356765747, + 0.2723720669746399, + 0.03927331417798996, + 0.31068891286849976, + -0.3376396596431732, + -0.01655638962984085, + -1.0601844787597656, + -0.036885570734739304, + 0.31020328402519226, + 0.12474969029426575, + 0.019807428121566772, + 0.03474487364292145, + 0.0001764732733136043, + 0.10352888703346252, + -0.022729236632585526, + 0.48837873339653015, + -0.10557485371828079, + -0.07655993849039078, + -0.4852023124694824, + 0.10372702032327652, + 0.3453470468521118, + 0.079131118953228, + 0.8560282588005066, + 0.20660364627838135, + 0.43843939900398254, + -0.045009445399045944, + 0.4034181237220764, + 1.0430241823196411, + 0.3481961190700531, + 0.8842346668243408, + 0.5023558735847473, + -0.3239313066005707 + ], + [ + 0.2014482319355011, + -0.3140527606010437, + 0.024076825007796288, + 0.15505246818065643, + -0.24447950720787048, + -0.08202844113111496, + -1.1549170017242432, + -0.026865938678383827, + 0.1067022830247879, + -0.1822061687707901, + -0.06987321376800537, + -0.18542878329753876, + -0.06286879628896713, + -0.14853762090206146, + -0.1690514087677002, + 0.2729834318161011, + 0.005600497592240572, + 0.32427340745925903, + -0.19299085438251495, + 0.2474919855594635, + 0.39996224641799927, + 0.0020546498708426952, + 0.5135283470153809, + -0.18160390853881836, + 0.686211884021759, + 0.03384719789028168, + 0.49170762300491333, + 1.6539043188095093, + 0.21981367468833923, + 0.39712774753570557, + 0.40677154064178467, + -0.1368110328912735 + ], + [ + 0.11234057694673538, + 0.008012213744223118, + 0.01035863533616066, + 0.09958560019731522, + -0.14051134884357452, + -0.12461365014314651, + -0.4677800238132477, + -0.13595852255821228, + 0.1515127420425415, + -0.006172783672809601, + 0.07159527391195297, + -0.18261964619159698, + 0.023228844627738, + -0.06173596903681755, + -0.04977773502469063, + 0.23826873302459717, + -0.010762188583612442, + 0.47674161195755005, + -0.05157133564352989, + -0.1829712688922882, + 0.3751477897167206, + -0.12727564573287964, + 0.2601465582847595, + 0.06936068087816238, + 0.7386653423309326, + 0.0034630652517080307, + -0.1867193579673767, + 1.4111407995224, + 0.09662490338087082, + 0.44463926553726196, + 0.127627894282341, + -0.15091152489185333 + ], + [ + -0.07607143372297287, + -0.16528533399105072, + 0.02057187631726265, + 0.15592893958091736, + -0.25859034061431885, + 0.07458215951919556, + -0.29652437567710876, + -0.12109191715717316, + 0.04108757525682449, + 0.14898943901062012, + -0.02746696025133133, + -0.16040262579917908, + 0.1188686341047287, + -0.3337736129760742, + -0.12282329797744751, + 0.06875547766685486, + 0.20463839173316956, + 0.3475191593170166, + 0.2869076728820801, + 0.2875661849975586, + 0.487178772687912, + 0.03840570151805878, + 0.4145105183124542, + -0.14092625677585602, + 0.8961583971977234, + -0.1587633639574051, + 0.031635984778404236, + 1.4579062461853027, + 0.31049680709838867, + 0.6498042345046997, + 0.15070189535617828, + -0.05605955049395561 + ], + [ + 0.27533864974975586, + -0.09900195896625519, + 0.0634196326136589, + 0.012663641013205051, + -0.056137360632419586, + 0.004056988749653101, + -0.4304206371307373, + 0.21172481775283813, + 0.04014630615711212, + 0.1321963369846344, + -0.001249600201845169, + -0.12499640882015228, + 0.04477272182703018, + 0.25596994161605835, + -0.12471064925193787, + 0.24400927126407623, + -0.05059955269098282, + 0.19043026864528656, + 0.18487538397312164, + -0.13944533467292786, + 0.39939647912979126, + 0.15748099982738495, + 0.32745668292045593, + 0.3292994201183319, + 0.7652881741523743, + 0.20494653284549713, + -0.0138180460780859, + 1.1691755056381226, + 0.009304772131145, + 0.14557521045207977, + 0.1658463031053543, + -0.4382005035877228 + ], + [ + 0.15983793139457703, + -0.47680389881134033, + 0.03912728279829025, + 0.3954351842403412, + 0.0008790577412582934, + -0.14195555448532104, + -1.039062261581421, + 0.0741804912686348, + -0.09960456192493439, + 0.05777741223573685, + 0.03853030502796173, + -0.4477938413619995, + 0.17233631014823914, + 0.28843286633491516, + 0.0450361967086792, + 0.17194239795207977, + 0.39983823895454407, + 0.4144349694252014, + -0.1826292723417282, + 1.0408539772033691, + 0.448720782995224, + -0.03802018240094185, + 0.15095606446266174, + -0.027184493839740753, + 1.2223008871078491, + 0.07919114828109741, + -0.08822181820869446, + 2.2453646659851074, + -0.15082141757011414, + 0.37358126044273376, + 0.11736559867858887, + 0.2200234830379486 + ] + ], + [ + [ + -0.11945109069347382, + 0.129801407456398, + 0.06569640338420868, + 0.04482998326420784, + 0.0011477434309199452, + 0.030754074454307556, + 0.17581376433372498, + -0.03263520449399948, + 0.01822012849152088, + 0.20163944363594055, + 0.07951897382736206, + -0.20865345001220703, + -0.3149917721748352, + 0.029957210645079613, + -0.14235441386699677, + 0.030965276062488556, + 0.029432974755764008, + -0.225878044962883, + -0.07147516310214996, + -0.19246266782283783, + -0.3332853615283966, + -0.06710272282361984, + -0.1685972958803177, + 0.2657589614391327, + 0.01054416224360466, + -0.054469022899866104, + -0.020047543570399284, + -0.04280376806855202, + -0.11603298783302307, + -0.19666893780231476, + -0.05429966747760773, + 0.10496558248996735 + ], + [ + 0.08706630766391754, + 0.20469623804092407, + -0.3018518090248108, + 0.63774573802948, + -0.24058270454406738, + 0.13940437138080597, + -0.09575312584638596, + -0.8186343312263489, + -0.3465079069137573, + -0.08182845264673233, + 0.10000995546579361, + -0.33406567573547363, + -0.22898627817630768, + -1.0493577718734741, + 0.4634590446949005, + 1.0030797719955444, + 0.28633445501327515, + 0.47172388434410095, + -0.8723708391189575, + 0.2672383785247803, + 0.9992568492889404, + -0.37198710441589355, + 2.248333215713501, + -0.40585851669311523, + 1.5469244718551636, + 0.1964055597782135, + -0.6972534656524658, + -1.3144702911376953, + 0.09208894520998001, + 2.687682628631592, + 0.5366439819335938, + -0.14774566888809204 + ], + [ + 0.2519083023071289, + 0.02863074094057083, + 0.02214452251791954, + 0.6024419069290161, + -0.3247314393520355, + 0.1466996669769287, + -0.46271660923957825, + -0.1972169280052185, + -0.08101975172758102, + -0.054504092782735825, + 0.14775153994560242, + -0.4785890281200409, + 0.3883582353591919, + -0.8831827640533447, + 0.3996775448322296, + 0.34927472472190857, + 0.07686368376016617, + 0.07758481055498123, + -0.10635364800691605, + -0.005670147016644478, + 0.7895249724388123, + -0.36748260259628296, + 0.9167026877403259, + 0.3189333975315094, + 1.223345160484314, + 0.04072174057364464, + -0.09037474542856216, + 0.43173056840896606, + 0.10019289702177048, + 1.0987414121627808, + 0.4723452627658844, + -0.2426159530878067 + ], + [ + 0.025214767083525658, + 0.005567019339650869, + 0.0057558962143957615, + 0.3396565318107605, + -0.03826482966542244, + 0.10511481016874313, + -0.5544688105583191, + -0.1660761535167694, + -0.4715164601802826, + -0.16228774189949036, + -0.041378770023584366, + -0.14464925229549408, + -0.03606205806136131, + -0.300082802772522, + 0.1276749074459076, + 0.12305185943841934, + 0.16616764664649963, + 0.23157086968421936, + -0.14050447940826416, + -0.03401664271950722, + 0.6218377947807312, + -0.1307327002286911, + 0.4807053208351135, + 0.007044068071991205, + 0.7398251891136169, + 0.20976588129997253, + -0.03178946301341057, + 0.032991454005241394, + 0.011937621980905533, + 0.8127813935279846, + 0.2826518714427948, + 0.0762016549706459 + ], + [ + -0.09922955930233002, + 0.2677338123321533, + 0.059330809861421585, + 0.3606557548046112, + -0.17663733661174774, + -0.061354152858257294, + -0.28062114119529724, + -0.26668280363082886, + 0.06831192970275879, + -0.16752661764621735, + -0.05123687908053398, + -0.1588943898677826, + 0.2581575810909271, + -0.20259426534175873, + 0.11983867734670639, + -0.19491204619407654, + 0.1401851624250412, + -0.19107389450073242, + -0.06482301652431488, + -0.10819478332996368, + 0.6078178286552429, + -0.14384014904499054, + 0.3211381733417511, + 0.0747068002820015, + 0.7399072051048279, + 0.05678520351648331, + 0.15058298408985138, + -0.7294926047325134, + -0.09384425729513168, + 0.44381722807884216, + 0.031253617256879807, + 0.2647254168987274 + ], + [ + 0.11219313740730286, + 0.2622165083885193, + 0.008419645950198174, + 0.09591883420944214, + 0.058808811008930206, + -0.037328239530324936, + 0.02393951825797558, + 0.1333134025335312, + -0.31920066475868225, + -0.026917437091469765, + -0.00945414137095213, + -0.15563549101352692, + -0.05558271333575249, + -0.09065933525562286, + 0.11486856639385223, + -0.20892225205898285, + 0.2704310715198517, + -0.43367061018943787, + 0.02633056789636612, + -0.16146789491176605, + 0.1333492398262024, + -0.23748144507408142, + 0.06038827449083328, + -0.21744871139526367, + 0.10321588069200516, + 0.11097769439220428, + -0.07849182188510895, + -1.287186622619629, + -0.05900200828909874, + 0.006947231013327837, + -0.19846618175506592, + 0.5772877931594849 + ], + [ + 0.06516116112470627, + 0.0930887833237648, + -0.08416987210512161, + 0.21809051930904388, + 0.0820157378911972, + 0.005178077612072229, + -0.2691558301448822, + 0.09817571192979813, + -0.17957694828510284, + 0.008086309768259525, + 0.040655333548784256, + -0.002441741293296218, + 0.38324856758117676, + -0.1859835386276245, + -0.006358244456350803, + -0.05795624107122421, + 0.08127719163894653, + -0.08418974280357361, + -0.4179350435733795, + -0.03659604862332344, + 0.3001044690608978, + -0.09239643812179565, + -0.007853493094444275, + -0.00339685776270926, + 0.3814001977443695, + 0.17326472699642181, + 0.3655587136745453, + 0.13259921967983246, + 0.09191148728132248, + 0.29780125617980957, + -0.03569171950221062, + -0.4251598119735718 + ], + [ + -0.05016351118683815, + 0.1825518012046814, + -0.10159998387098312, + 0.21469371020793915, + -0.06941056996583939, + 0.047788191586732864, + 0.17718000710010529, + -0.06282035261392593, + -0.20236346125602722, + -0.02170601114630699, + 0.01626521535217762, + -0.14720724523067474, + 0.064341701567173, + -0.8610607385635376, + 0.21712680160999298, + 0.21402712166309357, + 0.13393345475196838, + 0.27059993147850037, + 0.25078076124191284, + -0.03401685133576393, + 0.6551145911216736, + -0.13868117332458496, + 0.3761565387248993, + 0.06449629366397858, + 0.4148881733417511, + 0.14084722101688385, + 0.1574803739786148, + 1.66932213306427, + -0.15274855494499207, + 0.6037615537643433, + 0.10310032218694687, + 0.02911185659468174 + ] + ], + [ + [ + 0.14508379995822906, + -0.02919628657400608, + 0.09161558747291565, + -0.05010195076465607, + -0.09046167135238647, + 0.11851254105567932, + 0.1720859557390213, + -0.023106524720788002, + 0.09445679932832718, + 0.03964468836784363, + 0.009472223930060863, + -0.11176532506942749, + -0.09459327161312103, + 0.08704594522714615, + 0.18016082048416138, + -0.10782637447118759, + -0.030488356947898865, + 0.06785957515239716, + 0.007262405939400196, + -0.23421873152256012, + -0.07387053221464157, + 0.15632610023021698, + -0.2117629051208496, + 0.22782590985298157, + -0.3037717342376709, + -0.010633145458996296, + 0.10625630617141724, + -0.1645764708518982, + -0.21214845776557922, + -0.2370736300945282, + 0.027693044394254684, + 0.5905345678329468 + ], + [ + 0.20062503218650818, + 0.04145265370607376, + 0.014134221710264683, + -0.6900733113288879, + 0.5579072833061218, + 0.243052676320076, + 0.6212235689163208, + -0.1438533067703247, + -1.0071070194244385, + 0.219336599111557, + 0.07579788565635681, + -0.8949573636054993, + -0.39318594336509705, + 0.48772305250167847, + -0.48188546299934387, + 0.4158861041069031, + 0.7360816597938538, + -0.8053932785987854, + 0.9284707307815552, + 0.1516817957162857, + 0.3810890316963196, + -0.050392087548971176, + -0.5788314342498779, + 0.0636233314871788, + 0.5536918044090271, + -0.03714779391884804, + 0.3770984411239624, + 0.8622979521751404, + 0.02098853327333927, + -0.00698370486497879, + 0.48734429478645325, + 0.38342997431755066 + ], + [ + 0.23495249450206757, + -0.23863352835178375, + 0.12096494436264038, + -0.18755708634853363, + 0.372374564409256, + 0.0686357170343399, + 1.6192792654037476, + -0.03951602429151535, + -0.3627797067165375, + -0.45338961482048035, + 0.06456133723258972, + -0.5106227397918701, + 0.14023561775684357, + 0.48667973279953003, + 0.10624148696660995, + -0.22584067285060883, + 0.3438711166381836, + -0.6973229646682739, + 0.06597629189491272, + 0.1449183225631714, + -0.03143966197967529, + 0.10400118678808212, + -0.5485822558403015, + 0.014991510659456253, + 0.21798311173915863, + -0.08520060777664185, + 0.16802886128425598, + -0.1145523265004158, + -0.17609430849552155, + -0.10173267126083374, + -0.057459644973278046, + 0.7731430530548096 + ], + [ + -0.014525576494634151, + -0.03317289426922798, + 0.1089845597743988, + 0.2035256028175354, + 0.04906643554568291, + 0.023993076756596565, + 1.0517582893371582, + -0.10936050862073898, + -0.34089067578315735, + -0.26646262407302856, + 0.059628307819366455, + -0.42861926555633545, + 0.09663993120193481, + 0.3007911741733551, + -0.061566323041915894, + -0.24381603300571442, + 0.25356945395469666, + -0.606897234916687, + 0.0021874469239264727, + -0.10072681307792664, + -0.11889681965112686, + 0.005412958562374115, + -0.4247949421405792, + -0.010412939824163914, + 0.18589572608470917, + -0.13999532163143158, + 0.24109463393688202, + -0.6689198017120361, + -0.09091654419898987, + -0.08031494170427322, + -0.06017259135842323, + 0.9541127681732178 + ], + [ + -0.07951224595308304, + 0.083574578166008, + 0.12566733360290527, + 0.1279248297214508, + 0.07070863246917725, + 0.1543501913547516, + 0.25672057271003723, + 0.010687966831028461, + -0.16345122456550598, + -0.23737657070159912, + 0.019034365192055702, + -0.4248296320438385, + 0.15315106511116028, + 0.28110772371292114, + 0.19344384968280792, + -0.28227663040161133, + 0.348101407289505, + -0.7297376394271851, + 0.05858693644404411, + -0.1276983618736267, + -0.27591776847839355, + -0.03818367049098015, + -0.22967614233493805, + -0.0645371600985527, + 0.060972779989242554, + -0.0427527129650116, + 0.16587162017822266, + -0.8843944668769836, + -0.2821630537509918, + -0.24201160669326782, + -0.15607576072216034, + 0.6946235299110413 + ], + [ + -0.13267160952091217, + -0.21166108548641205, + -0.05135800689458847, + -0.19318953156471252, + 0.19883185625076294, + 0.020025111734867096, + 0.5932791829109192, + 0.390983521938324, + -0.17024348676204681, + -0.3765328526496887, + 0.02702495828270912, + 0.010627985000610352, + 0.3230777084827423, + 0.2599082887172699, + -0.02905692160129547, + -0.13967972993850708, + -0.09983661025762558, + -0.1323903650045395, + 0.11487437039613724, + -0.4892607629299164, + -0.04182838648557663, + -0.07182887941598892, + -0.24360232055187225, + -0.20108385384082794, + -0.3496813178062439, + -0.02673979103565216, + 0.43570783734321594, + -0.25774452090263367, + 0.019039561972022057, + -0.27310118079185486, + 0.1425037831068039, + 0.5961256623268127 + ], + [ + 0.021879414096474648, + 0.4437756836414337, + 0.012087230570614338, + 0.4587562680244446, + -0.10159854590892792, + 0.019643206149339676, + 0.19286023080348969, + 0.22960731387138367, + -0.08204404264688492, + -0.4488760530948639, + -0.023550253361463547, + -0.35243287682533264, + 0.22860069572925568, + -0.015627767890691757, + 0.14173029363155365, + -0.15333418548107147, + 0.11490108072757721, + -0.00353050883859396, + 0.056624885648489, + -0.40155190229415894, + 0.027966661378741264, + -0.14531616866588593, + -0.4600851535797119, + -0.20522938668727875, + 0.04914562404155731, + -0.11849985271692276, + 0.2531563341617584, + -0.7791181802749634, + -0.07958748191595078, + -0.18684709072113037, + -0.001266336883418262, + 0.43031635880470276 + ], + [ + 0.04501070827245712, + 0.40840622782707214, + 0.08372923731803894, + 0.2055412232875824, + 0.2117031216621399, + 0.06567991524934769, + 0.7788124680519104, + 0.16199497878551483, + -0.4063258767127991, + -0.015281367115676403, + 0.11040038615465164, + 0.1996685415506363, + 0.018173880875110626, + 0.2013627141714096, + 0.03714217245578766, + 0.18495914340019226, + 0.05706408619880676, + -0.5506871342658997, + -0.06649450957775116, + -0.8994590640068054, + -0.00423783715814352, + -0.17680130898952484, + -0.3911796808242798, + -0.14690834283828735, + -0.19329297542572021, + -0.099944107234478, + 0.35400599241256714, + -1.3791574239730835, + -0.05015333369374275, + -0.3304564952850342, + -0.19397476315498352, + 0.3923012316226959 + ] + ], + [ + [ + -0.16696572303771973, + -0.13364596664905548, + 0.1171668991446495, + 0.10056708753108978, + 0.0915440246462822, + 0.08061052113771439, + -0.050144825130701065, + 0.5011735558509827, + -0.22017979621887207, + -0.14549224078655243, + 0.008422205224633217, + -0.33751076459884644, + -0.10165262222290039, + -0.24474729597568512, + 0.029705125838518143, + -0.01581789180636406, + -0.34519195556640625, + 0.05829700455069542, + 0.3864544928073883, + -0.2678866982460022, + -0.0953119769692421, + 0.13604240119457245, + 0.11835359036922455, + -0.1167437732219696, + -0.5403475761413574, + 0.06229535490274429, + -0.08379329741001129, + -0.27716562151908875, + -0.050636935979127884, + -0.12452588230371475, + 0.01943212002515793, + -0.09223223477602005 + ], + [ + -0.221866175532341, + 0.16573873162269592, + -0.169407919049263, + -2.5731234550476074, + 0.3834681510925293, + 0.3430509865283966, + 0.7127097845077515, + -0.32514068484306335, + -0.12928247451782227, + -0.27526193857192993, + 0.08225689828395844, + 2.276848316192627, + 0.008403087966144085, + 0.46630650758743286, + -0.9697747826576233, + 0.010399887338280678, + 0.07895438373088837, + -1.2635598182678223, + 4.679153919219971, + -0.23879587650299072, + 0.06534110009670258, + -0.06025088578462601, + -0.03499111905694008, + -0.08287232369184494, + -0.7152665853500366, + 0.10133637487888336, + 0.22983340919017792, + 1.4766937494277954, + -0.23231860995292664, + -0.7045912742614746, + 0.6789252161979675, + 0.6390566229820251 + ], + [ + -0.09785300493240356, + 0.22442112863063812, + -0.03759407624602318, + -1.247062087059021, + 0.1605510115623474, + 0.08460354804992676, + 1.3674949407577515, + 0.16240207850933075, + 0.29395750164985657, + -0.029484810307621956, + 0.05966494604945183, + 1.5350801944732666, + 0.04272013530135155, + 0.3422525227069855, + -0.4201512336730957, + -0.43978598713874817, + -0.10772538185119629, + -0.8291482329368591, + 1.3479728698730469, + -0.5263103246688843, + -0.1543271541595459, + 0.05137256160378456, + -0.13015425205230713, + -0.0464957021176815, + -1.1109204292297363, + -0.06852405518293381, + 0.44947749376296997, + -0.12675446271896362, + -0.23201435804367065, + -0.8722343444824219, + 0.13632090389728546, + 0.42829659581184387 + ], + [ + 0.10801226645708084, + -0.28042709827423096, + -0.05393468588590622, + -1.2466132640838623, + 0.012950009666383266, + 0.05183418095111847, + 1.1851811408996582, + 0.02702324464917183, + 0.1687147468328476, + -0.08430074155330658, + -0.016934579238295555, + 1.1518510580062866, + 0.11950241774320602, + 0.34274834394454956, + -0.4311216175556183, + -0.37115564942359924, + -0.26661160588264465, + -0.6274175643920898, + 0.7608069777488708, + -0.29037779569625854, + -0.15813763439655304, + 0.027967583388090134, + 0.12113068997859955, + -0.04486895352602005, + -1.0113911628723145, + 0.06376635283231735, + 0.27066054940223694, + 0.06729330867528915, + -0.024270467460155487, + -0.5355405807495117, + 0.3877447247505188, + 0.19543693959712982 + ], + [ + -0.07762796431779861, + -0.1921011209487915, + -0.03895237296819687, + -0.8493082523345947, + -0.025061093270778656, + -0.025349918752908707, + 0.8707203269004822, + 0.37736791372299194, + 0.08553315699100494, + -0.17526037991046906, + -0.044884126633405685, + 1.2108454704284668, + 0.2718728482723236, + 0.19070672988891602, + -0.40706339478492737, + -0.42778775095939636, + -0.06590962409973145, + -0.5471310615539551, + 0.4580930769443512, + -0.7354713678359985, + 0.0439612902700901, + -0.07205488532781601, + -0.20977485179901123, + -0.2055625021457672, + -0.8882583379745483, + -0.07244822382926941, + 0.09563937038183212, + -0.07666153460741043, + 0.0033561682794243097, + -0.4559871256351471, + 0.08066937327384949, + 0.24053500592708588 + ], + [ + -0.13307124376296997, + -0.042326729744672775, + 0.040500909090042114, + -0.7215739488601685, + 0.08140784502029419, + -0.16152365505695343, + 0.978931725025177, + -0.07894943654537201, + 0.12221676856279373, + -0.12668195366859436, + -0.05192321166396141, + 0.9856858849525452, + 0.02705325186252594, + 0.3189965784549713, + -0.4038747549057007, + -0.24782444536685944, + 0.037708934396505356, + -0.20973166823387146, + 0.0929059237241745, + -0.466745525598526, + -0.0007588538574054837, + 0.15038476884365082, + -0.03921433910727501, + -0.17249399423599243, + -0.2746153175830841, + -0.0327167771756649, + 0.0569433756172657, + 0.17315183579921722, + -0.07756597548723221, + -0.23182980716228485, + 0.4091942310333252, + 0.32935699820518494 + ], + [ + 0.0010056779719889164, + 0.00017223706527147442, + 0.06751995533704758, + -0.38114452362060547, + -0.13378925621509552, + -0.03133080527186394, + 0.45208296179771423, + 0.40273088216781616, + 0.3384617567062378, + 0.15812502801418304, + -0.0021528275683522224, + 0.7823845148086548, + -0.01818712428212166, + -0.12505991756916046, + -0.11920782178640366, + -0.14382724463939667, + -0.21391405165195465, + 0.0467260517179966, + 0.3490385413169861, + -0.6308271288871765, + -0.05932697281241417, + -0.05205933377146721, + -0.11881677061319351, + -0.06319572776556015, + -0.27183887362480164, + -0.021437175571918488, + 0.07095760852098465, + -0.11136292666196823, + -0.14584526419639587, + -0.16393230855464935, + 0.032976847141981125, + -0.08320535719394684 + ], + [ + 0.023734474554657936, + -0.3168199360370636, + -0.016073793172836304, + -0.9030609726905823, + 0.04119814559817314, + -0.09399380534887314, + 0.9787577390670776, + 0.07024133950471878, + -0.023190297186374664, + -0.04113855957984924, + 0.08815838396549225, + 0.8052789568901062, + 0.08388077467679977, + 0.5825448632240295, + -0.22796209156513214, + -0.47085028886795044, + 0.15516626834869385, + -0.6408253312110901, + 0.31798601150512695, + -0.9602464437484741, + -0.008030841127038002, + -0.12295776605606079, + -0.16304311156272888, + -0.1183261051774025, + -0.050125397741794586, + -0.15394653379917145, + -0.3136257529258728, + -0.7199011445045471, + -0.2825005054473877, + -0.2750853896141052, + -0.020170260220766068, + 0.40137961506843567 + ] + ] + ] + ], + [ + -0.554452657699585, + 0.4535163640975952, + 1.3920046091079712, + 2.6810762882232666, + 1.898964285850525, + -0.9576305150985718, + -1.7349952459335327, + 0.1820012629032135, + 1.172502040863037, + 1.1686756610870361, + -0.4753027558326721, + -1.7965710163116455, + 1.2578811645507812, + 0.9688960909843445, + 1.7270870208740234, + -1.071925401687622, + 1.1399062871932983, + -1.5433635711669922, + -2.4327049255371094, + -0.3190879225730896, + -1.5639928579330444, + 1.304421067237854, + -1.0481361150741577, + 0.9942411184310913, + -2.2074806690216064, + 1.6903067827224731, + -0.036115214228630066, + -0.4054082930088043, + 0.6927939057350159, + -2.1582422256469727, + -0.9612119197845459, + 0.5788724422454834 + ] + ] + } + ] +} \ No newline at end of file diff --git a/model_data/cnn_onset_2_model.json b/model_data/cnn_onset_2_model.json new file mode 100644 index 0000000..7739962 --- /dev/null +++ b/model_data/cnn_onset_2_model.json @@ -0,0 +1,950 @@ +{ + "in_shape": [ + 1, + null, + 88, + 33 + ], + "layers": [ + { + "type": "conv2d", + "activation": "sigmoid", + "shape": [ + 1, + null, + 88, + 1 + ], + "kernel_size_time": 3, + "kernel_size_feature": 3, + "dilation": 1, + "strides": 1, + "num_filters_in": 33, + "num_features_in": 88, + "num_filters_out": 1, + "padding": "same", + "weights": [ + [ + [ + [ + [ + 0.029619259759783745 + ], + [ + 0.003604025347158313 + ], + [ + 0.03323238715529442 + ], + [ + 0.05663453787565231 + ], + [ + 0.05222143605351448 + ], + [ + 0.003889265237376094 + ], + [ + -0.020436357706785202 + ], + [ + 0.038425836712121964 + ], + [ + -0.03372349590063095 + ], + [ + 0.033551692962646484 + ], + [ + 0.0019456845475360751 + ], + [ + -0.004042146727442741 + ], + [ + -0.00012680985673796386 + ], + [ + -0.028087103739380836 + ], + [ + -0.039181750267744064 + ], + [ + -0.09790737926959991 + ], + [ + 0.030161600559949875 + ], + [ + 0.0161209087818861 + ], + [ + 0.05954240635037422 + ], + [ + -0.002274606842547655 + ], + [ + 0.03084123693406582 + ], + [ + 0.05161402374505997 + ], + [ + -0.019394416362047195 + ], + [ + 0.05399709939956665 + ], + [ + -0.019747303798794746 + ], + [ + -0.01198793575167656 + ], + [ + 0.009352544322609901 + ], + [ + -0.014560949057340622 + ], + [ + -0.016378868371248245 + ], + [ + -0.0584833025932312 + ], + [ + -0.07535823434591293 + ], + [ + 0.025234626606106758 + ], + [ + -0.01423961017280817 + ] + ], + [ + [ + 0.24009527266025543 + ], + [ + -0.02748076431453228 + ], + [ + 0.02732815034687519 + ], + [ + 0.07360173016786575 + ], + [ + -0.02111572027206421 + ], + [ + -0.07726837694644928 + ], + [ + -0.015140729025006294 + ], + [ + 0.04621383175253868 + ], + [ + -0.021509911864995956 + ], + [ + -0.04217614233493805 + ], + [ + -0.02931121177971363 + ], + [ + -0.013163563795387745 + ], + [ + -0.02090492472052574 + ], + [ + -0.04976015165448189 + ], + [ + 0.047729115933179855 + ], + [ + 0.012330548837780952 + ], + [ + -0.01831592619419098 + ], + [ + -0.05505986511707306 + ], + [ + 0.008266164921224117 + ], + [ + -0.019050801172852516 + ], + [ + -0.01697925291955471 + ], + [ + 0.0893247127532959 + ], + [ + -0.05563950538635254 + ], + [ + 0.0288397204130888 + ], + [ + -0.031366221606731415 + ], + [ + -0.10060587525367737 + ], + [ + -0.015078275464475155 + ], + [ + -0.018237916752696037 + ], + [ + 0.02393556572496891 + ], + [ + -0.039543215185403824 + ], + [ + 0.07984033972024918 + ], + [ + 0.011052779853343964 + ], + [ + -0.013022289611399174 + ] + ], + [ + [ + 0.018380844965577126 + ], + [ + -0.007653142791241407 + ], + [ + 0.03213290125131607 + ], + [ + 0.026461543515324593 + ], + [ + -0.0006714844494126737 + ], + [ + 0.005802706349641085 + ], + [ + 0.012416264973580837 + ], + [ + 0.02380133792757988 + ], + [ + -0.0084803132340312 + ], + [ + 0.010892920196056366 + ], + [ + 0.0058015636168420315 + ], + [ + -0.0032008958514779806 + ], + [ + 0.004013776779174805 + ], + [ + -0.014109397307038307 + ], + [ + 0.007791736163198948 + ], + [ + 0.009723225608468056 + ], + [ + 0.03575237840414047 + ], + [ + -0.0061295656487345695 + ], + [ + 0.045220863074064255 + ], + [ + -0.010183257982134819 + ], + [ + 0.009707151912152767 + ], + [ + -0.04111291095614433 + ], + [ + 0.0018075773259624839 + ], + [ + -0.03114478476345539 + ], + [ + -0.010931422933936119 + ], + [ + -0.020219091325998306 + ], + [ + 0.003832712071016431 + ], + [ + -0.017476486042141914 + ], + [ + 0.003982656169682741 + ], + [ + -0.01458861492574215 + ], + [ + 0.018215728923678398 + ], + [ + 0.01276887021958828 + ], + [ + -0.005162898916751146 + ] + ] + ], + [ + [ + [ + 0.022289156913757324 + ], + [ + 0.009230717085301876 + ], + [ + 0.03402344882488251 + ], + [ + 0.03692690283060074 + ], + [ + 0.08948439359664917 + ], + [ + 0.002459646202623844 + ], + [ + -0.03781338036060333 + ], + [ + -0.006490844301879406 + ], + [ + -0.015260049141943455 + ], + [ + 0.01247861236333847 + ], + [ + -0.03640824928879738 + ], + [ + -0.014480463229119778 + ], + [ + 0.04469229280948639 + ], + [ + -0.020555801689624786 + ], + [ + -0.03453211113810539 + ], + [ + -0.12208610028028488 + ], + [ + 0.01859663426876068 + ], + [ + -0.0008554028463549912 + ], + [ + 0.024995025247335434 + ], + [ + 0.012742570601403713 + ], + [ + 0.026150943711400032 + ], + [ + 0.04375866800546646 + ], + [ + -0.023449353873729706 + ], + [ + 0.00915711559355259 + ], + [ + -0.029468020424246788 + ], + [ + 0.05862440541386604 + ], + [ + -0.033476442098617554 + ], + [ + -0.035934001207351685 + ], + [ + -0.0036958088167011738 + ], + [ + -0.06678387522697449 + ], + [ + -0.06039731204509735 + ], + [ + 0.04551265016198158 + ], + [ + -0.016840804368257523 + ] + ], + [ + [ + 0.3512360155582428 + ], + [ + -0.04112149775028229 + ], + [ + 0.038147471845149994 + ], + [ + 0.043540023267269135 + ], + [ + -0.030814578756690025 + ], + [ + -0.11488520354032516 + ], + [ + -0.029034191742539406 + ], + [ + -0.013081854209303856 + ], + [ + -0.018614543601870537 + ], + [ + -0.06757228821516037 + ], + [ + -0.07493409514427185 + ], + [ + -0.02262847125530243 + ], + [ + 0.034807994961738586 + ], + [ + -0.06775157153606415 + ], + [ + 0.0709703266620636 + ], + [ + 0.010524180717766285 + ], + [ + -0.045610733330249786 + ], + [ + -0.07149282097816467 + ], + [ + 0.039878807961940765 + ], + [ + -0.0699450746178627 + ], + [ + -0.03218328207731247 + ], + [ + 0.0830877423286438 + ], + [ + -0.08588273078203201 + ], + [ + 0.04950792342424393 + ], + [ + -0.057015273720026016 + ], + [ + -0.1511801779270172 + ], + [ + -0.0691324770450592 + ], + [ + 0.013735144399106503 + ], + [ + 0.05962655320763588 + ], + [ + -0.034871216863393784 + ], + [ + 0.09287749230861664 + ], + [ + -0.0013269360642880201 + ], + [ + -0.03361208364367485 + ] + ], + [ + [ + -0.005243861116468906 + ], + [ + -0.014836051501333714 + ], + [ + 0.02640514262020588 + ], + [ + 0.02256111614406109 + ], + [ + -0.01601363532245159 + ], + [ + -0.01260481495410204 + ], + [ + 0.007468162104487419 + ], + [ + -0.000842115783598274 + ], + [ + -0.0010021697962656617 + ], + [ + 0.0014673923142254353 + ], + [ + -0.0031402953900396824 + ], + [ + -0.008550249971449375 + ], + [ + 0.013305878266692162 + ], + [ + -0.01920526847243309 + ], + [ + 0.0039015624206513166 + ], + [ + 0.002652887487784028 + ], + [ + 0.01773177832365036 + ], + [ + -0.013012228533625603 + ], + [ + 0.07562827318906784 + ], + [ + -0.019170274958014488 + ], + [ + 0.002964319195598364 + ], + [ + -0.041819535195827484 + ], + [ + -0.016641737893223763 + ], + [ + -0.03315851092338562 + ], + [ + -0.022573471069335938 + ], + [ + 0.02500460483133793 + ], + [ + -0.037567391991615295 + ], + [ + -0.002052377676591277 + ], + [ + 0.003923674114048481 + ], + [ + 0.0012632987927645445 + ], + [ + -0.0037196415942162275 + ], + [ + 0.029904864728450775 + ], + [ + -0.014024658128619194 + ] + ] + ], + [ + [ + [ + 0.03644957020878792 + ], + [ + 0.011588278226554394 + ], + [ + 0.02604282833635807 + ], + [ + 0.047486867755651474 + ], + [ + 0.130997896194458 + ], + [ + 0.023185662925243378 + ], + [ + -0.032108452171087265 + ], + [ + 0.051327183842659 + ], + [ + -0.017049312591552734 + ], + [ + -0.004583831410855055 + ], + [ + -0.032389044761657715 + ], + [ + -0.014481105841696262 + ], + [ + 0.1134050041437149 + ], + [ + 0.005636401940137148 + ], + [ + -0.027646219357848167 + ], + [ + -0.13573560118675232 + ], + [ + 0.011916090734302998 + ], + [ + -0.004351395647972822 + ], + [ + -0.009844012558460236 + ], + [ + 0.11543305218219757 + ], + [ + 0.021071655675768852 + ], + [ + -0.0002149916981579736 + ], + [ + 0.01237348560243845 + ], + [ + -0.015897467732429504 + ], + [ + -0.013315209187567234 + ], + [ + 0.10449302941560745 + ], + [ + -0.011237037368118763 + ], + [ + -0.04261191934347153 + ], + [ + -0.013800514861941338 + ], + [ + -0.037860993295907974 + ], + [ + -0.08314038068056107 + ], + [ + 0.07072032243013382 + ], + [ + -0.01573692262172699 + ] + ], + [ + [ + 0.452563613653183 + ], + [ + -0.036972686648368835 + ], + [ + 0.02156221494078636 + ], + [ + 0.03551863878965378 + ], + [ + -0.012486271560192108 + ], + [ + -0.12194753438234329 + ], + [ + -0.026304038241505623 + ], + [ + -0.06839510798454285 + ], + [ + -0.059574853628873825 + ], + [ + -0.07624702900648117 + ], + [ + -0.0464610792696476 + ], + [ + -0.02215738035738468 + ], + [ + 0.08859449625015259 + ], + [ + -0.050749946385622025 + ], + [ + 0.09414441883563995 + ], + [ + 0.026809005066752434 + ], + [ + -0.03952755406498909 + ], + [ + -0.06784122437238693 + ], + [ + 0.0631866529583931 + ], + [ + -0.09937144070863724 + ], + [ + -0.048646215349435806 + ], + [ + 0.05033298581838608 + ], + [ + -0.08980566263198853 + ], + [ + 0.11568523943424225 + ], + [ + -0.04850824549794197 + ], + [ + -0.23008699715137482 + ], + [ + -0.04406071826815605 + ], + [ + 0.035207122564315796 + ], + [ + 0.07972811162471771 + ], + [ + -0.011156006716191769 + ], + [ + 0.1132323294878006 + ], + [ + 0.006361722480505705 + ], + [ + -0.047375332564115524 + ] + ], + [ + [ + -0.004354607779532671 + ], + [ + -0.011762904934585094 + ], + [ + 0.01206930074840784 + ], + [ + 0.040622856467962265 + ], + [ + 0.0021851765923202038 + ], + [ + 0.006867991294711828 + ], + [ + 0.00498944241553545 + ], + [ + -0.01438653003424406 + ], + [ + 0.003170289099216461 + ], + [ + 0.003983920905739069 + ], + [ + 0.016393963247537613 + ], + [ + -0.008108914829790592 + ], + [ + 0.02757560834288597 + ], + [ + -0.0003816672833636403 + ], + [ + 0.013246352784335613 + ], + [ + 0.011240650899708271 + ], + [ + 0.015601377934217453 + ], + [ + -0.0069315871223807335 + ], + [ + 0.07104633748531342 + ], + [ + -0.0356980636715889 + ], + [ + -0.009930310770869255 + ], + [ + -0.04277143254876137 + ], + [ + -0.004996682517230511 + ], + [ + -0.023285720497369766 + ], + [ + 0.004121796227991581 + ], + [ + 0.07024645060300827 + ], + [ + -0.018844574689865112 + ], + [ + 0.009226424619555473 + ], + [ + 0.009908956475555897 + ], + [ + 0.030665036290884018 + ], + [ + -0.05489335209131241 + ], + [ + 0.018782397732138634 + ], + [ + -0.020496457815170288 + ] + ] + ] + ], + [ + -0.36014845967292786 + ] + ] + } + ] +} \ No newline at end of file diff --git a/model_data/features_model.onnx b/model_data/features_model.onnx new file mode 100644 index 0000000..7c82b7a Binary files /dev/null and b/model_data/features_model.onnx differ diff --git a/model_data/features_model.ort b/model_data/features_model.ort new file mode 100644 index 0000000..3fcd20d Binary files /dev/null and b/model_data/features_model.ort differ diff --git a/src/detector.rs b/src/detector.rs new file mode 100644 index 0000000..a8bb8c3 --- /dev/null +++ b/src/detector.rs @@ -0,0 +1,142 @@ +use std::ffi::c_void; + +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct NoteEvent { + start_time: f64, + end_time: f64, + midi_note: i32, + amplitude: f64, +} + +pub struct PitchDetector { + raw_detector: *mut PitchDetectorHandle, +} + +impl Drop for PitchDetector { + fn drop(&mut self) { + unsafe { pitch_detector_destroy(self.raw_detector) }; + } +} + +impl PitchDetector { + pub fn new() -> Self { + let features_model_ort = + BinaryFile::from_bytes(include_bytes!("../model_data/features_model.ort")); + let cnn_contour_model_json = + BinaryFile::from_bytes(include_bytes!("../model_data/cnn_contour_model.json")); + let cnn_note_model_json = + BinaryFile::from_bytes(include_bytes!("../model_data/cnn_note_model.json")); + let cnn_onset_1_model_json = + BinaryFile::from_bytes(include_bytes!("../model_data/cnn_onset_1_model.json")); + let cnn_onset_2_model_json = + BinaryFile::from_bytes(include_bytes!("../model_data/cnn_onset_2_model.json")); + + let model_files = ModelFiles { + features_model_ort, + cnn_contour_model_json, + cnn_note_model_json, + cnn_onset_1_model_json, + cnn_onset_2_model_json, + }; + + Self { + raw_detector: unsafe { pitch_detector_create(model_files) }, + } + } + + pub fn reset(&mut self) { + unsafe { + pitch_detector_reset(self.raw_detector); + } + } + + pub fn note_events(&self) -> Vec { + unsafe { + let mut events_ptr: *mut NoteEvent = std::ptr::null_mut(); + let mut num_events: i32 = 0; + pitch_detector_get_note_events(self.raw_detector, &mut events_ptr, &mut num_events); + Vec::from_raw_parts(events_ptr, num_events as _, num_events as _) + } + } + + pub fn transcribe_to_midi(&mut self, audio: &[f32]) { + unsafe { + let raw_audio_ptr = audio.as_ptr(); + let num_samples = audio.len() as i32; + pitch_detector_transcribe_to_midi(self.raw_detector, raw_audio_ptr, num_samples); + } + } + + pub fn set_parameters( + &mut self, + note_sensibility: f32, + split_sensibility: f32, + min_note_duration_ms: f32, + ) { + unsafe { + pitch_detector_set_parameters( + self.raw_detector, + note_sensibility, + split_sensibility, + min_note_duration_ms, + ); + } + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +struct BinaryFile { + data: *const u8, + num_bytes: usize, +} + +impl BinaryFile { + pub fn from_bytes(bytes: &[u8]) -> Self { + Self { + data: bytes.as_ptr(), + num_bytes: bytes.len(), + } + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +struct ModelFiles { + features_model_ort: BinaryFile, + cnn_contour_model_json: BinaryFile, + cnn_note_model_json: BinaryFile, + cnn_onset_1_model_json: BinaryFile, + cnn_onset_2_model_json: BinaryFile, +} + +#[repr(C)] +struct PitchDetectorHandle(c_void); + +extern "C" { + fn pitch_detector_create(model_files: ModelFiles) -> *mut PitchDetectorHandle; + + fn pitch_detector_reset(detector: *mut PitchDetectorHandle); + + fn pitch_detector_set_parameters( + detector: *mut PitchDetectorHandle, + note_sensibility: f32, + split_sensibility: f32, + min_note_duration_ms: f32, + ); + + fn pitch_detector_transcribe_to_midi( + detector: *mut PitchDetectorHandle, + audio: *const f32, + num_samples: i32, + ); + + fn pitch_detector_get_note_events( + detector: *mut PitchDetectorHandle, + out_events: *mut *mut NoteEvent, + out_num_events: *mut i32, + ); + + fn pitch_detector_destroy(pitch_detector: *mut PitchDetectorHandle); +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..e08e35c --- /dev/null +++ b/src/lib.rs @@ -0,0 +1 @@ +pub mod detector; \ No newline at end of file