# TensorFlow Model Remediation
TensorFlow Model Remediation is a library that provides solutions for machine
learning practitioners working to create and train models in a way that reduces
or eliminates user harm resulting from underlying performance biases.
[![PyPI version](https://badge.fury.io/py/tensorflow-model-remediation.svg)](https://badge.fury.io/py/tensorflow-model-remediation)
[![Tutorial](https://img.shields.io/badge/doc-tutorial-blue.svg)](https://www.tensorflow.org/responsible_ai/model_remediation/min_diff/tutorials/min_diff_keras)
[![Overview](https://img.shields.io/badge/doc-overview-blue.svg)](https://www.tensorflow.org/responsible_ai/model_remediation)
## Installation
You can install the package from `pip`:
```shell
$ pip install tensorflow-model-remediation
```
Note: Make sure you are using TensorFlow 2.x.
## Documentation
This library will ultimately contain a collection of techniques for addressing
a wide range of concerns. For now it contains a single technique, MinDiff,
which can help reduce performance gaps between example subgroups.
We recommend starting with the
[overview guide](https://www.tensorflow.org/responsible_ai/model_remediation)
or trying it interactively in our
[tutorial notebook](https://github.com/tensorflow/model-remediation/blob/master/docs/examples/min_diff_keras.ipynb).
```python
from tensorflow_model_remediation import min_diff
import tensorflow as tf
# Start by defining a Keras model.
original_model = ...
# Set the MinDiff weight and choose a loss.
min_diff_loss = min_diff.losses.MMDLoss()
min_diff_weight = 1.0 # Hyperparamater to be tuned.
# Create a MinDiff model.
min_diff_model = min_diff.keras.MinDiffModel(
original_model, min_diff_loss, min_diff_weight)
# Compile the MinDiff model as you normally would do with the original model.
min_diff_model.compile(...)
# Create a MinDiff Dataset and train the min_diff_model on it.
min_diff_model.fit(min_diff_dataset, ...)
```
#### *Disclaimers*
*If you're interested in learning more about responsible AI practices, including*
*fairness, please see Google AI's [Responsible AI Practices](https://ai.google/education/responsible-ai-practices).*
*`tensorflow/model_remediation` is Apache 2.0 licensed. See the
[`LICENSE`](LICENSE) file.*
没有合适的资源?快使用搜索试试~ 我知道了~
tensorflow_model_remediation-0.1.1.dev0.tar.gz
0 下载量 84 浏览量
2024-04-03
19:47:31
上传
评论
收藏 32KB GZ 举报
温馨提示
共45个文件
py:37个
txt:4个
pkg-info:2个
Python库是一组预先编写的代码模块,旨在帮助开发者实现特定的编程任务,无需从零开始编写代码。这些库可以包括各种功能,如数学运算、文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
资源推荐
资源详情
资源评论
收起资源包目录
tensorflow_model_remediation-0.1.1.dev0.tar.gz (45个子文件)
tensorflow_model_remediation-0.1.1.dev0
tensorflow_model_remediation
__init__.py 1KB
version.py 673B
min_diff
__init__.py 740B
keras
__init__.py 797B
utils
__init__.py 1KB
input_utils_test.py 18KB
input_utils.py 9KB
models
__init__.py 779B
min_diff_model.py 19KB
min_diff_model_test.py 24KB
losses
base_loss.py 12KB
__init__.py 1KB
mmd_loss_test.py 8KB
mmd_loss.py 4KB
base_loss_test.py 8KB
loss_utils_test.py 3KB
loss_utils.py 3KB
absolute_correlation_loss_test.py 4KB
kernels
__init__.py 956B
gaussian_kernel.py 3KB
gaussian_kernel_test.py 3KB
base_kernel.py 3KB
laplacian_kernel.py 2KB
kernel_utils_test.py 3KB
base_kernel_test.py 1KB
kernel_utils.py 3KB
laplacian_kernel_test.py 4KB
absolute_correlation_loss.py 3KB
common
__init__.py 675B
types.py 1KB
docs.py 1KB
tools
__init__.py 699B
tutorials_utils
__init__.py 720B
min_diff_keras_utils.py 5KB
min_diff_keras_utils_test.py 5KB
build_api_docs.py 3KB
setup.py 3KB
PKG-INFO 4KB
tensorflow_model_remediation.egg-info
SOURCES.txt 2KB
top_level.txt 35B
PKG-INFO 4KB
requires.txt 22B
dependency_links.txt 1B
setup.cfg 38B
README.md 2KB
共 45 条
- 1
资源评论
程序员Chino的日记
- 粉丝: 2876
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功