Releases: dwavesystems/dwave-pytorch-plugin
0.3.1
0.3.0
New Features
-
Add a
MaximumMeanDiscrepancyLossindwave.plugins.torch.nn.lossfor estimating the squared maximum mean discrepancy (MMD) for a given kernel and two samples. Its functional counterpartmaximum_mean_discrepancy_lossis indwave.plugins.torch.nn.functional. Kernels reside indwave.plugins.torch.nn.modules.kernels. This enables, for example, training discrete autoencoders to match the distribution of a target distribution (e.g., prior). See #35. -
Add the Python module
dwave.plugins.torch.nncontaining commonly-used neural network modules and patterns used to build more complex architectures. See #33. -
Add
LinearBlockandSkipLinearmodules. See #33. -
Add utilities for testing torch modules added to the
nnPython submodule. See #33. -
Add a samplers submodule with a baseclass
TorchSampler. See #58. -
Add a new PyTorch plugin wrapper for a dimod sampler named
DimodSampler. See #58. -
Add
BlockSamplerfor performing block Gibbs (or Metropolis) sampling of graph-restricted Boltzmann Machines. See #44. -
Add functions for converting spins to bits and bits to spins. See #44.
-
Add
randspinfor generating random spins. See #44. -
Add support for Python 3.14. See #49.
Upgrade Notes
-
Update
BlockSamplerto inherit from the newTorchSampler. See #58. -
BlockSampler.to()now returns a copy with components moved to the set device, instead of performing the device change it in-place. See #58. -
dwave.plugins.torch.models.losses.kl_divergence.pseudo_kl_divergence_lossno longer uses the Graph-Restricted Boltzmann Machine to generate Boltzmann samples internally. Instead, the samples must be provided as an argument to the function. This is a breaking change. See #34. -
Drop support for Python 3.9. See #49.
Deprecation Notes
- Deprecate
GraphRestrictedBoltzmannMachine.sample()andGraphRestrictedBoltzmannMachine.sampleset_to_tensorin favour of the newdwave.plugins.torch.samplersmodule. Will be removed in version 0.4.0." See #58.
Bug Fixes
-
The default
latent_to_discretetransformation indwave.plugins.torch.models.discrete_variational_autoencoder.DiscreteVariationalAutoencoderhas been fixed to accommodate arbitrary encoders. Before, the default transformation only allowed encoders whose output shape was (B, l). Now, encoders can have an arbitrary number of feature dimensions, i.e., the shape can be (B, l1, l2, ...). See #26. -
Fix the (automatic) gradient computation when hidden units are present. The issue was that the parameters, linear and quadratic weights, were used in the marginalization without being detached from the computation graph. The fix was to detach the parameters when computing effective fields. See #29.
-
Fix the concatenation of statistics in
GraphRestrictedBoltzmannMachine.sufficient_statistics. The issue was the concatenation of statistics were hard-coded at dimension 1 when it should have been the final dimension (to reflect that ofGraphRestrictedBoltzmannMachine.interactions). See #42.
0.2.0
New Features
-
Support custom weight initialization and setting. See #18.
-
Add
DiscreteVariationalAutoencoderclass for training discrete models as priors. See #8 -
Add pseudo KL divergence loss function for use with Discrete Variational Autoencoder. See #8.
-
Support hidden units. See #7.
Upgrade Notes
-
Decouple sampling parameters (beta) from the model. See #14.
-
Reduce number of operations in the GRBM objective function. See #14.
-
Remove networkx dependency. See #14.
-
Simplify
GraphRestrictedBoltzmannMachineconstructor to require only node and edge lists. See #14. -
Add option to return samples as
dimod.SamplesetfromGraphRestrictedBoltzmannMachine.sample(). See #23.
Deprecation Notes
-
Simplify
GraphRestrictedBoltzmannMachineconstructor to require only node and edge lists. See #14. -
Remove abstract base class. See #14.
Bug Fixes
- Make
GraphRestrictedBoltzmannMachine.quasi_objective's argumentkindoptional. See #18.
Other Notes
- Add a directory for models and move
boltzmann_machine.pyfromdwave/plugins/torch/todwave/plugins/torch/models/. See #24.