
TensorFlow2
纪伯伦的小弟
这个作者很懒,什么都没留下…
展开
-
TensorFlow2学习-3
预备知识:tf.where()条件语句真返回A,条件语句假返回Bimport tensorflow as tfa = tf.constant([1, 2, 3, 1, 1])b = tf.constant([0, 1, 3, 4, 5])c = tf.where(tf.greater(a, b), a, b)# 若a>b,返回a对应位置的元素,否则返回b对应位置的元素print("c:", c)np.random.RandomState.rand()返回一个[0,1)原创 2020-06-16 20:14:10 · 459 阅读 · 0 评论 -
TensorFlow2学习-2
神经网络实现鸢尾花分类基本步骤:# -*- coding: UTF-8 -*-# 利用鸢尾花数据集,实现前向传播、反向传播,可视化loss曲线# 导入所需模块import tensorflow as tffrom sklearn import datasetsfrom matplotlib import pyplot as pltimport numpy as np# 导入数据,分别为输入特征和标签x_data = datasets.load_iris().datay_data原创 2020-06-15 23:39:04 · 191 阅读 · 0 评论 -
TensorFlow2学习-1
TensorFlow2人工智能:让机器具备人的思维和意识人工智能三学派:行为主义:基于控制论,构建感知-动作控制系统。(控制论,如平衡、行走、避障等自适应控制系统)-----让人工智能具备基本的本能反应。符号主义:基于算数逻辑表达式,求解问题时先把问题描述为表达式,再求解表达式。(可用公式描述、实现理性思维,如专家系统)----用公式描述的人工智能,让计算机具备理性思维。连接主义:仿生学,模仿神经元连接关系。(仿脑神经元连接,实现感性思维,如神经网络)-----让人工智能具备感性思维。原创 2020-06-14 17:46:26 · 491 阅读 · 0 评论