-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
36 lines (30 loc) · 1.17 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
long_desc = """
Piecewise Linear Functions (PWLs) can be used to approximate any 1D function.
PWLs are built with a configurable number of line segments - the more segments the more accurate the approximation.
This package implements PWLs in PyTorch and as such they can be fit to the data using standard gradient descent.
For example:
import torchpwl
# Create a PWL consisting of 3 segments for 5 features - each feature will have its own PWL function.
pwl = torchpwl.PWL(num_features=5, num_breakpoints=3)
x = torch.Tensor(11, 5).normal_()
y = pwl(x)
Monotonicity is also supported via `MonoPWL`. See the class documentations for more details.
"""
# rm -rf dist build && python setup.py sdist bdist_wheel
# twine upload dist/*
setup(
name="torchpwl",
version="0.2.0",
packages=["torchpwl"],
url="https://github.com/PiotrDabkowski/torchpwl",
install_requires=["torch>=1.1.0"],
license="MIT",
author="Piotr Dabkowski",
author_email="[email protected]",
description="Implementation of Piecewise Linear Functions (PWL) in PyTorch.",
long_description=long_desc,
)