
Research
Malicious NuGet Packages Typosquat Nethereum to Exfiltrate Wallet Keys
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
nflows
is a comprehensive collection of normalizing flows using PyTorch.
To install from PyPI:
pip install nflows
To define a flow:
from nflows import transforms, distributions, flows
# Define an invertible transformation.
transform = transforms.CompositeTransform([
transforms.MaskedAffineAutoregressiveTransform(features=2, hidden_features=4),
transforms.RandomPermutation(features=2)
])
# Define a base distribution.
base_distribution = distributions.StandardNormal(shape=[2])
# Combine into a flow.
flow = flows.Flow(transform=transform, distribution=base_distribution)
To evaluate log probabilities of inputs:
log_prob = flow.log_prob(inputs)
To sample from the flow:
samples = flow.sample(num_samples)
Additional examples of the workflow are provided in examples folder.
You can install all the dependencies using the environment.yml
file to create a conda environment:
conda env create -f environment.yml
Alternatively, you can install via setup.py
(the dev
flag installs development and testing dependencies):
pip install -e ".[dev]"
To cite the package:
@software{nflows,
author = {Conor Durkan and
Artur Bekasov and
Iain Murray and
George Papamakarios},
title = {{nflows}: normalizing flows in {PyTorch}},
month = nov,
year = 2020,
publisher = {Zenodo},
version = {v0.14},
doi = {10.5281/zenodo.4296287},
url = {https://doi.org/10.5281/zenodo.4296287}
}
The version number is intended to be the one from nflows/version.py
. The year/month correspond to the date of the release. BibTeX entries for other versions could be found on Zenodo.
If you're using spline-based flows in particular, consider citing the Neural Spline Flows paper: [bibtex].
nflows
is derived from bayesiains/nsf originally published with
C. Durkan, A. Bekasov, I. Murray, G. Papamakarios, Neural Spline Flows, NeurIPS 2019. [arXiv] [bibtex]
nflows
has been used in
Conor Durkan, Iain Murray, George Papamakarios, On Contrastive Learning for Likelihood-free Inference, ICML 2020. [arXiv].
Artur Bekasov, Iain Murray, Ordering Dimensions with Nested Dropout Normalizing Flows. [arXiv].
Tim Dockhorn, James A. Ritchie, Yaoliang Yu, Iain Murray, Density Deconvolution with Normalizing Flows. [arXiv].
nflows
is used by the conditional density estimation package pyknos, and in turn the likelihood-free inference framework sbi.
FAQs
Normalizing flows in PyTorch.
We found that nflows demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
Product
Socket is launching experimental protection for the Hugging Face ecosystem, scanning for malware and malicious payload injections inside model files to prevent silent AI supply chain attacks.