
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
:fire: Computer vision datasets, transforms, and models for Ruby
First, install libvips. For Homebrew, use:
brew install vips
Add this line to your application’s Gemfile:
gem "torchvision"
This library follows the Python API. Many methods and options are missing at the moment. PRs welcome!
Load a dataset
TorchVision::Datasets::MNIST.new("./data", train: true, download: true)
Supported datasets are:
TorchVision::Transforms::Compose.new([
TorchVision::Transforms::ToTensor.new,
TorchVision::Transforms::Normalize.new([0.1307], [0.3081])
])
Supported transforms are:
TorchVision::Models::AlexNet.new
TorchVision::Models::ResNet18.new
TorchVision::Models::ResNet34.new
TorchVision::Models::ResNet50.new
TorchVision::Models::ResNet101.new
TorchVision::Models::ResNet152.new
TorchVision::Models::ResNext52_32x4d.new
TorchVision::Models::ResNext101_32x8d.new
TorchVision::Models::VGG11.new
TorchVision::Models::VGG11BN.new
TorchVision::Models::VGG13.new
TorchVision::Models::VGG13BN.new
TorchVision::Models::VGG16.new
TorchVision::Models::VGG16BN.new
TorchVision::Models::VGG19.new
TorchVision::Models::VGG19BN.new
TorchVision::Models::WideResNet52_2.new
TorchVision::Models::WideResNet101_2.new
You can download pretrained models with this script
pip install torchvision
python pretrained.py
And load them
net = TorchVision::Models::ResNet18.new
net.load_state_dict(Torch.load("net.pth"))
Check your package manager. For Ubuntu, use:
sudo apt install libvips
You can also build from source.
brew install vips
Check out the options.
This library downloads and prepares public datasets. We don’t host any datasets. Be sure to adhere to the license for each dataset.
If you’re a dataset owner and wish to update any details or remove it from this project, let us know.
View the changelog
Everyone is encouraged to help improve this project. Here are a few ways you can help:
To get started with development:
git clone https://github.com/ankane/torchvision-ruby.git
cd torchvision-ruby
bundle install
bundle exec rake test
FAQs
Unknown package
We found that torchvision demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.