|
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | | -"""Setup for TensorFlow Neural Structured Learning package.""" |
| 14 | +"""Setup file for the TensorFlow Neural Structured Learning pip package.""" |
15 | 15 |
|
16 | | -import setuptools |
| 16 | +import textwrap |
17 | 17 |
|
18 | | -with open("README.md", "r") as fh: |
19 | | - long_description = fh.read() |
| 18 | +import setuptools |
20 | 19 |
|
21 | 20 | INSTALL_REQUIRES = [ |
22 | 21 | "absl-py", |
|
25 | 24 | "six", |
26 | 25 | ] |
27 | 26 |
|
| 27 | +NSL_OVERVIEW = textwrap.dedent("""\ |
| 28 | + Neural Structured Learning (NSL) is a new learning paradigm to train neural |
| 29 | + networks by leveraging structured signals in addition to feature inputs. |
| 30 | + Structure can be explicit as represented by a graph or implicit as induced |
| 31 | + by adversarial perturbation. |
| 32 | +
|
| 33 | + Structured signals are commonly used to represent relations or similarity |
| 34 | + among samples that may be labeled or unlabeled. Leveraging these signals |
| 35 | + during neural network training harnesses both labeled and unlabeled data, |
| 36 | + which can improve model accuracy, particularly when the amount of labeled |
| 37 | + data is relatively small. Additionally, models trained with samples that are |
| 38 | + generated by adversarial perturbation have been shown to be robust against |
| 39 | + malicious attacks, which are designed to mislead a model's prediction or |
| 40 | + classification. |
| 41 | +
|
| 42 | + NSL generalizes to Neural Graph Learning as well as to Adversarial Learning. |
| 43 | + The NSL framework in TensorFlow provides the following easy-to-use APIs and |
| 44 | + tools for developers to train models with structured signals: |
| 45 | +
|
| 46 | + * Keras APIs to enable training with graphs (explicit structure) and |
| 47 | + adversarial pertubations (implicit structure). |
| 48 | +
|
| 49 | + * TF ops and functions to enable training with structure when using |
| 50 | + lower-level TensorFlow APIs. |
| 51 | +
|
| 52 | + * Tools to build graphs and construct graph inputs for training. |
| 53 | +
|
| 54 | + The NSL framework is designed to be flexible and can be used to train any |
| 55 | + kind of neural network. For example, feed-forward, convolution, and |
| 56 | + recurrent neural networks can all be trained using the NSL framework. In |
| 57 | + addition to supervised and semi-supervised learning (a low amount of |
| 58 | + supervision), NSL can in theory be generalized to unsupervised learning. |
| 59 | + Incorporating structured signals is done only during training, so the |
| 60 | + performance of the serving/inference workflow remains unchanged.""") |
| 61 | + |
28 | 62 | setuptools.setup( |
29 | 63 | name="neural-structured-learning", |
30 | 64 | version="1.0.0", |
31 | 65 | author="Google LLC", |
32 | | - description="TensorFlow Neural Structured Learning", |
33 | | - long_description=long_description, |
34 | | - long_description_content_type="text/markdown", |
| 66 | + description="Neural Structured Learning is an open-source TensorFlow " |
| 67 | + "framework to train neural networks with structured signals", |
| 68 | + long_description=NSL_OVERVIEW, |
| 69 | + long_description_content_type="text/plain", |
35 | 70 | url="https://github.com/tensorflow/neural-structured-learning", |
36 | 71 | packages=setuptools.find_packages(), |
37 | 72 | install_requires=INSTALL_REQUIRES, |
|
0 commit comments