hyperverse 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hyperdrone/__init__.py +31 -0
- hyperdrone/_native/cmake/hyperdrone_jit.cmake +65 -0
- hyperdrone/_native/common/bindings.h +39 -0
- hyperdrone/_native/common/cuda_staging.h +75 -0
- hyperdrone/_native/common/jit_host.h +69 -0
- hyperdrone/_native/common/models.h +24 -0
- hyperdrone/_native/dynamics/CMakeLists.txt +61 -0
- hyperdrone/_native/dynamics/host.cpp +193 -0
- hyperdrone/_native/dynamics/iface.h +76 -0
- hyperdrone/_native/dynamics/impl.cpp +608 -0
- hyperdrone/_native/env/CMakeLists.txt +71 -0
- hyperdrone/_native/env/environment.cpp +124 -0
- hyperdrone/_native/env/environment.h +407 -0
- hyperdrone/_native/env/rotorcraft_bindings.cpp +51 -0
- hyperdrone/_native/render/CMakeLists.txt +94 -0
- hyperdrone/_native/render/renderer.cpp +962 -0
- hyperdrone/_native/render/rig_bindings.h +151 -0
- hyperdrone/_native/render/scene_bindings.cpp +466 -0
- hyperdrone/_vendor/rl-tools/CMakeLists.txt +205 -0
- hyperdrone/_vendor/rl-tools/LICENSE +21 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/all.cmake +34 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-diff.cmake +100 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-hash.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/summary.cmake +64 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier0-compiler.cmake +18 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier1-blas.cmake +51 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier2-json-hdf5-zlib.cmake +81 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier3-tensorboard.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier4-cuda.cmake +42 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier5-cli11.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/dependencies/assimp.cmake +19 -0
- hyperdrone/_vendor/rl-tools/cmake/legacy_flags.cmake +33 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/assimp.cmake +30 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/googletest.cmake +20 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/metal.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/mujoco.cmake +89 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/optix.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/raytracing.cmake +105 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/raytracing_generic.cmake +2 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/vulkan.cmake +4 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/webgpu.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/scripts/embed_text.cmake +7 -0
- hyperdrone/_vendor/rl-tools/cmake/scripts/generate-git-snapshot.cmake +138 -0
- hyperdrone/_vendor/rl-tools/include/conta/conta.h +1161 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/matrix.h +143 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_arm.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu.h +314 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_accelerate.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_blas.h +67 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_mkl.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_openblas.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cuda.h +289 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_dummy.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_esp32.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_generic.h +944 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_wasm32.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/persist_code.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_arm.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu.h +94 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_accelerate.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_blas.h +115 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_mkl.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_openblas.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cuda.h +713 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_generic.h +1356 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/persist_code.h +130 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/tensor.h +490 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/arm.h +91 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu.h +209 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_accelerate.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_blas.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_mkl.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_openblas.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_tensorboard.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cuda.h +415 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/devices.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/dummy.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/esp32.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/generic.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/wasm32.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/model.h +218 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/operations_generic.h +769 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/persist.h +278 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter.h +100 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter_persist.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/tensor_operations_generic.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_backend.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_interface.h +36 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/l2f.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_dyn.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_generic.h +268 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_backend.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_interface.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_backend.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_interface.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/executor.h +133 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/helper.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/operations_generic.h +219 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arduino.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arm.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu_tensorboard.h +151 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cuda.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_dummy.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_wasm32.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_arm.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cpu.h +138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cuda.h +380 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_dummy.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_esp32.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_generic.h +295 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_wasm32.h +230 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/mode/mode.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/activation_functions.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/capability.h +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/persist_code.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/group.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/layer.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_cuda.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_generic.h +186 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/persist.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/layer.h +300 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cpu_mkl.h +590 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cuda.h +809 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_generic.h +1219 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist_code.h +170 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/layer.h +145 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/dsp.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/opt.h +173 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_accelerate.h +66 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_blas.h +282 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_mkl.h +66 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_openblas.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cuda.h +519 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_dummy.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/dsp.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/opt.h +167 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_generic.h +429 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist.h +62 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_code.h +178 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_common.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/layer.h +188 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_cuda.h +356 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_generic.h +536 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/persist.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/layer.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/operations_generic.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/persist.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/layer.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/operations_generic.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist_code.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_cuda.h +602 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_generic.h +251 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/layer.h +206 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/operations_generic.h +889 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist.h +75 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist_code.h +199 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/layers.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/layer.h +143 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_cuda.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_generic.h +216 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/persist.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_blas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_mkl.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_openblas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cuda.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_generic.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/layer.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_cuda.h +138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_generic.h +446 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/persist.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/layer.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_cuda.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_generic.h +502 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist_code.h +173 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/layer.h +116 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_cuda.h +156 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_generic.h +295 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist.h +83 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist_code.h +163 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/layer.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/operations_generic.h +272 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist_code.h +164 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/layer.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_cuda.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_generic.h +160 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist_code.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/layer.h +132 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_cuda.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_generic.h +230 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/categorical_cross_entropy/operations_generic.h +102 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_cuda.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_generic.h +101 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/operations_generic.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/nn.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_blas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mux.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_openblas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cuda.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_generic.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/adam.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_cuda.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_generic.h +150 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist_code.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_cuda.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_generic.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/persist.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/instance/operations_generic.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/lamb.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/operations_generic.h +68 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/optimizers.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_cuda.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_generic.h +140 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist_code.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_cuda.h +49 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_generic.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/sgd.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/update.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_cuda.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_generic.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/parameters.h +79 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist_code.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist_code.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/behaviors/skip_parameter_gradients.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/README.md +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/model.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/persist_code.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/network.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_cuda.h +10 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_dummy.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_generic.h +407 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist_code.h +137 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/network.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/operations_generic.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist_code.h +142 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/models.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/model.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/operations_generic.h +288 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist_code.h +71 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cpu.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cuda.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_generic.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/model.h +290 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_cuda.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_generic.h +623 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist_code.h +200 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist_code.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/model.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/operations_generic.h +73 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/resnet/resnet.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/model.h +270 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/operations_generic.h +625 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist_code.h +115 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/bf16.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/categories.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/persist_code.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/policy.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_1.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_2.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_3.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_1.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_1.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mux.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_1.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_1.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_3.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_1.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/hdf5.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/operations_cpu.h +419 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/io.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_cpu.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_generic.h +620 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_posix.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/tar.h +74 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/code.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_arm.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cpu.h +81 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cuda.h +169 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_dummy.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_esp32.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic.h +133 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic_array.h +73 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_wasm32.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/persist.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/camera.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/cache.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/free_space.h +60 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/operations_cpu.h +408 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/glb/operations_cpu.h +1313 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/operations_cpu.h +96 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/conversion.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/operations_cpu.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/procthor.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_cpu.h +733 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_generic.h +1299 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/context.h +198 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/device_source.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/operations_cpu.h +1140 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device.h +233 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device_impl.h +1084 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/operations_cuda.h +1808 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/overlay_accel.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/specialization.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/context.h +248 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/device_source.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/operations_cpu.h +2056 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/bvh_sah.h +182 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/context.h +303 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/device_source.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/operations_cpu.h +1455 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_common.h +916 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_mux.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_post.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/renderer.h +478 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/save_cpu.h +315 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/transforms_generic.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/types.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_cpu.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_generic.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/rig.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/scene.h +134 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/segmentation_cpu.h +145 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/transforms.h +204 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/types.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/algorithms.h +6 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_generic.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/config.h +243 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_cuda.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_generic.h +205 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/persist.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/state.h +51 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/mixed_imitation.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_cuda.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic.h +332 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic_mixed_imitation.h +81 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/persist.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/ppo.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_gru.h +84 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_mlp.h +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/config.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/operations_generic.h +193 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/state.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_accelerate.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mkl.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mux.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cuda.h +131 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_generic.h +580 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/sac.h +151 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_gru.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_mlp.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/config.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/operations_generic.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/state.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_accelerate.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mkl.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mux.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cuda.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_generic.h +359 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/td3.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/components.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/off_policy_runner.h +225 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu.h +95 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_accelerate.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_mkl.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cuda.h +237 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic.h +498 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic_per_env.h +112 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/collection.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/on_policy_runner.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_accelerate.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mkl.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mux.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cuda.h +183 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic.h +366 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic_common.h +74 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/persist.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_generic.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_generic.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/persist.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/replay_buffer.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/operations_generic.h +76 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/persist.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/running_normalizer.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/operations_generic.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/operations_generic.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/wrapper.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/wrappers.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/acrobot.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_cpu.h +152 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_generic.h +202 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/environment.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_cuda.h +204 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic_common.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/persist.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/car.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_cpu.h +110 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_generic.h +206 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_json.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/track.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/ui.h +189 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/environments.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/environment.h +87 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_cpu.h +212 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_generic.h +215 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/observation.h +75 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cpu.h +938 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cuda.h +380 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/pose.h +228 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/presets.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_cpu.h +189 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_generic.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/rig.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/moving_gate.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cpu.h +262 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cuda.h +254 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cpu.h +224 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cuda.h +218 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_generic_position_hold.h +128 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/position_hold.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/target_frame.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/autopilot.h +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/baseline.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/calibration.h +62 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/metrics.h +101 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/operations_cpu.h +389 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/visual_inertial_localization.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/world.h +318 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/inertial_velocity.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/metrics.h +266 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/multirotor.h +1138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_cpu.h +2246 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/05_state_is_nan.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/10_sample_initial_parameters.h +228 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/20_initial_state.h +208 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/30_sample_initial_state.h +300 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/35_get_desired_state.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/40_observe.h +637 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/50_state_algebra.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/60_dynamics.h +134 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/70_post_integration.h +368 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/80_abs_diff.h +312 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic.h +367 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic_inertial_velocity.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_helper_generic.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic_forward.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/default.h +209 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/arpl.h +112 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie.h +127 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie_openmv.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/flightmare.h +111 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/fs.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/mrs.h +110 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft_rigid.h +118 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_real.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_sim.h +114 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/init/default.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/registry.h +96 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/default.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/reward_functions.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/operations_generic.h +202 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/squared.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/termination/default.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/lissajous.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/trajectory.h +78 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist_code.h +53 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/quaternion_helper.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/ui.h +180 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/environment.h +69 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_cpu.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_generic.h +78 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/README.MD +5 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ant.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/model.h +415 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/operations_cpu.h +162 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/persist.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ui.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/mujoco.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/bottleneck.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_cpu.h +289 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_generic.h +495 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/environments.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/observation.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_generic.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_cpu.h +146 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_generic.h +262 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/pendulum.h +197 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui_xeus.h +124 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_cpu.h +426 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_generic.h +424 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/reacher.h +137 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/loop.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/config.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/operations_cpu.h +233 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/persist.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/state.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/config.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/operations_generic.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/state.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/config.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/operations_generic.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/persist.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/state.h +36 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/config.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/operations_cpu.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/state.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/config.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/operations_cpu.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/state.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/config.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/operations_cpu.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/persist.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/state.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/steps.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/config.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/operations_cpu.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/state.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/operations_generic.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/rl.h +5 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/evaluation.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_cpu.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_generic.h +275 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation.h +269 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation_analysis.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl_tools.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/client.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_boost.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_cpu.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_websocket.h +208 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/server.h +448 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/universe.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/declarations_cpu.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_arm.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cuda.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_dummy.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_esp32.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_generic.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_wasm32.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_cpu.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_generic.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/extrack.h +129 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/operations_cpu.h +588 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/integrators.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/memcpy.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/operations_generic.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/tuple.h +147 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/typing.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/vector_operations.h +172 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_cuda.h +53 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_generic.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/string/operations_generic.h +201 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/zlib/operations_cpu.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/version.h +28 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/CMakeLists.txt +15 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/README.md +193 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/CMakeLists.txt +11 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/CMakeLists.txt +17 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/freestanding_check.cpp +135 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/CMakeLists.txt +31 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/device.metal +953 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/metal_cpp_impl.cpp +6 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/CMakeLists.txt +51 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/device.cu +1 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/overlay_accel.cu +311 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/CMakeLists.txt +37 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device.comp +1013 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device_spirv.cpp +44 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/CMakeLists.txt +31 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/device.wgsl +1448 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/CMakeLists.txt +110 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/README.md +55 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark.cpp +180 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark_dynamic.cpp +491 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/rig.cpp +119 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.cpp +1130 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_config.h.in +13 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/camera_orbit.h +51 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/CMakeLists.txt +199 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/antialiasing.cpp +214 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone.cpp +320 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone_device.cu +359 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/environment.h +96 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/operations_cpu.h +263 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/example.cpp +273 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/fixed_pose.cpp +221 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/flow.cpp +120 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/interactive.cpp +1015 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/make_drone_glb.py +172 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal.cpp +82 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal_overlay.cpp +137 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/motion_blur.cpp +232 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace.cpp +1829 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace_motion_blur.cpp +647 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/web/assimp/CMakeLists.txt +8 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/web/build.sh +80 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/web/drone_web.cpp +234 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/CMakeLists.txt +147 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/README.md +15 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/job.sbatch +28 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model.h +260 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_config.h +24 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_forward_cuda.h +397 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_operations.h +418 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_persist.h +45 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_student.h +70 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.cpp +222 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.h +68 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/.gitignore +4 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/CMakeLists.txt +4 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info.plist +24 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info_ios.plist +36 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/CameraManager.swift +120 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/ContentView.swift +703 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/DatasetRecorder.swift +285 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/YawPredictorApp.swift +25 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/YawPredictor.entitlements +8 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build.sh +66 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build_ios.sh +133 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/generate.sh +6 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/h5_to_tar.cpp +82 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.cpp +166 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.h +26 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/project.yml +30 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/test_tar_vs_hdf5.cpp +173 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_cuda.cu +699 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_dataset_overlay.cpp +475 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_distill_cuda.cu +995 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_eval.cu +457 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_real_world_eval.cpp +660 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_viewer.cu +443 -0
- hyperdrone/cuda/__init__.py +78 -0
- hyperdrone/dynamics/__init__.py +22 -0
- hyperdrone/dynamics/_component.py +35 -0
- hyperdrone/dynamics/_config.py +48 -0
- hyperdrone/dynamics/_sim.py +195 -0
- hyperdrone/env/__init__.py +17 -0
- hyperdrone/env/_multi_environment.py +407 -0
- hyperdrone/env/_rotorcraft.py +31 -0
- hyperdrone/examples/.gitignore +2 -0
- hyperdrone/examples/Benchmark.ipynb +102 -0
- hyperdrone/examples/HyperDrone.ipynb +514 -0
- hyperdrone/examples/Orbiter.ipynb +462 -0
- hyperdrone/examples/Renderer.ipynb +173 -0
- hyperdrone/examples/__init__.py +16 -0
- hyperdrone/examples/articulation.py +55 -0
- hyperdrone/examples/benchmark.py +236 -0
- hyperdrone/examples/benchmark_minimal.py +65 -0
- hyperdrone/examples/data.py +70 -0
- hyperdrone/examples/drone_flythrough.py +169 -0
- hyperdrone/examples/hyperdrone_videos/my_world_preview.h +17 -0
- hyperdrone/examples/my_world.h +17 -0
- hyperdrone/examples/render_procthor.py +41 -0
- hyperdrone/examples/visual_inertial_localization.py +159 -0
- hyperdrone/gym/__init__.py +63 -0
- hyperdrone/jit/__init__.py +129 -0
- hyperdrone/jit/_build.py +113 -0
- hyperdrone/jit/_lock.py +23 -0
- hyperdrone/jit/_patches.py +99 -0
- hyperdrone/jit/_toolchain.py +17 -0
- hyperdrone/jit/_workspace.py +68 -0
- hyperdrone/render/__init__.py +53 -0
- hyperdrone/render/_component.py +51 -0
- hyperdrone/render/_config.py +92 -0
- hyperdrone/render/_renderer.py +447 -0
- hyperdrone/render/_rig.py +136 -0
- hyperdrone/render/_sampling.py +69 -0
- hyperdrone/render/_scene.py +36 -0
- hyperverse-0.0.1.dist-info/METADATA +370 -0
- hyperverse-0.0.1.dist-info/RECORD +746 -0
- hyperverse-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_UNFLATTEN_LAYER_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_UNFLATTEN_LAYER_H
|
|
5
|
+
#include "../../../utils/generic/typing.h"
|
|
6
|
+
#include "../../../containers/tensor/tensor.h"
|
|
7
|
+
#include "../../../nn/capability/capability.h"
|
|
8
|
+
#include "../../../nn/parameters/parameters.h"
|
|
9
|
+
|
|
10
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
11
|
+
namespace rl_tools::nn::layers::unflatten {
|
|
12
|
+
|
|
13
|
+
template<typename T_TYPE_POLICY, typename T_TI, T_TI T_HEIGHT, T_TI T_WIDTH, T_TI T_CHANNELS>
|
|
14
|
+
struct Configuration{
|
|
15
|
+
using TYPE_POLICY = T_TYPE_POLICY;
|
|
16
|
+
using TI = T_TI;
|
|
17
|
+
static constexpr TI HEIGHT = T_HEIGHT;
|
|
18
|
+
static constexpr TI WIDTH = T_WIDTH;
|
|
19
|
+
static constexpr TI CHANNELS = T_CHANNELS;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
template <typename T_CONFIG, typename T_CAPABILITY, typename T_INPUT_SHAPE>
|
|
23
|
+
struct Specification: T_CAPABILITY, T_CONFIG{
|
|
24
|
+
using CONFIG = T_CONFIG;
|
|
25
|
+
using TYPE_POLICY = typename CONFIG::TYPE_POLICY;
|
|
26
|
+
using TI = typename CONFIG::TI;
|
|
27
|
+
using CAPABILITY = T_CAPABILITY;
|
|
28
|
+
using INPUT_SHAPE = T_INPUT_SHAPE;
|
|
29
|
+
static constexpr TI HEIGHT = CONFIG::HEIGHT;
|
|
30
|
+
static constexpr TI WIDTH = CONFIG::WIDTH;
|
|
31
|
+
static constexpr TI CHANNELS = CONFIG::CHANNELS;
|
|
32
|
+
static constexpr TI INPUT_DIM = HEIGHT * WIDTH * CHANNELS;
|
|
33
|
+
static_assert(length(INPUT_SHAPE{}) >= 2, "Unflatten input shape must have at least 2 dimensions (...BATCH x H*W*C)");
|
|
34
|
+
static_assert(get_last(INPUT_SHAPE{}) == INPUT_DIM, "Unflatten: last input dimension must equal H*W*C");
|
|
35
|
+
|
|
36
|
+
using BATCH_SHAPE = tensor::PopBack<INPUT_SHAPE>;
|
|
37
|
+
static constexpr TI INTERNAL_BATCH_SIZE = get<0>(tensor::CumulativeProduct<BATCH_SHAPE>{});
|
|
38
|
+
|
|
39
|
+
// Output shape: (...BATCH, H, W, C)
|
|
40
|
+
template <typename NEW_INPUT_SHAPE>
|
|
41
|
+
struct OUTPUT_SHAPE_FACTORY{
|
|
42
|
+
static_assert(length(NEW_INPUT_SHAPE{}) >= 2);
|
|
43
|
+
static_assert(get_last(NEW_INPUT_SHAPE{}) == INPUT_DIM);
|
|
44
|
+
using NEW_BATCH_SHAPE = tensor::PopBack<NEW_INPUT_SHAPE>;
|
|
45
|
+
using SHAPE = tensor::Append<tensor::Append<tensor::Append<NEW_BATCH_SHAPE, HEIGHT>, WIDTH>, CHANNELS>;
|
|
46
|
+
};
|
|
47
|
+
using OUTPUT_SHAPE = typename OUTPUT_SHAPE_FACTORY<INPUT_SHAPE>::SHAPE;
|
|
48
|
+
static constexpr TI NUM_WEIGHTS = 0;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
template<typename SPEC_1, typename SPEC_2>
|
|
52
|
+
constexpr bool check_spec_memory =
|
|
53
|
+
SPEC_1::HEIGHT == SPEC_2::HEIGHT
|
|
54
|
+
&& SPEC_1::WIDTH == SPEC_2::WIDTH
|
|
55
|
+
&& SPEC_1::CHANNELS == SPEC_2::CHANNELS;
|
|
56
|
+
|
|
57
|
+
template<typename SPEC_1, typename SPEC_2>
|
|
58
|
+
constexpr bool check_spec = check_spec_memory<SPEC_1, SPEC_2>;
|
|
59
|
+
|
|
60
|
+
template <typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC>
|
|
61
|
+
constexpr bool check_input_output =
|
|
62
|
+
length(typename INPUT_SPEC::SHAPE{}) >= 2 &&
|
|
63
|
+
length(typename OUTPUT_SPEC::SHAPE{}) >= 4 &&
|
|
64
|
+
get_last(typename INPUT_SPEC::SHAPE{}) == LAYER_SPEC::INPUT_DIM &&
|
|
65
|
+
get<length(typename OUTPUT_SPEC::SHAPE{})-3>(typename OUTPUT_SPEC::SHAPE{}) == LAYER_SPEC::HEIGHT &&
|
|
66
|
+
get<length(typename OUTPUT_SPEC::SHAPE{})-2>(typename OUTPUT_SPEC::SHAPE{}) == LAYER_SPEC::WIDTH &&
|
|
67
|
+
get_last(typename OUTPUT_SPEC::SHAPE{}) == LAYER_SPEC::CHANNELS;
|
|
68
|
+
|
|
69
|
+
struct State{};
|
|
70
|
+
struct Buffer{};
|
|
71
|
+
|
|
72
|
+
template<typename T_SPEC>
|
|
73
|
+
struct LayerForward {
|
|
74
|
+
using SPEC = T_SPEC;
|
|
75
|
+
using TYPE_POLICY = typename SPEC::TYPE_POLICY;
|
|
76
|
+
using TI = typename SPEC::TI;
|
|
77
|
+
static constexpr TI HEIGHT = SPEC::HEIGHT;
|
|
78
|
+
static constexpr TI WIDTH = SPEC::WIDTH;
|
|
79
|
+
static constexpr TI CHANNELS = SPEC::CHANNELS;
|
|
80
|
+
static constexpr TI INPUT_DIM = SPEC::INPUT_DIM;
|
|
81
|
+
static constexpr TI NUM_WEIGHTS = SPEC::NUM_WEIGHTS;
|
|
82
|
+
static constexpr TI INTERNAL_BATCH_SIZE = SPEC::INTERNAL_BATCH_SIZE;
|
|
83
|
+
using INPUT_SHAPE = typename SPEC::INPUT_SHAPE;
|
|
84
|
+
template <typename NEW_INPUT_SHAPE>
|
|
85
|
+
using OUTPUT_SHAPE_FACTORY = typename SPEC::template OUTPUT_SHAPE_FACTORY<NEW_INPUT_SHAPE>::SHAPE;
|
|
86
|
+
using OUTPUT_SHAPE = typename SPEC::OUTPUT_SHAPE;
|
|
87
|
+
template<bool DYNAMIC_ALLOCATION=true>
|
|
88
|
+
using Buffer = unflatten::Buffer;
|
|
89
|
+
template<bool DYNAMIC_ALLOCATION=true>
|
|
90
|
+
using State = unflatten::State;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
template<typename SPEC>
|
|
94
|
+
struct LayerBackward: public LayerForward<SPEC>{};
|
|
95
|
+
|
|
96
|
+
template<typename SPEC>
|
|
97
|
+
struct LayerGradient: public LayerBackward<SPEC>{
|
|
98
|
+
using T = typename SPEC::TYPE_POLICY::template GET<numeric_types::categories::Activation>;
|
|
99
|
+
using TI = typename SPEC::TI;
|
|
100
|
+
using OUTPUT_CONTAINER_SHAPE = tensor::Shape<TI, SPEC::INTERNAL_BATCH_SIZE, SPEC::HEIGHT, SPEC::WIDTH, SPEC::CHANNELS>;
|
|
101
|
+
using OUTPUT_CONTAINER_SPEC = tensor::Specification<T, TI, OUTPUT_CONTAINER_SHAPE, SPEC::DYNAMIC_ALLOCATION, tensor::RowMajorStride<OUTPUT_CONTAINER_SHAPE>, SPEC::CONST>;
|
|
102
|
+
using OUTPUT_CONTAINER_TYPE = Tensor<OUTPUT_CONTAINER_SPEC>;
|
|
103
|
+
OUTPUT_CONTAINER_TYPE output;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
template<typename CONFIG, typename CAPABILITY, typename INPUT_SHAPE>
|
|
107
|
+
using Layer =
|
|
108
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Forward,
|
|
109
|
+
LayerForward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
110
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Backward,
|
|
111
|
+
LayerBackward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
112
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Gradient,
|
|
113
|
+
LayerGradient<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>, void>>>;
|
|
114
|
+
|
|
115
|
+
template <typename CONFIG>
|
|
116
|
+
struct BindConfiguration{
|
|
117
|
+
template <typename CAPABILITY, typename INPUT_SHAPE>
|
|
118
|
+
using Layer = nn::layers::unflatten::Layer<CONFIG, CAPABILITY, INPUT_SHAPE>;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
122
|
+
#endif
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_UNFLATTEN_OPERATIONS_CUDA_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_UNFLATTEN_OPERATIONS_CUDA_H
|
|
5
|
+
#include "layer.h"
|
|
6
|
+
#include <cuda_runtime.h>
|
|
7
|
+
|
|
8
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
9
|
+
namespace rl_tools{
|
|
10
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
11
|
+
void evaluate(devices::CUDA<DEV_SPEC>& device, const nn::layers::unflatten::LayerForward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer&, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
12
|
+
static_assert(nn::layers::unflatten::check_input_output<LAYER_SPEC, INPUT_SPEC, OUTPUT_SPEC>);
|
|
13
|
+
static_assert(tensor::dense_row_major_layout<INPUT_SPEC>(), "Unflatten requires contiguous row-major input");
|
|
14
|
+
static_assert(tensor::dense_row_major_layout<OUTPUT_SPEC>(), "Unflatten requires contiguous row-major output");
|
|
15
|
+
using T = typename INPUT_SPEC::T;
|
|
16
|
+
constexpr auto TOTAL = product(typename INPUT_SPEC::SHAPE{});
|
|
17
|
+
cudaMemcpyAsync(data(output), data(input), TOTAL * sizeof(T), cudaMemcpyDeviceToDevice, device.stream);
|
|
18
|
+
}
|
|
19
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
20
|
+
void evaluate_step(devices::CUDA<DEV_SPEC>& device, const nn::layers::unflatten::LayerForward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, nn::layers::unflatten::State& state, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
21
|
+
evaluate(device, layer, input, output, buffer, rng, mode);
|
|
22
|
+
}
|
|
23
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
24
|
+
void forward(devices::CUDA<DEV_SPEC>& device, nn::layers::unflatten::LayerBackward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
25
|
+
evaluate(device, static_cast<const nn::layers::unflatten::LayerForward<LAYER_SPEC>&>(layer), input, output, buffer, rng, mode);
|
|
26
|
+
}
|
|
27
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
28
|
+
void forward(devices::CUDA<DEV_SPEC>& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
29
|
+
nn::layers::unflatten::Buffer buf;
|
|
30
|
+
forward(device, static_cast<nn::layers::unflatten::LayerBackward<LAYER_SPEC>&>(layer), input, layer.output, buf, rng, mode);
|
|
31
|
+
}
|
|
32
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
33
|
+
void forward(devices::CUDA<DEV_SPEC>& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
34
|
+
forward(device, layer, input, buffer, rng, mode);
|
|
35
|
+
copy(device, device, layer.output, output);
|
|
36
|
+
}
|
|
37
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename MODE = mode::Default<>>
|
|
38
|
+
void backward_input(devices::CUDA<DEV_SPEC>& device, const nn::layers::unflatten::LayerBackward<LAYER_SPEC>& layer, const Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn::layers::unflatten::Buffer&, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
39
|
+
static_assert(nn::layers::unflatten::check_input_output<LAYER_SPEC, D_INPUT_SPEC, D_OUTPUT_SPEC>);
|
|
40
|
+
static_assert(tensor::dense_row_major_layout<D_OUTPUT_SPEC>(), "Unflatten requires contiguous row-major d_output");
|
|
41
|
+
static_assert(tensor::dense_row_major_layout<D_INPUT_SPEC>(), "Unflatten requires contiguous row-major d_input");
|
|
42
|
+
using T = typename D_INPUT_SPEC::T;
|
|
43
|
+
constexpr auto TOTAL = product(typename D_INPUT_SPEC::SHAPE{});
|
|
44
|
+
cudaMemcpyAsync(data(d_input), data(d_output), TOTAL * sizeof(T), cudaMemcpyDeviceToDevice, device.stream);
|
|
45
|
+
}
|
|
46
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename MODE = mode::Default<>>
|
|
47
|
+
void backward(devices::CUDA<DEV_SPEC>& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, nn::layers::unflatten::Buffer&, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
48
|
+
}
|
|
49
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename MODE = mode::Default<>>
|
|
50
|
+
void backward_full(devices::CUDA<DEV_SPEC>& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn::layers::unflatten::Buffer& buffer, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
51
|
+
backward_input(device, static_cast<const nn::layers::unflatten::LayerBackward<LAYER_SPEC>&>(layer), d_output, d_input, buffer, mode);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
55
|
+
#endif
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_UNFLATTEN_OPERATIONS_GENERIC_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_UNFLATTEN_OPERATIONS_GENERIC_H
|
|
5
|
+
#include "layer.h"
|
|
6
|
+
#include "../../../rl_tools.h"
|
|
7
|
+
|
|
8
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
9
|
+
namespace rl_tools{
|
|
10
|
+
// ======================== malloc / free ========================
|
|
11
|
+
template<typename DEVICE, typename SPEC>
|
|
12
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer) {}
|
|
13
|
+
template<typename DEVICE, typename SPEC>
|
|
14
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer) {}
|
|
15
|
+
template<typename DEVICE, typename SPEC>
|
|
16
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::unflatten::LayerBackward<SPEC>& layer) {}
|
|
17
|
+
template<typename DEVICE, typename SPEC>
|
|
18
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::unflatten::LayerBackward<SPEC>& layer) {}
|
|
19
|
+
template<typename DEVICE, typename SPEC>
|
|
20
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer) {
|
|
21
|
+
malloc(device, layer.output);
|
|
22
|
+
}
|
|
23
|
+
template<typename DEVICE, typename SPEC>
|
|
24
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer) {
|
|
25
|
+
free(device, layer.output);
|
|
26
|
+
}
|
|
27
|
+
template<typename DEVICE>
|
|
28
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::unflatten::State&) {}
|
|
29
|
+
template<typename DEVICE>
|
|
30
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::unflatten::State&) {}
|
|
31
|
+
template<typename DEVICE>
|
|
32
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::unflatten::Buffer&) {}
|
|
33
|
+
template<typename DEVICE>
|
|
34
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::unflatten::Buffer&) {}
|
|
35
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE>
|
|
36
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE&, TARGET_DEVICE&, nn::layers::unflatten::State&, nn::layers::unflatten::State&) {}
|
|
37
|
+
template<typename SPEC, typename DEVICE, typename RNG, typename MODE>
|
|
38
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset(DEVICE&, const nn::layers::unflatten::LayerForward<SPEC>&, nn::layers::unflatten::State&, RNG&, Mode<MODE>) {}
|
|
39
|
+
|
|
40
|
+
// ======================== init_weights (no-op) ========================
|
|
41
|
+
template<typename DEVICE, typename SPEC, typename RNG>
|
|
42
|
+
RL_TOOLS_FUNCTION_PLACEMENT void init_weights(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer, RNG& rng) {}
|
|
43
|
+
|
|
44
|
+
// ======================== evaluate ========================
|
|
45
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
46
|
+
RL_TOOLS_FUNCTION_PLACEMENT void evaluate(DEVICE& device, const nn::layers::unflatten::LayerForward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer&, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
47
|
+
static_assert(nn::layers::unflatten::check_input_output<LAYER_SPEC, INPUT_SPEC, OUTPUT_SPEC>);
|
|
48
|
+
static_assert(tensor::dense_row_major_layout<INPUT_SPEC>(), "Unflatten requires contiguous row-major input");
|
|
49
|
+
static_assert(tensor::dense_row_major_layout<OUTPUT_SPEC>(), "Unflatten requires contiguous row-major output");
|
|
50
|
+
using TI = typename DEVICE::index_t;
|
|
51
|
+
constexpr TI TOTAL = product(typename INPUT_SPEC::SHAPE{});
|
|
52
|
+
auto* src = data(input);
|
|
53
|
+
auto* dst = data(output);
|
|
54
|
+
for(TI i = 0; i < TOTAL; i++){
|
|
55
|
+
dst[i] = src[i];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
60
|
+
RL_TOOLS_FUNCTION_PLACEMENT void evaluate_step(DEVICE& device, const nn::layers::unflatten::LayerForward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, nn::layers::unflatten::State& state, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
61
|
+
evaluate(device, layer, input, output, buffer, rng, mode);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
65
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn::layers::unflatten::LayerBackward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
66
|
+
evaluate(device, static_cast<const nn::layers::unflatten::LayerForward<LAYER_SPEC>&>(layer), input, output, buffer, rng, mode);
|
|
67
|
+
}
|
|
68
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
69
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
70
|
+
forward(device, static_cast<nn::layers::unflatten::LayerBackward<LAYER_SPEC>&>(layer), input, layer.output, buffer, rng, mode);
|
|
71
|
+
}
|
|
72
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
73
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::unflatten::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
74
|
+
forward(device, layer, input, buffer, rng, mode);
|
|
75
|
+
copy(device, device, layer.output, output);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ======================== backward ========================
|
|
79
|
+
template<typename DEVICE, typename LAYER_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename MODE = mode::Default<>>
|
|
80
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward_input(DEVICE& device, const nn::layers::unflatten::LayerBackward<LAYER_SPEC>& layer, const Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn::layers::unflatten::Buffer&, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
81
|
+
static_assert(nn::layers::unflatten::check_input_output<LAYER_SPEC, D_INPUT_SPEC, D_OUTPUT_SPEC>);
|
|
82
|
+
static_assert(tensor::dense_row_major_layout<D_OUTPUT_SPEC>(), "Unflatten requires contiguous row-major d_output");
|
|
83
|
+
static_assert(tensor::dense_row_major_layout<D_INPUT_SPEC>(), "Unflatten requires contiguous row-major d_input");
|
|
84
|
+
using TI = typename DEVICE::index_t;
|
|
85
|
+
constexpr TI TOTAL = product(typename D_INPUT_SPEC::SHAPE{});
|
|
86
|
+
auto* src = data(d_output);
|
|
87
|
+
auto* dst = data(d_input);
|
|
88
|
+
for(TI i = 0; i < TOTAL; i++){
|
|
89
|
+
dst[i] = src[i];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename MODE = mode::Default<>>
|
|
93
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward(DEVICE& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, nn::layers::unflatten::Buffer&, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
94
|
+
}
|
|
95
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename MODE = mode::Default<>>
|
|
96
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward_full(DEVICE& device, nn::layers::unflatten::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn::layers::unflatten::Buffer& buffer, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
97
|
+
backward_input(device, static_cast<const nn::layers::unflatten::LayerBackward<LAYER_SPEC>&>(layer), d_output, d_input, buffer, mode);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ======================== zero_gradient / update / _reset_optimizer_state (no-ops) ========================
|
|
101
|
+
template<typename DEVICE, typename SPEC>
|
|
102
|
+
RL_TOOLS_FUNCTION_PLACEMENT void zero_gradient(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer) {}
|
|
103
|
+
template<typename DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
104
|
+
RL_TOOLS_FUNCTION_PLACEMENT void add_gradient(DEVICE& device, nn::layers::unflatten::LayerGradient<SOURCE_SPEC>& source, nn::layers::unflatten::LayerGradient<TARGET_SPEC>& target) {}
|
|
105
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
106
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy_gradient(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn::layers::unflatten::LayerGradient<SOURCE_SPEC>& source, nn::layers::unflatten::LayerGradient<TARGET_SPEC>& target) {}
|
|
107
|
+
template<typename DEVICE, typename SPEC, typename OPTIMIZER>
|
|
108
|
+
RL_TOOLS_FUNCTION_PLACEMENT void update(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer, OPTIMIZER& optimizer) {}
|
|
109
|
+
template<typename DEVICE, typename SPEC, typename OPTIMIZER>
|
|
110
|
+
RL_TOOLS_FUNCTION_PLACEMENT void _reset_optimizer_state(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer, OPTIMIZER& optimizer) {}
|
|
111
|
+
|
|
112
|
+
// ======================== copy ========================
|
|
113
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
114
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn::layers::unflatten::LayerForward<SOURCE_SPEC>& source, nn::layers::unflatten::LayerForward<TARGET_SPEC>& target) {
|
|
115
|
+
static_assert(nn::layers::unflatten::check_spec_memory<SOURCE_SPEC, TARGET_SPEC>);
|
|
116
|
+
}
|
|
117
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
118
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn::layers::unflatten::LayerBackward<SOURCE_SPEC>& source, nn::layers::unflatten::LayerBackward<TARGET_SPEC>& target) {
|
|
119
|
+
static_assert(nn::layers::unflatten::check_spec_memory<SOURCE_SPEC, TARGET_SPEC>);
|
|
120
|
+
}
|
|
121
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
122
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn::layers::unflatten::LayerGradient<SOURCE_SPEC>& source, nn::layers::unflatten::LayerGradient<TARGET_SPEC>& target) {
|
|
123
|
+
static_assert(nn::layers::unflatten::check_spec_memory<SOURCE_SPEC, TARGET_SPEC>);
|
|
124
|
+
copy(source_device, target_device, source.output, target.output);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// ======================== abs_diff ========================
|
|
128
|
+
template<typename DEVICE, typename S1, typename S2>
|
|
129
|
+
RL_TOOLS_FUNCTION_PLACEMENT typename S1::TYPE_POLICY::DEFAULT abs_diff(DEVICE& device, const nn::layers::unflatten::LayerForward<S1>&, const nn::layers::unflatten::LayerForward<S2>&) { return 0; }
|
|
130
|
+
template<typename DEVICE, typename S1, typename S2>
|
|
131
|
+
RL_TOOLS_FUNCTION_PLACEMENT typename S1::TYPE_POLICY::DEFAULT abs_diff(DEVICE& device, const nn::layers::unflatten::LayerBackward<S1>&, const nn::layers::unflatten::LayerBackward<S2>&) { return 0; }
|
|
132
|
+
template<typename DEVICE, typename S1, typename S2>
|
|
133
|
+
RL_TOOLS_FUNCTION_PLACEMENT typename S1::TYPE_POLICY::DEFAULT abs_diff(DEVICE& device, const nn::layers::unflatten::LayerGradient<S1>& l1, const nn::layers::unflatten::LayerGradient<S2>& l2) { return abs_diff(device, l1.output, l2.output); }
|
|
134
|
+
template<typename DEVICE>
|
|
135
|
+
RL_TOOLS_FUNCTION_PLACEMENT auto abs_diff(DEVICE& device, const nn::layers::unflatten::State&, const nn::layers::unflatten::State&) { return 0; }
|
|
136
|
+
|
|
137
|
+
// ======================== reset_forward_state ========================
|
|
138
|
+
template<typename DEVICE, typename SPEC>
|
|
139
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset_forward_state(DEVICE& device, nn::layers::unflatten::LayerBackward<SPEC>&) {}
|
|
140
|
+
template<typename DEVICE, typename SPEC>
|
|
141
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset_forward_state(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& l) { set_all(device, l.output, 0); }
|
|
142
|
+
|
|
143
|
+
// ======================== is_nan ========================
|
|
144
|
+
template<typename DEVICE, typename SPEC, typename MODE = mode::Default<>>
|
|
145
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE&, const nn::layers::unflatten::LayerForward<SPEC>&, const Mode<MODE>& = Mode<mode::Default<>>{}) { return false; }
|
|
146
|
+
template<typename DEVICE, typename SPEC, typename MODE = mode::Default<>>
|
|
147
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE&, const nn::layers::unflatten::LayerBackward<SPEC>&, const Mode<MODE>& = Mode<mode::Default<>>{}) { return false; }
|
|
148
|
+
template<typename DEVICE, typename SPEC, typename MODE = mode::Default<>>
|
|
149
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE& device, const nn::layers::unflatten::LayerGradient<SPEC>& l, const Mode<MODE>& mode = Mode<mode::Default<>>{}) { return is_nan(device, l.output, mode); }
|
|
150
|
+
template<typename DEVICE, typename MODE = mode::Default<>>
|
|
151
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE&, nn::layers::unflatten::State&, const Mode<MODE>& = Mode<mode::Default<>>{}) { return false; }
|
|
152
|
+
|
|
153
|
+
// ======================== output ========================
|
|
154
|
+
template<typename DEVICE, typename SPEC>
|
|
155
|
+
RL_TOOLS_FUNCTION_PLACEMENT auto output(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& l){
|
|
156
|
+
return view_memory<typename SPEC::OUTPUT_SHAPE>(device, l.output);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
160
|
+
#endif
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_UNFLATTEN_PERSIST_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_UNFLATTEN_PERSIST_H
|
|
5
|
+
#include "layer.h"
|
|
6
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
7
|
+
namespace rl_tools {
|
|
8
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
9
|
+
void save(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer, GROUP& group) {
|
|
10
|
+
set_attribute(device, group, "type", "unflatten");
|
|
11
|
+
set_attribute(device, group, "height", std::to_string(SPEC::HEIGHT).c_str());
|
|
12
|
+
set_attribute(device, group, "width", std::to_string(SPEC::WIDTH).c_str());
|
|
13
|
+
set_attribute(device, group, "channels", std::to_string(SPEC::CHANNELS).c_str());
|
|
14
|
+
write_attributes(device, group);
|
|
15
|
+
}
|
|
16
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
17
|
+
void save(DEVICE& device, nn::layers::unflatten::LayerBackward<SPEC>& layer, GROUP& group) {
|
|
18
|
+
save(device, (nn::layers::unflatten::LayerForward<SPEC>&)layer, group);
|
|
19
|
+
}
|
|
20
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
21
|
+
void save(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer, GROUP& group) {
|
|
22
|
+
save(device, (nn::layers::unflatten::LayerBackward<SPEC>&)layer, group);
|
|
23
|
+
save(device, layer.output, group, "output");
|
|
24
|
+
}
|
|
25
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
26
|
+
bool load(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer, GROUP& group) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
30
|
+
bool load(DEVICE& device, nn::layers::unflatten::LayerBackward<SPEC>& layer, GROUP& group) {
|
|
31
|
+
return load(device, (nn::layers::unflatten::LayerForward<SPEC>&)layer, group);
|
|
32
|
+
}
|
|
33
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
34
|
+
bool load(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer, GROUP& group) {
|
|
35
|
+
bool success = load(device, (nn::layers::unflatten::LayerBackward<SPEC>&)layer, group);
|
|
36
|
+
if(group_exists(device, group, "output")){
|
|
37
|
+
success &= load(device, layer.output, group, "output");
|
|
38
|
+
}
|
|
39
|
+
return success;
|
|
40
|
+
}
|
|
41
|
+
template<typename DEVICE, typename GROUP>
|
|
42
|
+
void save(DEVICE& device, nn::layers::unflatten::State& state, GROUP& group) {}
|
|
43
|
+
template<typename DEVICE, typename GROUP>
|
|
44
|
+
bool load(DEVICE& device, nn::layers::unflatten::State& state, GROUP& group) { return true; }
|
|
45
|
+
}
|
|
46
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
47
|
+
#endif
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_UNFLATTEN_PERSIST_CODE_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_UNFLATTEN_PERSIST_CODE_H
|
|
5
|
+
#include "layer.h"
|
|
6
|
+
#include <sstream>
|
|
7
|
+
#include "../../../containers/tensor/persist_code.h"
|
|
8
|
+
#include "../../../persist/code.h"
|
|
9
|
+
#include "../../../nn/capability/persist_code.h"
|
|
10
|
+
|
|
11
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
12
|
+
namespace rl_tools {
|
|
13
|
+
namespace nn::layers::unflatten::persist_code{
|
|
14
|
+
template<typename DEVICE, typename SPEC>
|
|
15
|
+
rl_tools::persist::Code finish(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer, std::string name, rl_tools::persist::Code input, bool const_declaration=true, typename DEVICE::index_t indent=0){
|
|
16
|
+
using TI = typename DEVICE::index_t;
|
|
17
|
+
std::stringstream indent_ss;
|
|
18
|
+
for(TI i=0; i < indent; i++){
|
|
19
|
+
indent_ss << " ";
|
|
20
|
+
}
|
|
21
|
+
std::string ind = indent_ss.str();
|
|
22
|
+
std::string TI_string = containers::persist::get_type_string<typename SPEC::TI>();
|
|
23
|
+
std::stringstream ss, ss_header;
|
|
24
|
+
ss_header << input.header;
|
|
25
|
+
ss_header << "#include <rl_tools/nn/layers/unflatten/layer.h>\n";
|
|
26
|
+
ss << input.body;
|
|
27
|
+
ss << ind << "namespace " << name << " {\n";
|
|
28
|
+
ss << ind << " using TYPE_POLICY = " << to_string(typename SPEC::TYPE_POLICY{}) << ";\n";
|
|
29
|
+
ss << ind << " using CONFIG = RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn::layers::unflatten::Configuration<TYPE_POLICY, " << TI_string << ", " << SPEC::HEIGHT << ", " << SPEC::WIDTH << ", " << SPEC::CHANNELS << ">;\n";
|
|
30
|
+
ss << ind << " using TEMPLATE = RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn::layers::unflatten::BindConfiguration<CONFIG>;\n";
|
|
31
|
+
ss << ind << " using INPUT_SHAPE = RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::tensor::Shape<" << TI_string;
|
|
32
|
+
tensor::persist_code::emit_values<typename SPEC::INPUT_SHAPE>(ss);
|
|
33
|
+
ss << ">;\n";
|
|
34
|
+
using CONST_CAPABILITY = typename SPEC::CAPABILITY::template CHANGE_PARAMETERS<true, true>;
|
|
35
|
+
ss << ind << " using CAPABILITY = " << to_string(CONST_CAPABILITY{}) << ";\n";
|
|
36
|
+
ss << ind << " using TYPE = RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn::layers::unflatten::Layer<CONFIG, CAPABILITY, INPUT_SHAPE>;\n";
|
|
37
|
+
std::string initializer_list;
|
|
38
|
+
if constexpr(SPEC::CAPABILITY::TAG == nn::LayerCapability::Forward){
|
|
39
|
+
initializer_list = "{}";
|
|
40
|
+
}
|
|
41
|
+
else if constexpr(SPEC::CAPABILITY::TAG == nn::LayerCapability::Backward){
|
|
42
|
+
initializer_list = "{{}}";
|
|
43
|
+
}
|
|
44
|
+
else{
|
|
45
|
+
initializer_list = "{{}, output::container}";
|
|
46
|
+
}
|
|
47
|
+
ss << ind << " " << (const_declaration ? "constexpr " : "") << "TYPE module = " << initializer_list << ";\n";
|
|
48
|
+
ss << ind << " template <typename T_TYPE = TYPE>\n";
|
|
49
|
+
ss << ind << " " << (const_declaration ? "constexpr " : "") << "T_TYPE factory = " << initializer_list << ";\n";
|
|
50
|
+
ss << ind << " template <typename T_TYPE = TYPE>\n";
|
|
51
|
+
ss << ind << " " << (const_declaration ? "constexpr " : "") << "T_TYPE factory_function(){return T_TYPE" << initializer_list << ";}\n";
|
|
52
|
+
ss << ind << "}\n";
|
|
53
|
+
return {ss_header.str(), ss.str()};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
template<typename DEVICE, typename SPEC>
|
|
57
|
+
persist::Code save_code_split(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer, std::string name, bool const_declaration=true, typename DEVICE::index_t indent=0, bool finish=true){
|
|
58
|
+
using TI = typename DEVICE::index_t;
|
|
59
|
+
std::stringstream indent_ss;
|
|
60
|
+
for(TI i=0; i < indent; i++){
|
|
61
|
+
indent_ss << " ";
|
|
62
|
+
}
|
|
63
|
+
std::stringstream ss, ss_header;
|
|
64
|
+
if(finish){
|
|
65
|
+
return nn::layers::unflatten::persist_code::finish(device, layer, name, {ss_header.str(), ss.str()}, const_declaration, indent);
|
|
66
|
+
}
|
|
67
|
+
else{
|
|
68
|
+
return {ss_header.str(), ss.str()};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
template<typename DEVICE, typename SPEC>
|
|
72
|
+
persist::Code save_code_split(DEVICE& device, nn::layers::unflatten::LayerBackward<SPEC>& layer, std::string name, bool const_declaration=true, typename DEVICE::index_t indent=0, bool finish=true){
|
|
73
|
+
return save_code_split(device, static_cast<nn::layers::unflatten::LayerForward<SPEC>&>(layer), name, const_declaration, indent, finish);
|
|
74
|
+
}
|
|
75
|
+
template<typename DEVICE, typename SPEC>
|
|
76
|
+
persist::Code save_code_split(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer, std::string name, bool const_declaration=true, typename DEVICE::index_t indent=0){
|
|
77
|
+
using TI = typename DEVICE::index_t;
|
|
78
|
+
std::stringstream indent_ss;
|
|
79
|
+
for(TI i=0; i < indent; i++){
|
|
80
|
+
indent_ss << " ";
|
|
81
|
+
}
|
|
82
|
+
std::string ind = indent_ss.str();
|
|
83
|
+
std::stringstream ss, ss_header;
|
|
84
|
+
auto previous = save_code_split(device, static_cast<nn::layers::unflatten::LayerBackward<SPEC>&>(layer), name, const_declaration, indent, false);
|
|
85
|
+
ss_header << previous.header;
|
|
86
|
+
ss << previous.body;
|
|
87
|
+
ss << ind << "namespace " << name << " {\n";
|
|
88
|
+
auto output = save_code_split(device, layer.output, "output", const_declaration, indent+1);
|
|
89
|
+
ss_header << output.header;
|
|
90
|
+
ss << output.body;
|
|
91
|
+
ss << ind << "}\n";
|
|
92
|
+
return nn::layers::unflatten::persist_code::finish(device, layer, name, {ss_header.str(), ss.str()}, const_declaration, indent);
|
|
93
|
+
}
|
|
94
|
+
template<typename DEVICE, typename SPEC>
|
|
95
|
+
std::string save_code(DEVICE& device, nn::layers::unflatten::LayerForward<SPEC>& layer, std::string name, bool const_declaration=true, typename DEVICE::index_t indent=0){
|
|
96
|
+
auto code = save_code_split(device, layer, name, const_declaration, indent);
|
|
97
|
+
return code.header + code.body;
|
|
98
|
+
}
|
|
99
|
+
template <typename DEVICE, typename SPEC>
|
|
100
|
+
std::string nn_analytics(DEVICE& device, nn::layers::unflatten::LayerGradient<SPEC>& layer) {
|
|
101
|
+
return "{\"output\": " + json(device, layer.output) + "}";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
105
|
+
|
|
106
|
+
#endif
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_UPSAMPLE2D_LAYER_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_UPSAMPLE2D_LAYER_H
|
|
5
|
+
#include "../../../utils/generic/typing.h"
|
|
6
|
+
#include "../../../containers/tensor/tensor.h"
|
|
7
|
+
#include "../../../nn/capability/capability.h"
|
|
8
|
+
#include "../../../nn/parameters/parameters.h"
|
|
9
|
+
|
|
10
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
11
|
+
namespace rl_tools::nn::layers::upsample2d {
|
|
12
|
+
|
|
13
|
+
template<typename T_TYPE_POLICY, typename T_TI,
|
|
14
|
+
T_TI T_SCALE_H = 2, T_TI T_SCALE_W = T_SCALE_H>
|
|
15
|
+
struct Configuration{
|
|
16
|
+
using TYPE_POLICY = T_TYPE_POLICY;
|
|
17
|
+
using TI = T_TI;
|
|
18
|
+
static constexpr TI SCALE_H = T_SCALE_H;
|
|
19
|
+
static constexpr TI SCALE_W = T_SCALE_W;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
template <typename T_CONFIG, typename T_CAPABILITY, typename T_INPUT_SHAPE>
|
|
23
|
+
struct Specification: T_CAPABILITY, T_CONFIG{
|
|
24
|
+
using CONFIG = T_CONFIG;
|
|
25
|
+
using TYPE_POLICY = typename CONFIG::TYPE_POLICY;
|
|
26
|
+
using TI = typename CONFIG::TI;
|
|
27
|
+
using CAPABILITY = T_CAPABILITY;
|
|
28
|
+
using INPUT_SHAPE = T_INPUT_SHAPE;
|
|
29
|
+
static_assert(length(INPUT_SHAPE{}) >= 4, "Upsample2d input shape must have at least 4 dimensions (...BATCH x H x W x C)");
|
|
30
|
+
static constexpr TI INPUT_HEIGHT = get<length(INPUT_SHAPE{})-3>(INPUT_SHAPE{});
|
|
31
|
+
static constexpr TI INPUT_WIDTH = get<length(INPUT_SHAPE{})-2>(INPUT_SHAPE{});
|
|
32
|
+
static constexpr TI INPUT_CHANNELS = get_last(INPUT_SHAPE{});
|
|
33
|
+
static constexpr TI OUTPUT_HEIGHT = INPUT_HEIGHT * CONFIG::SCALE_H;
|
|
34
|
+
static constexpr TI OUTPUT_WIDTH = INPUT_WIDTH * CONFIG::SCALE_W;
|
|
35
|
+
static constexpr TI OUTPUT_CHANNELS = INPUT_CHANNELS;
|
|
36
|
+
template <typename NEW_INPUT_SHAPE>
|
|
37
|
+
struct OUTPUT_SHAPE_FACTORY{
|
|
38
|
+
static_assert(length(NEW_INPUT_SHAPE{}) >= 4);
|
|
39
|
+
static constexpr TI NEW_H = get<length(NEW_INPUT_SHAPE{})-3>(NEW_INPUT_SHAPE{});
|
|
40
|
+
static constexpr TI NEW_W = get<length(NEW_INPUT_SHAPE{})-2>(NEW_INPUT_SHAPE{});
|
|
41
|
+
static constexpr TI NEW_C = get_last(NEW_INPUT_SHAPE{});
|
|
42
|
+
static_assert(NEW_H == INPUT_HEIGHT);
|
|
43
|
+
static_assert(NEW_W == INPUT_WIDTH);
|
|
44
|
+
static_assert(NEW_C == INPUT_CHANNELS);
|
|
45
|
+
static constexpr TI NEW_OH = NEW_H * CONFIG::SCALE_H;
|
|
46
|
+
static constexpr TI NEW_OW = NEW_W * CONFIG::SCALE_W;
|
|
47
|
+
using SHAPE_HEIGHT = tensor::Replace<NEW_INPUT_SHAPE, NEW_OH, length(NEW_INPUT_SHAPE{}) - 3>;
|
|
48
|
+
using SHAPE = tensor::Replace<SHAPE_HEIGHT, NEW_OW, length(NEW_INPUT_SHAPE{}) - 2>;
|
|
49
|
+
};
|
|
50
|
+
using OUTPUT_SHAPE = typename OUTPUT_SHAPE_FACTORY<INPUT_SHAPE>::SHAPE;
|
|
51
|
+
static constexpr TI INTERNAL_BATCH_SIZE = tensor::shape_math::leading_product(tensor::shape_math::element_to_array<INPUT_SHAPE>(), 3);
|
|
52
|
+
static constexpr TI NUM_WEIGHTS = 0;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
template<typename SPEC_1, typename SPEC_2>
|
|
56
|
+
constexpr bool check_spec_memory =
|
|
57
|
+
SPEC_1::INPUT_HEIGHT == SPEC_2::INPUT_HEIGHT
|
|
58
|
+
&& SPEC_1::INPUT_WIDTH == SPEC_2::INPUT_WIDTH
|
|
59
|
+
&& SPEC_1::INPUT_CHANNELS == SPEC_2::INPUT_CHANNELS
|
|
60
|
+
&& SPEC_1::SCALE_H == SPEC_2::SCALE_H
|
|
61
|
+
&& SPEC_1::SCALE_W == SPEC_2::SCALE_W;
|
|
62
|
+
|
|
63
|
+
template<typename SPEC_1, typename SPEC_2>
|
|
64
|
+
constexpr bool check_spec = check_spec_memory<SPEC_1, SPEC_2>;
|
|
65
|
+
|
|
66
|
+
template <typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC>
|
|
67
|
+
constexpr bool check_input_output =
|
|
68
|
+
length(typename INPUT_SPEC::SHAPE{}) >= 4 &&
|
|
69
|
+
length(typename OUTPUT_SPEC::SHAPE{}) >= 4 &&
|
|
70
|
+
get<length(typename INPUT_SPEC::SHAPE{})-1>(typename INPUT_SPEC::SHAPE{}) == LAYER_SPEC::INPUT_CHANNELS &&
|
|
71
|
+
get<length(typename INPUT_SPEC::SHAPE{})-2>(typename INPUT_SPEC::SHAPE{}) == LAYER_SPEC::INPUT_WIDTH &&
|
|
72
|
+
get<length(typename INPUT_SPEC::SHAPE{})-3>(typename INPUT_SPEC::SHAPE{}) == LAYER_SPEC::INPUT_HEIGHT &&
|
|
73
|
+
get<length(typename OUTPUT_SPEC::SHAPE{})-1>(typename OUTPUT_SPEC::SHAPE{}) == LAYER_SPEC::OUTPUT_CHANNELS &&
|
|
74
|
+
get<length(typename OUTPUT_SPEC::SHAPE{})-2>(typename OUTPUT_SPEC::SHAPE{}) == LAYER_SPEC::OUTPUT_WIDTH &&
|
|
75
|
+
get<length(typename OUTPUT_SPEC::SHAPE{})-3>(typename OUTPUT_SPEC::SHAPE{}) == LAYER_SPEC::OUTPUT_HEIGHT;
|
|
76
|
+
|
|
77
|
+
struct State{};
|
|
78
|
+
struct Buffer{};
|
|
79
|
+
|
|
80
|
+
template<typename T_SPEC>
|
|
81
|
+
struct LayerForward {
|
|
82
|
+
using SPEC = T_SPEC;
|
|
83
|
+
using TYPE_POLICY = typename SPEC::TYPE_POLICY;
|
|
84
|
+
using TI = typename SPEC::TI;
|
|
85
|
+
static constexpr TI INPUT_HEIGHT = SPEC::INPUT_HEIGHT;
|
|
86
|
+
static constexpr TI INPUT_WIDTH = SPEC::INPUT_WIDTH;
|
|
87
|
+
static constexpr TI INPUT_CHANNELS = SPEC::INPUT_CHANNELS;
|
|
88
|
+
static constexpr TI OUTPUT_HEIGHT = SPEC::OUTPUT_HEIGHT;
|
|
89
|
+
static constexpr TI OUTPUT_WIDTH = SPEC::OUTPUT_WIDTH;
|
|
90
|
+
static constexpr TI OUTPUT_CHANNELS = SPEC::OUTPUT_CHANNELS;
|
|
91
|
+
static constexpr TI NUM_WEIGHTS = SPEC::NUM_WEIGHTS;
|
|
92
|
+
static constexpr TI INTERNAL_BATCH_SIZE = SPEC::INTERNAL_BATCH_SIZE;
|
|
93
|
+
using INPUT_SHAPE = typename SPEC::INPUT_SHAPE;
|
|
94
|
+
template <typename NEW_INPUT_SHAPE>
|
|
95
|
+
using OUTPUT_SHAPE_FACTORY = typename SPEC::template OUTPUT_SHAPE_FACTORY<NEW_INPUT_SHAPE>::SHAPE;
|
|
96
|
+
using OUTPUT_SHAPE = typename SPEC::OUTPUT_SHAPE;
|
|
97
|
+
template<bool DYNAMIC_ALLOCATION=true>
|
|
98
|
+
using Buffer = upsample2d::Buffer;
|
|
99
|
+
template<bool DYNAMIC_ALLOCATION=true>
|
|
100
|
+
using State = upsample2d::State;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
template<typename SPEC>
|
|
104
|
+
struct LayerBackward: public LayerForward<SPEC>{};
|
|
105
|
+
|
|
106
|
+
template<typename SPEC>
|
|
107
|
+
struct LayerGradient: public LayerBackward<SPEC>{
|
|
108
|
+
using T = typename SPEC::TYPE_POLICY::template GET<numeric_types::categories::Activation>;
|
|
109
|
+
using TI = typename SPEC::TI;
|
|
110
|
+
using OUTPUT_CONTAINER_SHAPE = tensor::Shape<TI, SPEC::INTERNAL_BATCH_SIZE, SPEC::OUTPUT_HEIGHT, SPEC::OUTPUT_WIDTH, SPEC::OUTPUT_CHANNELS>;
|
|
111
|
+
using OUTPUT_CONTAINER_SPEC = tensor::Specification<T, TI, OUTPUT_CONTAINER_SHAPE, SPEC::DYNAMIC_ALLOCATION, tensor::RowMajorStride<OUTPUT_CONTAINER_SHAPE>, SPEC::CONST>;
|
|
112
|
+
using OUTPUT_CONTAINER_TYPE = Tensor<OUTPUT_CONTAINER_SPEC>;
|
|
113
|
+
OUTPUT_CONTAINER_TYPE output;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
template<typename CONFIG, typename CAPABILITY, typename INPUT_SHAPE>
|
|
117
|
+
using Layer =
|
|
118
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Forward,
|
|
119
|
+
LayerForward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
120
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Backward,
|
|
121
|
+
LayerBackward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
122
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Gradient,
|
|
123
|
+
LayerGradient<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>, void>>>;
|
|
124
|
+
|
|
125
|
+
template <typename CONFIG>
|
|
126
|
+
struct BindConfiguration{
|
|
127
|
+
template <typename CAPABILITY, typename INPUT_SHAPE>
|
|
128
|
+
using Layer = nn::layers::upsample2d::Layer<CONFIG, CAPABILITY, INPUT_SHAPE>;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
132
|
+
#endif
|