TensorFlow Filesystem - Access Tensors Differently
A funny way to access your tensorflow model's tensors.
Use this project to map your model into a filesystem. Then, access your tensors as if they were files, using your favorite UNIX commands.
tffs is implemented using Filesystem in Userspace (FUSE). It requires
fusepy to be installed.
To learn more, read the accompanying blog post.
Create a model - out of the scope of this project :)
Mount your model so it'll be accessible through the filesystem:
python tffs.py --model PATH_TO_MODEL --mount MOUNT_POINT
PATH_TO_MODEL is either a directory containing a .meta file, or the .meta file itself.
If there's also a file containing the weights with the same name as the .meta file (without the .meta extension), it'll be loaded as well.
Reap the fruits. Assuming MOUNT_POINT is ~/tf:
||list all scopes and tensors|
||list all tensors|
||get attributes of a tensor|
||print the value found in a tensor|
||print the inputs to a tensor, recursively|
||print the outputs to a tensor, without using the mount prefix|