Skip to content

Commit 2895516

Browse files
committed
Merge branch 'master' of github.com:parrt/tensor-sensor into master
2 parents 03bec95 + d0e6b2e commit 2895516

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ Cause: @ on tensor operand W w/shape [764, 100] and operand X.T w/shape [764, 20
3939
## Install
4040

4141
```
42-
pip install tensor-sensor
42+
pip install tensor-sensor # This will only install the library for you
43+
pip install tensor-sensor[torch] # install pytorch related dependency
44+
pip install tensor-sensor[tensorflow] # install tensorflow related dependency
45+
pip install tensor-sensor[all] # install both tensorflow and pytorch
4346
```
4447

4548
which gives you module `tsensor`. I developed and tested with the following versions
@@ -94,4 +97,4 @@ $ pip install .
9497

9598
* can i call pyviz in debugger?
9699
* try on real examples
97-
* `dict(W=[3,0,1,2], b=[1,0])` that would indicate (300, 30, 60, 3) would best be displayed as (30,60,3, 300) and b would be first dimension last and last dimension first
100+
* `dict(W=[3,0,1,2], b=[1,0])` that would indicate (300, 30, 60, 3) would best be displayed as (30,60,3, 300) and b would be first dimension last and last dimension first

contributing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Thank you for considering a contribution to TensorSensor. I welcome updates to the examples, README, or the source code itself.
2+
3+
Before you spend a lot of time creating a pull request (PR) for a new feature or a biggish change to the software, please contact me by email [email protected] to find out if it's something I'm interested in. One of the hardest things to do, as I've learned over the last 30 years pushing out open-source software, is to maintain project focus and conceptual integrity.

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"""
2424
from setuptools import setup
2525

26+
tensorflow_requires = ['tensorflow']
27+
torch_requires = ['torch']
28+
all_requires = tensorflow_requires + torch_requires
29+
2630
exec(open('tsensor/version.py').read())
2731
setup(
2832
name='tensor-sensor',
@@ -33,7 +37,11 @@
3337
author='Terence Parr',
3438
author_email='[email protected]',
3539
python_requires='>=3.6',
36-
install_requires=['graphviz>=0.14.1','numpy','torch','tensorflow', 'IPython', 'matplotlib'],
40+
install_requires=['graphviz>=0.14.1','numpy','IPython', 'matplotlib'],
41+
extras_require = {'all': all_requires,
42+
'torch': torch_requires,
43+
'tensorflow': tensorflow_requires
44+
},
3745
description='The goal of this library is to generate more helpful exception messages for numpy/pytorch tensor algebra expressions.',
3846
# keywords='visualization data structures',
3947
classifiers=['License :: OSI Approved :: MIT License',

0 commit comments

Comments
 (0)