当前位置:网站首页>Machine learning: gradient descent method
Machine learning: gradient descent method
2022-06-24 21:57:00 【Weng Weiqiang】
import numpy as np
import tensorflow as tf
from matplotlib import pyplot as plt
x = tf.linspace(-10.0, 10.0, 100)
x=tf.Variable(x)# During the calculation x It needs to be transformed into a change tensor
with tf.GradientTape() as tape: # Tracking gradient
s=1/(1+tf.math.exp(-x))
grad=tape.gradient(s,x) # Calculate the gradient
grad
plt.plot(x.numpy(),grad.numpy()) #x.numpy() Represents an array
边栏推荐
- MySQL optimizes query speed
- Reduce the pip to the specified version (upgrade the PIP through pycharm, and then reduce it to the original version)
- LeetCode-513. Find the value in the lower left corner of the tree
- Based on asp Net development of fixed assets management system source code enterprise fixed assets management system source code
- How to resolve the 35 year old crisis? Sharing of 20 years' technical experience of chief architect of Huawei cloud database
- Drag drag drag
- 多路转接select
- 权限想要细化到按钮,怎么做?
- 好想送对象一束花呀
- 降低pip到指定版本(通过PyCharm升级pip,在降低到原来版本)
猜你喜欢

Data link layer & some other protocols or technologies

Antdb database online training has started! More flexible, professional and rich

The collection of zero code enterprise application cases in various industries was officially released

PyCharm 中出现Cannot find reference ‘imread‘ in ‘__init__.py‘

(待补充)GAMES101作业7提高-实现微表面模型你需要了解的知识

滤波数据分析

多线程收尾

That is to say, "live broadcast" is launched! One stop live broadcast service with full link upgrade

想当测试Leader,这6项技能你会吗?

Multi task model of recommended model: esmm, MMOE
随机推荐
A field in the database is of JSON type and stores ["1", "2", "3"]
Multithreaded finalization
leetcode_191_2021-10-15
壹沓科技签约七匹狼,助力「中国男装领导者」数字化转型
Mysql 通过表明获取字段以及注释
Fuzhou business office of Fujian development and Reform Commission visited the health department of Yurun university to guide and inspect the work
多路转接select
(to be added) games101 job 7 improvement - knowledge you need to know to realize micro surface model
虚拟机CentOS7中无图形界面安装Oracle(保姆级安装)
刷题笔记(十八)--二叉树:公共祖先问题
leetcode-201_ 2021_ 10_ seventeen
Bld3 getting started UI
LeetCode-513. 找树左下角的值
02---纵波不可能产生的现象
煮茶论英雄!福建省发改委、市营商办领导一行莅临育润大健康事业部交流指导
leetcode_1365
【OpenCV 例程200篇】209. HSV 颜色空间的彩色图像分割
Elegant custom ThreadPoolExecutor thread pool
面试官:你说你精通Redis,你看过持久化的配置吗?
Excel布局