Ai
1 Star 0 Fork 0

Houor/ml-py

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
loss_test.py 221 Bytes
一键复制 编辑 原始数据 按行查看 历史
Houor 提交于 2020-01-18 20:13 +08:00 . tensor test
import tensorflow as tf
out = tf.random.uniform([4, 10])
print(out)
y = tf.range(4)
print(y)
y = tf.one_hot(y, depth=10)
print(y)
loss = tf.keras.losses.mse(y, out)
print(loss)
loss = tf.reduce_mean(loss)
print(loss)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/houor/ml-py.git
git@gitee.com:houor/ml-py.git
houor
ml-py
ml-py
master

搜索帮助