ch01 Python入门

  1. basic.py
'''
python --versionnote in python3  5/2 = 2.54**2 = 16type(3.4)x = 10 then x = "123"  it's ok in pythonlist
x = [1, 2, 3, 4, 5]
print(x)
len(x)
x[1]
x[1:3]
x[:4]
x[3:]
x[:-3]dictionary
dict = {"name" : "raymond"}
dict["name"]for i in [1, 2, 3]:print(i)
'''
  1. hungry.py
print("I am hungry")# python ./hungry.py
  1. man.py
class Man:def __init__(self, name):self.name = nameprint("Initialized!")def hello(self):print("Hello " + self.name + "!")def goodbye(self):print("good-bye " + self.name + "!")m = Man("raymond")
m.hello()
m.goodbye()
  1. matplotlib1.py
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.image import imreadx = np.arange(0, 6, 0.1)
y1 = np.sin(x)
y2 = np.cos(x)
plt.plot(x, y1, label="sin")
plt.plot(x, y2, linestyle="--", label="cos")
plt.xlabel("x")
plt.ylabel("y")
plt.title("sin & cos")
#  加上图例
plt.legend()
plt.show()# read image
img = imread("pic.jpg")
plt.imshow(img)
plt.show()
  1. numpy1.py
'''
import numpy as npx = np.array([1.0, 2.0, 3.0])
x
type(x)y = np.array([2.0, 4.0, 6.0])
y# the length should be the same
x + y
x - y
x * y
x / yx / 3.0x = np.array([[1, 2], [3, 4]])
x.shape
x.dtypey = np.array([10, 20])
x * yx[0]
x[1][0]x = x.flatten()
xx % 2 == 1
x[x % 2 == 1]
'''
  • python是一种简单易记的编程语言
  • python是开源的,可以自由使用
  • python有“解释器”和“脚本文件”两种运行模式
  • python能够将一系列的处理集成为函数或类等模块
  • numpy中有很多用于操作多维数组的便捷方法

斋藤康毅-深度学习入门 专栏

斋藤康毅-深度学习入门 学习笔记一相关推荐

  1. 斋藤康毅-深度学习入门 学习笔记二

    ch02 感知机 Perceptron.py import numpy as np''' def AND(x1, x2):w1, w2, theta = 0.5, 0.5, 0.7tmp = w1 * ...

  2. 斋藤康毅-深度学习入门 学习笔记三

    ch03 神经网络 1. pkl文件的创建与导入 python官方文档对pickle模块的定义:pickle The pickle module implements binary protocols ...

  3. 斋藤康毅-深度学习入门 学习笔记四

    ch 神经网络的学习 损失函数 1.1 均方误差 import numpy as npdef mean_squared_error(y, t):return 0.5 * np.sum((y - t) ...

  4. 斋藤康毅-深度学习入门 学习笔记五

    ch 误差反向传播法 乘法和加法层的反向传播 class AddLayer:def __init__(self):passdef forward(self, x, y):out = x + yretu ...

  5. 深度学习入门_斋藤康毅_chapter23

    系列文章目录 这是第一部分 文章目录 系列文章目录 前言 一.chapter 1 二.chapter感知机 1.numpy生成数组 三. 神经网络 总结 前言 本来是想通过李沐的网课入门深度学习的,但 ...

  6. 读书笔记:手写数字识别 ← 斋藤康毅

    求解机器学习问题的步骤可以分为"学习"和"推理"两个阶段. 本例假设"学习"阶段已经完成,并将学习到的权重和偏置参数保存在pickle文件s ...

  7. 《深度学习入门--基于python的理论与实现》——斋藤康毅读书笔记

    <深度学习入门--基于python的理论与实现>读书笔记(第二章) 写在前面 第二章:感知机 2.1感知机是什么 2.2简单的逻辑电路 2.2.1与门(and gate) 2.2.2与非门 ...

  8. 《深度学习入门》(斋藤康毅著)学习笔记(一)

    1.Windows环境下关于python+pycharm安装 (1)下载安装python 网站地址:https://www.python.org/ 安装:选择适合自己电脑的相应安装包,下载,然后点击安 ...

  9. 学习笔记--深度学习入门--基于Pyrhon的理论与实现--[日]斋藤康毅 -- 持续更新中

    关于这本 "神作" 的简介 这本书上市不到 2 年,就已经印刷 10 万册了.日本人口数量不大,但是却有这么多人读过这本书,况且它不是一本写真集,是实实在在的技术书,让人觉得很不可 ...

最新文章

  1. [网页设计]点睛价值
  2. EVA6400 Preferred path/mode
  3. Tree Recovery--POJ 2255
  4. 【SVM】A Practical Guide to Support Vector Classication
  5. 邮局--dp经典问题
  6. 搭建Spring MVC 4开发环境八步走
  7. 雷林鹏分享:C# 匿名方法
  8. 微信H5页面ios分享失效
  9. 圣诞帽php,微信小程序“圣诞帽”的实现方法
  10. C3P0,alibaba连接池错误【已解决】-An exception occurred while acquiring a poolable resource. Will retry.
  11. 华三交换机升级的ipe文件_H3C 交换机升级说明
  12. 一年前,我来国企搞IT
  13. 使用magick 遇到 convert: Non-conforming drawing primitive definition `text'错误的解决办法...
  14. 用C# ASP.NET MVC 实现WebSocket
  15. 力扣 2090. 半径为 k 的子数组平均值
  16. “石油无机论”颠覆对于石油的认知
  17. IDEA中如何正确快速打jar包(包括瘦包、胖包)
  18. 无人车地图激战正酣 各家虎视眈眈 谷歌这次可能有点悬了!
  19. git如何将远程仓库代码拉下覆盖本地仓库
  20. Scratch少儿编程思维题目:汉诺塔游戏

热门文章

  1. 零基础学C语言,初识C语言
  2. easyui的数据表格
  3. c语言计算日出日落时间_日出日落时间计算程序(C语言)
  4. Guerrilla Oracle: The Succinct Windows Perspective
  5. UnixBench的七个影响要素
  6. vs2019出现《未加载 wntdll.pbd》 ,解决方案
  7. 大数据技术路线-需要掌握的技术
  8. VS Code使用ssh远程连接服务器报错:过程试图写入的管道不存在
  9. 南芯科技在科创板提交注册:业绩增速迅猛,股东包括红杉、顺为等
  10. 五、广义逆矩阵–求解线性方程组