torchebm 0.2.4__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.
- docs/api/index.md +111 -0
- docs/api/torchebm/core/basesampler/classes/BaseSampler.md +23 -0
- docs/api/torchebm/core/basesampler/index.md +31 -0
- docs/api/torchebm/core/energy_function/classes/AckleyEnergy.md +23 -0
- docs/api/torchebm/core/energy_function/classes/DoubleWellEnergy.md +23 -0
- docs/api/torchebm/core/energy_function/classes/EnergyFunction.md +23 -0
- docs/api/torchebm/core/energy_function/classes/GaussianEnergy.md +23 -0
- docs/api/torchebm/core/energy_function/classes/HarmonicEnergy.md +23 -0
- docs/api/torchebm/core/energy_function/classes/RastriginEnergy.md +23 -0
- docs/api/torchebm/core/energy_function/classes/RosenbrockEnergy.md +23 -0
- docs/api/torchebm/core/energy_function/index.md +37 -0
- docs/api/torchebm/core/index.md +36 -0
- docs/api/torchebm/core/losses/classes/Loss.md +23 -0
- docs/api/torchebm/core/losses/index.md +31 -0
- docs/api/torchebm/core/optimizer/classes/Optimizer.md +23 -0
- docs/api/torchebm/core/optimizer/index.md +31 -0
- docs/api/torchebm/core/score_matching/classes/ScoreMatching.md +23 -0
- docs/api/torchebm/core/score_matching/index.md +31 -0
- docs/api/torchebm/core/trainer/classes/ContrastiveDivergenceTrainer.md +23 -0
- docs/api/torchebm/core/trainer/index.md +31 -0
- docs/api/torchebm/cuda/index.md +27 -0
- docs/api/torchebm/index.md +36 -0
- docs/api/torchebm/losses/contrastive_divergence/classes/ContrastiveDivergence.md +23 -0
- docs/api/torchebm/losses/contrastive_divergence/classes/ContrastiveDivergenceBase.md +23 -0
- docs/api/torchebm/losses/contrastive_divergence/classes/ParallelTemperingCD.md +23 -0
- docs/api/torchebm/losses/contrastive_divergence/classes/PersistentContrastiveDivergence.md +23 -0
- docs/api/torchebm/losses/contrastive_divergence/index.md +34 -0
- docs/api/torchebm/losses/index.md +31 -0
- docs/api/torchebm/models/base_model/classes/BaseModel.md +23 -0
- docs/api/torchebm/models/base_model/index.md +31 -0
- docs/api/torchebm/models/index.md +31 -0
- docs/api/torchebm/samplers/index.md +32 -0
- docs/api/torchebm/samplers/langevin_dynamics/classes/LangevinDynamics.md +23 -0
- docs/api/torchebm/samplers/langevin_dynamics/index.md +31 -0
- docs/api/torchebm/samplers/mcmc/classes/HamiltonianMonteCarlo.md +23 -0
- docs/api/torchebm/samplers/mcmc/index.md +31 -0
- docs/api/torchebm/utils/index.md +31 -0
- docs/assets/images/blog/hamiltonian/non-L-pendulum.png +0 -0
- docs/assets/images/blog/hamiltonian/numerical_err.png +0 -0
- docs/assets/images/blog/hamiltonian/pendulum_phase_space.mp4 +0 -0
- docs/assets/images/blog/hamiltonian/quadratics.png +0 -0
- docs/assets/images/e_functions/ackley.png +0 -0
- docs/assets/images/e_functions/double_well.png +0 -0
- docs/assets/images/e_functions/gaussian.png +0 -0
- docs/assets/images/e_functions/harmonic.png +0 -0
- docs/assets/images/e_functions/rastrigin.png +0 -0
- docs/assets/images/e_functions/rosenbrock.png +0 -0
- docs/assets/images/examples/double_well_trajectory.png +0 -0
- docs/assets/images/examples/hmc_basic.png +0 -0
- docs/assets/images/examples/hmc_comparison.png +0 -0
- docs/assets/images/examples/hmc_custom_mass.png +0 -0
- docs/assets/images/examples/hmc_standard.png +0 -0
- docs/assets/images/examples/langevin_basic.png +0 -0
- docs/assets/images/examples/langevin_trajectory.png +0 -0
- docs/assets/images/favicon.svg +33 -0
- docs/assets/images/logo_with_text.svg +50 -0
- docs/assets/images/nabla_icon.svg +176 -0
- docs/assets/images/parallel.jpg +0 -0
- docs/assets/images/sampling.jpg +0 -0
- docs/assets/images/trajectory.jpg +0 -0
- docs/assets/images/visualization/advanced_energy_landscape.png +0 -0
- docs/assets/images/visualization/basic_energy_landscape.png +0 -0
- docs/assets/images/visualization/distribution_comparison.png +0 -0
- docs/assets/images/visualization/energy_evolution.png +0 -0
- docs/assets/images/visualization/interactive_visualization.png +0 -0
- docs/assets/images/visualization/langevin_trajectory.png +0 -0
- docs/assets/images/visualization/multiple_chains.png +0 -0
- docs/blog/.authors.yml +15 -0
- docs/blog/index.md +51 -0
- docs/blog/posts/code-examples.md +57 -0
- docs/blog/posts/hamiltonian-mechanics.md +723 -0
- docs/blog/posts/langevin_dynamics_sampling.md +128 -0
- docs/blog/posts/neural_energy_functions.md +12 -0
- docs/blog/posts/schrodinger-bridges.md +18 -0
- docs/developer_guide/api_design.md +288 -0
- docs/developer_guide/api_generation.md +239 -0
- docs/developer_guide/architecture.md +159 -0
- docs/developer_guide/code_style.md +320 -0
- docs/developer_guide/commit_conventions.md +81 -0
- docs/developer_guide/contributing.md +249 -0
- docs/developer_guide/core_components.md +610 -0
- docs/developer_guide/cuda_optimizations.md +629 -0
- docs/developer_guide/design_principles.md +321 -0
- docs/developer_guide/development_setup.md +184 -0
- docs/developer_guide/implementation_energy.md +663 -0
- docs/developer_guide/implementation_losses.md +837 -0
- docs/developer_guide/implementation_models.md +500 -0
- docs/developer_guide/implementation_samplers.md +492 -0
- docs/developer_guide/index.md +204 -0
- docs/developer_guide/performance.md +301 -0
- docs/developer_guide/project_structure.md +248 -0
- docs/developer_guide/testing_guide.md +332 -0
- docs/examples/core/energy_functions.md +118 -0
- docs/examples/energy_visualization.md +201 -0
- docs/examples/hmc.md +264 -0
- docs/examples/index.md +129 -0
- docs/examples/langevin_dynamics.md +280 -0
- docs/examples/langevin_trajectory.md +274 -0
- docs/examples/samplers/hmc.md +264 -0
- docs/examples/samplers/langevin.md +280 -0
- docs/examples/visualization/index.md +233 -0
- docs/faq.md +153 -0
- docs/getting_started.md +92 -0
- docs/guides/custom_neural_networks.md +432 -0
- docs/guides/energy_functions.md +178 -0
- docs/guides/index.md +155 -0
- docs/guides/loss_functions.md +210 -0
- docs/guides/parallel_sampling.md +26 -0
- docs/guides/samplers.md +183 -0
- docs/guides/training.md +618 -0
- docs/guides/visualization.md +461 -0
- docs/hooks/socialmedia.py +29 -0
- docs/index.md +348 -0
- docs/introduction.md +72 -0
- docs/overrides/partials/outdated.html +9 -0
- docs/stylesheets/extra.css +265 -0
- docs/tags.md +0 -0
- examples/README.md +71 -0
- examples/core/energy_advanced.py +106 -0
- examples/core/energy_basic.py +39 -0
- examples/core/energy_functions/landscape_2d.py +39 -0
- examples/core/energy_functions/multimodal.py +106 -0
- examples/core/energy_functions/parametric.py +50 -0
- examples/main.py +88 -0
- examples/samplers/hmc/advanced.py +408 -0
- examples/samplers/hmc/gaussian_sampling.py +412 -0
- examples/samplers/hmc/mass_matrix.py +89 -0
- examples/samplers/langevin/advanced.py +246 -0
- examples/samplers/langevin/gaussian_sampling.py +246 -0
- examples/samplers/langevin/multimodal_sampling.py +164 -0
- examples/samplers/langevin/visualization_trajectory.py +201 -0
- examples/visualization/advanced/energy_evolution.py +51 -0
- examples/visualization/advanced/energy_landscape.py +57 -0
- examples/visualization/advanced/energy_over_time.py +51 -0
- examples/visualization/advanced/langevin_trajectory.py +83 -0
- examples/visualization/advanced/multiple_chains.py +76 -0
- examples/visualization/advanced/multiple_doublewell.py +50 -0
- examples/visualization/advanced/parallel_chains.py +76 -0
- examples/visualization/advanced/trajectory_animation.py +83 -0
- examples/visualization/advanced/visualization_examples.py +171 -0
- examples/visualization/basic/contour_plots.py +41 -0
- examples/visualization/basic/current_energy_fns_vis.py +106 -0
- examples/visualization/basic/distribution_comparison.py +93 -0
- examples/visualization/basic/energy_fn_vis.py +173 -0
- examples/visualization/basic/energy_landscape.py +41 -0
- examples/visualization/samplers_vis.py +171 -0
- examples/visualization/utils.py +173 -0
- tests/conftest.py +33 -0
- tests/core/test_energy_function.py +45 -0
- tests/samplers/test_hmc.py +522 -0
- tests/samplers/test_langevin_dynamics.py +182 -0
- torchebm/__init__.py +1 -0
- torchebm/_version.py +21 -0
- torchebm/core/__init__.py +12 -0
- torchebm/core/basesampler.py +104 -0
- torchebm/core/energy_function.py +469 -0
- torchebm/core/losses.py +17 -0
- torchebm/core/optimizer.py +30 -0
- torchebm/core/score_matching.py +61 -0
- torchebm/core/trainer.py +43 -0
- torchebm/cuda/__init__.py +0 -0
- torchebm/losses/__init__.py +0 -0
- torchebm/losses/contrastive_divergence.py +89 -0
- torchebm/models/__init__.py +0 -0
- torchebm/models/base_model.py +35 -0
- torchebm/samplers/__init__.py +1 -0
- torchebm/samplers/langevin_dynamics.py +382 -0
- torchebm/samplers/mcmc.py +646 -0
- torchebm/utils/__init__.py +3 -0
- torchebm/utils/visualization.py +413 -0
- torchebm-0.2.4.dist-info/METADATA +265 -0
- torchebm-0.2.4.dist-info/RECORD +175 -0
- torchebm-0.2.4.dist-info/WHEEL +5 -0
- torchebm-0.2.4.dist-info/licenses/LICENSE +21 -0
- torchebm-0.2.4.dist-info/top_level.txt +5 -0
docs/api/index.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: API Reference
|
|
3
|
+
description: Detailed API reference for TorchEBM
|
|
4
|
+
icon: material/api
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TorchEBM API Reference
|
|
8
|
+
|
|
9
|
+
Welcome to the TorchEBM API reference documentation. This section provides detailed information about the classes and functions available in TorchEBM.
|
|
10
|
+
|
|
11
|
+
## Package Structure
|
|
12
|
+
|
|
13
|
+
TorchEBM is organized into several modules:
|
|
14
|
+
|
|
15
|
+
<div class="grid cards" markdown>
|
|
16
|
+
|
|
17
|
+
- :material-cube-outline:{ .lg .middle } __Core__
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
Base classes and core functionality for energy functions, samplers, and trainers.
|
|
22
|
+
|
|
23
|
+
[:octicons-arrow-right-24: Core Module](./torchebm/core)
|
|
24
|
+
|
|
25
|
+
- :material-dice-multiple-outline:{ .lg .middle } __Samplers__
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Sampling algorithms for energy-based models including Langevin Dynamics and MCMC.
|
|
30
|
+
|
|
31
|
+
[:octicons-arrow-right-24: Samplers](./torchebm/samplers)
|
|
32
|
+
|
|
33
|
+
- :material-function-variant:{ .lg .middle } __Losses__
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
Loss functions for training energy-based models.
|
|
38
|
+
|
|
39
|
+
[:octicons-arrow-right-24: Losses](./torchebm/losses)
|
|
40
|
+
|
|
41
|
+
- :material-tools:{ .lg .middle } __Utils__
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
Utility functions for working with energy-based models.
|
|
46
|
+
|
|
47
|
+
[:octicons-arrow-right-24: Utils](./torchebm/utils)
|
|
48
|
+
|
|
49
|
+
- :material-gpu:{ .lg .middle } __CUDA__
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
CUDA-accelerated implementations for faster computation.
|
|
54
|
+
|
|
55
|
+
[:octicons-arrow-right-24: CUDA](./torchebm/cuda)
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
## Getting Started with the API
|
|
60
|
+
|
|
61
|
+
If you're new to TorchEBM, we recommend starting with the following classes:
|
|
62
|
+
|
|
63
|
+
- [`EnergyFunction`](./torchebm/core/energy_function/classes/EnergyFunction): Base class for all energy functions
|
|
64
|
+
- [`BaseSampler`](./torchebm/core/basesampler/classes/BaseSampler): Base class for all sampling algorithms
|
|
65
|
+
- [`LangevinDynamics`](./torchebm/samplers/langevin_dynamics/classes/LangevinDynamics): Implementation of Langevin dynamics sampling
|
|
66
|
+
|
|
67
|
+
## Core Components
|
|
68
|
+
|
|
69
|
+
### Energy Functions
|
|
70
|
+
|
|
71
|
+
TorchEBM provides various built-in energy functions:
|
|
72
|
+
|
|
73
|
+
| Energy Function | Description |
|
|
74
|
+
| --------------- | ----------- |
|
|
75
|
+
| [`GaussianEnergy`](./torchebm/core/energy_function/classes/GaussianEnergy.md) | Multivariate Gaussian energy function |
|
|
76
|
+
| [`DoubleWellEnergy`](./torchebm/core/energy_function/classes/DoubleWellEnergy.md) | Double well potential energy function |
|
|
77
|
+
| [`RastriginEnergy`](./torchebm/core/energy_function/classes/RastriginEnergy.md) | Rastrigin function for testing optimization algorithms |
|
|
78
|
+
| [`RosenbrockEnergy`](./torchebm/core/energy_function/classes/RosenbrockEnergy.md) | Rosenbrock function (banana function) |
|
|
79
|
+
| [`AckleyEnergy`](./torchebm/core/energy_function/classes/AckleyEnergy.md) | Ackley function, a multimodal test function |
|
|
80
|
+
| [`HarmonicEnergy`](./torchebm/core/energy_function/classes/HarmonicEnergy.md) | Harmonic oscillator energy function |
|
|
81
|
+
|
|
82
|
+
### Samplers
|
|
83
|
+
|
|
84
|
+
Available sampling algorithms:
|
|
85
|
+
|
|
86
|
+
| Sampler | Description |
|
|
87
|
+
| ------- | ----------- |
|
|
88
|
+
| [`LangevinDynamics`](./torchebm/samplers/langevin_dynamics/classes/LangevinDynamics.md) | Langevin dynamics sampling algorithm |
|
|
89
|
+
| [`HamiltonianMonteCarlo`](./torchebm/samplers/mcmc/classes/HamiltonianMonteCarlo.md) | Hamiltonian Monte Carlo sampling |
|
|
90
|
+
|
|
91
|
+
### Loss Functions
|
|
92
|
+
|
|
93
|
+
TorchEBM implements several loss functions for training EBMs:
|
|
94
|
+
|
|
95
|
+
| Loss Function | Description |
|
|
96
|
+
| ------------- | ----------- |
|
|
97
|
+
| [`ContrastiveDivergence`](./torchebm/losses/contrastive_divergence/classes/ContrastiveDivergence.md) | Standard contrastive divergence (CD-k) |
|
|
98
|
+
| [`PersistentContrastiveDivergence`](./torchebm/losses/contrastive_divergence/classes/PersistentContrastiveDivergence.md) | Persistent contrastive divergence |
|
|
99
|
+
| [`ParallelTemperingCD`](./torchebm/losses/contrastive_divergence/classes/ParallelTemperingCD.md) | Parallel tempering contrastive divergence |
|
|
100
|
+
|
|
101
|
+
## Module Details
|
|
102
|
+
|
|
103
|
+
For detailed information about each module, follow the links below:
|
|
104
|
+
|
|
105
|
+
- [Core Module](./torchebm/core)
|
|
106
|
+
- [Samplers](./torchebm/samplers)
|
|
107
|
+
- [Losses](./torchebm/losses)
|
|
108
|
+
- [Models](./torchebm/models)
|
|
109
|
+
- [Utils](./torchebm/utils)
|
|
110
|
+
- [CUDA](./torchebm/cuda)
|
|
111
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.basesampler.BaseSampler
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Torchebm > Core > Basesampler
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
### Classes
|
|
6
|
+
|
|
7
|
+
- [`BaseSampler`](classes/BaseSampler) - Base class for samplers.
|
|
8
|
+
|
|
9
|
+
## API Reference
|
|
10
|
+
|
|
11
|
+
::: torchebm.core.basesampler
|
|
12
|
+
options:
|
|
13
|
+
show_root_heading: true
|
|
14
|
+
show_root_toc_entry: true
|
|
15
|
+
show_source: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
show_docstring_attributes: false
|
|
19
|
+
show_docstring_classes: true
|
|
20
|
+
show_docstring_functions: true
|
|
21
|
+
trim_doctest_flags: true
|
|
22
|
+
show_category_heading: false
|
|
23
|
+
show_if_no_docstring: true
|
|
24
|
+
members_order: source
|
|
25
|
+
show_signature_annotations: true
|
|
26
|
+
separate_signature: true
|
|
27
|
+
unwrap_annotated: true
|
|
28
|
+
docstring_section_style: table
|
|
29
|
+
inherited_members: false
|
|
30
|
+
members:
|
|
31
|
+
- "!__*"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.energy_function.AckleyEnergy
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.energy_function.DoubleWellEnergy
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.energy_function.EnergyFunction
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.energy_function.GaussianEnergy
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.energy_function.HarmonicEnergy
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.energy_function.RastriginEnergy
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.energy_function.RosenbrockEnergy
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Torchebm > Core > Energy_function
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
### Classes
|
|
6
|
+
|
|
7
|
+
- [`AckleyEnergy`](classes/AckleyEnergy) - Energy function for the Ackley function.
|
|
8
|
+
- [`DoubleWellEnergy`](classes/DoubleWellEnergy) - Energy function for a double well potential. E(x) = h * Σ((x²-1)²) where h is the barrier height.
|
|
9
|
+
- [`EnergyFunction`](classes/EnergyFunction) - Abstract base class for energy functions (Potential Energy E(x)).
|
|
10
|
+
- [`GaussianEnergy`](classes/GaussianEnergy) - Energy function for a Gaussian distribution. E(x) = 0.5 * (x-μ)ᵀ Σ⁻¹ (x-μ).
|
|
11
|
+
- [`HarmonicEnergy`](classes/HarmonicEnergy) - Energy function for a harmonic oscillator. E(x) = 0.5 * k * Σ(x²).
|
|
12
|
+
- [`RastriginEnergy`](classes/RastriginEnergy) - Energy function for the Rastrigin function.
|
|
13
|
+
- [`RosenbrockEnergy`](classes/RosenbrockEnergy) - Energy function for the Rosenbrock function. E(x) = (a-x₁)² + b·(x₂-x₁²)².
|
|
14
|
+
|
|
15
|
+
## API Reference
|
|
16
|
+
|
|
17
|
+
::: torchebm.core.energy_function
|
|
18
|
+
options:
|
|
19
|
+
show_root_heading: true
|
|
20
|
+
show_root_toc_entry: true
|
|
21
|
+
show_source: true
|
|
22
|
+
show_symbol_type_heading: true
|
|
23
|
+
show_symbol_type_toc: true
|
|
24
|
+
show_docstring_attributes: false
|
|
25
|
+
show_docstring_classes: true
|
|
26
|
+
show_docstring_functions: true
|
|
27
|
+
trim_doctest_flags: true
|
|
28
|
+
show_category_heading: false
|
|
29
|
+
show_if_no_docstring: true
|
|
30
|
+
members_order: source
|
|
31
|
+
show_signature_annotations: true
|
|
32
|
+
separate_signature: true
|
|
33
|
+
unwrap_annotated: true
|
|
34
|
+
docstring_section_style: table
|
|
35
|
+
inherited_members: false
|
|
36
|
+
members:
|
|
37
|
+
- "!__*"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Torchebm > Core
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
### Modules
|
|
6
|
+
|
|
7
|
+
- [Basesampler](basesampler.md)
|
|
8
|
+
- [Energy_function](energy_function.md)
|
|
9
|
+
- [Losses](losses.md)
|
|
10
|
+
- [Optimizer](optimizer.md)
|
|
11
|
+
- [Score_matching](score_matching.md)
|
|
12
|
+
- [Trainer](trainer.md)
|
|
13
|
+
|
|
14
|
+
## API Reference
|
|
15
|
+
|
|
16
|
+
::: torchebm.core
|
|
17
|
+
options:
|
|
18
|
+
show_root_heading: true
|
|
19
|
+
show_root_toc_entry: true
|
|
20
|
+
show_source: true
|
|
21
|
+
show_symbol_type_heading: true
|
|
22
|
+
show_symbol_type_toc: true
|
|
23
|
+
show_docstring_attributes: false
|
|
24
|
+
show_docstring_classes: true
|
|
25
|
+
show_docstring_functions: true
|
|
26
|
+
trim_doctest_flags: true
|
|
27
|
+
show_category_heading: false
|
|
28
|
+
show_if_no_docstring: true
|
|
29
|
+
members_order: source
|
|
30
|
+
show_signature_annotations: true
|
|
31
|
+
separate_signature: true
|
|
32
|
+
unwrap_annotated: true
|
|
33
|
+
docstring_section_style: table
|
|
34
|
+
inherited_members: false
|
|
35
|
+
members:
|
|
36
|
+
- "!__*"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.losses.Loss
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Torchebm > Core > Losses
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
### Classes
|
|
6
|
+
|
|
7
|
+
- [`Loss`](classes/Loss) - No description available.
|
|
8
|
+
|
|
9
|
+
## API Reference
|
|
10
|
+
|
|
11
|
+
::: torchebm.core.losses
|
|
12
|
+
options:
|
|
13
|
+
show_root_heading: true
|
|
14
|
+
show_root_toc_entry: true
|
|
15
|
+
show_source: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
show_docstring_attributes: false
|
|
19
|
+
show_docstring_classes: true
|
|
20
|
+
show_docstring_functions: true
|
|
21
|
+
trim_doctest_flags: true
|
|
22
|
+
show_category_heading: false
|
|
23
|
+
show_if_no_docstring: true
|
|
24
|
+
members_order: source
|
|
25
|
+
show_signature_annotations: true
|
|
26
|
+
separate_signature: true
|
|
27
|
+
unwrap_annotated: true
|
|
28
|
+
docstring_section_style: table
|
|
29
|
+
inherited_members: false
|
|
30
|
+
members:
|
|
31
|
+
- "!__*"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.optimizer.Optimizer
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Torchebm > Core > Optimizer
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
### Classes
|
|
6
|
+
|
|
7
|
+
- [`Optimizer`](classes/Optimizer) - No description available.
|
|
8
|
+
|
|
9
|
+
## API Reference
|
|
10
|
+
|
|
11
|
+
::: torchebm.core.optimizer
|
|
12
|
+
options:
|
|
13
|
+
show_root_heading: true
|
|
14
|
+
show_root_toc_entry: true
|
|
15
|
+
show_source: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
show_docstring_attributes: false
|
|
19
|
+
show_docstring_classes: true
|
|
20
|
+
show_docstring_functions: true
|
|
21
|
+
trim_doctest_flags: true
|
|
22
|
+
show_category_heading: false
|
|
23
|
+
show_if_no_docstring: true
|
|
24
|
+
members_order: source
|
|
25
|
+
show_signature_annotations: true
|
|
26
|
+
separate_signature: true
|
|
27
|
+
unwrap_annotated: true
|
|
28
|
+
docstring_section_style: table
|
|
29
|
+
inherited_members: false
|
|
30
|
+
members:
|
|
31
|
+
- "!__*"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.score_matching.ScoreMatching
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Torchebm > Core > Score_matching
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
### Classes
|
|
6
|
+
|
|
7
|
+
- [`ScoreMatching`](classes/ScoreMatching) - No description available.
|
|
8
|
+
|
|
9
|
+
## API Reference
|
|
10
|
+
|
|
11
|
+
::: torchebm.core.score_matching
|
|
12
|
+
options:
|
|
13
|
+
show_root_heading: true
|
|
14
|
+
show_root_toc_entry: true
|
|
15
|
+
show_source: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
show_docstring_attributes: false
|
|
19
|
+
show_docstring_classes: true
|
|
20
|
+
show_docstring_functions: true
|
|
21
|
+
trim_doctest_flags: true
|
|
22
|
+
show_category_heading: false
|
|
23
|
+
show_if_no_docstring: true
|
|
24
|
+
members_order: source
|
|
25
|
+
show_signature_annotations: true
|
|
26
|
+
separate_signature: true
|
|
27
|
+
unwrap_annotated: true
|
|
28
|
+
docstring_section_style: table
|
|
29
|
+
inherited_members: false
|
|
30
|
+
members:
|
|
31
|
+
- "!__*"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Methods and Attributes
|
|
2
|
+
|
|
3
|
+
::: torchebm.core.trainer.ContrastiveDivergenceTrainer
|
|
4
|
+
options:
|
|
5
|
+
show_root_heading: false
|
|
6
|
+
show_source: true
|
|
7
|
+
members_order: source
|
|
8
|
+
show_category_heading: false
|
|
9
|
+
show_if_no_docstring: true
|
|
10
|
+
show_docstring_attributes: false
|
|
11
|
+
show_docstring_classes: true
|
|
12
|
+
show_docstring_functions: true
|
|
13
|
+
show_signature_annotations: true
|
|
14
|
+
separate_signature: true
|
|
15
|
+
unwrap_annotated: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
docstring_section_style: table
|
|
19
|
+
trim_doctest_flags: true
|
|
20
|
+
inherited_members: false
|
|
21
|
+
filters:
|
|
22
|
+
- "!^_[^_]"
|
|
23
|
+
- "!^__"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Torchebm > Core > Trainer
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
### Classes
|
|
6
|
+
|
|
7
|
+
- [`ContrastiveDivergenceTrainer`](classes/ContrastiveDivergenceTrainer) - No description available.
|
|
8
|
+
|
|
9
|
+
## API Reference
|
|
10
|
+
|
|
11
|
+
::: torchebm.core.trainer
|
|
12
|
+
options:
|
|
13
|
+
show_root_heading: true
|
|
14
|
+
show_root_toc_entry: true
|
|
15
|
+
show_source: true
|
|
16
|
+
show_symbol_type_heading: true
|
|
17
|
+
show_symbol_type_toc: true
|
|
18
|
+
show_docstring_attributes: false
|
|
19
|
+
show_docstring_classes: true
|
|
20
|
+
show_docstring_functions: true
|
|
21
|
+
trim_doctest_flags: true
|
|
22
|
+
show_category_heading: false
|
|
23
|
+
show_if_no_docstring: true
|
|
24
|
+
members_order: source
|
|
25
|
+
show_signature_annotations: true
|
|
26
|
+
separate_signature: true
|
|
27
|
+
unwrap_annotated: true
|
|
28
|
+
docstring_section_style: table
|
|
29
|
+
inherited_members: false
|
|
30
|
+
members:
|
|
31
|
+
- "!__*"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Torchebm > Cuda
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
## API Reference
|
|
6
|
+
|
|
7
|
+
::: torchebm.cuda
|
|
8
|
+
options:
|
|
9
|
+
show_root_heading: true
|
|
10
|
+
show_root_toc_entry: true
|
|
11
|
+
show_source: true
|
|
12
|
+
show_symbol_type_heading: true
|
|
13
|
+
show_symbol_type_toc: true
|
|
14
|
+
show_docstring_attributes: false
|
|
15
|
+
show_docstring_classes: true
|
|
16
|
+
show_docstring_functions: true
|
|
17
|
+
trim_doctest_flags: true
|
|
18
|
+
show_category_heading: false
|
|
19
|
+
show_if_no_docstring: true
|
|
20
|
+
members_order: source
|
|
21
|
+
show_signature_annotations: true
|
|
22
|
+
separate_signature: true
|
|
23
|
+
unwrap_annotated: true
|
|
24
|
+
docstring_section_style: table
|
|
25
|
+
inherited_members: false
|
|
26
|
+
members:
|
|
27
|
+
- "!__*"
|