All Projects → lmnt-com → graftr

lmnt-com / graftr

Licence: Apache-2.0 license
graftr: an interactive shell to view and edit PyTorch checkpoints.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to graftr

Yolo Face With Landmark
yoloface大礼包 使用pytroch实现的基于yolov3的轻量级人脸检测(包含关键点)
Stars: ✭ 180 (+102.25%)
Mutual labels:  torch
Opennmt
Open Source Neural Machine Translation in Torch (deprecated)
Stars: ✭ 2,339 (+2528.09%)
Mutual labels:  torch
Gpt2 Newstitle
Chinese NewsTitle Generation Project by GPT2.带有超级详细注释的中文GPT2新闻标题生成项目。
Stars: ✭ 235 (+164.04%)
Mutual labels:  torch
Php Opencv
php wrapper for opencv
Stars: ✭ 194 (+117.98%)
Mutual labels:  torch
Netron
Visualizer for neural network, deep learning, and machine learning models
Stars: ✭ 17,193 (+19217.98%)
Mutual labels:  torch
Visdial
[CVPR 2017] Torch code for Visual Dialog
Stars: ✭ 215 (+141.57%)
Mutual labels:  torch
Snapshotensemble
Snapshot Ensembles in Torch (Snapshot Ensembles: Train 1, Get M for Free)
Stars: ✭ 173 (+94.38%)
Mutual labels:  torch
Artificial Intelligence Deep Learning Machine Learning Tutorials
A comprehensive list of Deep Learning / Artificial Intelligence and Machine Learning tutorials - rapidly expanding into areas of AI/Deep Learning / Machine Vision / NLP and industry specific areas such as Climate / Energy, Automotives, Retail, Pharma, Medicine, Healthcare, Policy, Ethics and more.
Stars: ✭ 2,966 (+3232.58%)
Mutual labels:  torch
Orn
Oriented Response Networks, in CVPR 2017
Stars: ✭ 207 (+132.58%)
Mutual labels:  torch
Alphaction
Spatio-Temporal Action Localization System
Stars: ✭ 221 (+148.31%)
Mutual labels:  torch
Python Torchfile
Deserialize Lua torch-serialized objects from Python
Stars: ✭ 196 (+120.22%)
Mutual labels:  torch
Pytorch Beam Search Decoding
PyTorch implementation of beam search decoding for seq2seq models
Stars: ✭ 204 (+129.21%)
Mutual labels:  torch
Torchdata
PyTorch dataset extended with map, cache etc. (tensorflow.data like)
Stars: ✭ 226 (+153.93%)
Mutual labels:  torch
Online Neural Doodle
Feedforward neural doodle
Stars: ✭ 183 (+105.62%)
Mutual labels:  torch
Floorplantransformation
Raster-to-Vector: Revisiting Floorplan Transformation
Stars: ✭ 243 (+173.03%)
Mutual labels:  torch
Npmt
Towards Neural Phrase-based Machine Translation
Stars: ✭ 175 (+96.63%)
Mutual labels:  torch
Torch
R Interface to Torch
Stars: ✭ 214 (+140.45%)
Mutual labels:  torch
multiclass-semantic-segmentation
Experiments with UNET/FPN models and cityscapes/kitti datasets [Pytorch]
Stars: ✭ 96 (+7.87%)
Mutual labels:  torch
Pixeldtgan
A torch implementation of "Pixel-Level Domain Transfer"
Stars: ✭ 248 (+178.65%)
Mutual labels:  torch
Echotorch
A Python toolkit for Reservoir Computing and Echo State Network experimentation based on pyTorch. EchoTorch is the only Python module available to easily create Deep Reservoir Computing models.
Stars: ✭ 231 (+159.55%)
Mutual labels:  torch

graftr

PyPI Release License

An interactive shell to view and edit PyTorch checkpoints.

graftr cast

graftr can be used to remove, rename, and move around the layers and parameters of your saved model. It's also a handy tool to peek into the structure of pre-trained PyTorch models that you can find online (e.g. Transformer, DCGAN, etc.).

The screencast above shows an example of taking a pre-trained Densenet and preparing it for integration into a larger model. We remove the final classification layer and move the feature extractor into its own densenet module.

Install

pip install graftr

Documentation

graftr presents a hierarchical directory structure for state_dicts and parameters in your checkpoint. You can list (ls), move/rename (mv), and print (cat) parameters. And, of course, you can navigate (cd) through the hierarchy. It also supports standard shell beahvior like command history, up-arrow, tab-completion, etc.

All changes are kept in-memory until you're ready to write them back to your checkpoint with save.

Supported commands

  • cd - change working directory.
  • pwd - print working directory.
  • ls - list directory contents.
  • cat - print the contents of a value or directory.
  • cp - copy value or directory.
  • mv - move/rename value or directory.
  • rm - remove value or directory.
  • parameters - print the number of model parameters under a directory.
  • shape - print tensor shape.
  • device - get or set the device of a tensor or group of tensors.
  • save - write back changes to disk.
  • where - print the location on disk where changes will be saved.
  • exit - exits the shell.

FAQ

Should this be a mountable user-mode filesystem instead?

Maybe? Some operations (e.g. shape, parameters, device) don't map easily onto standard filesystem operations. On the other hand, it would be interesting to insert/extract tensors by copying NumPy files in and out of the virtual filesystem.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].