上一页 1 2 3 4 5 6 7 ··· 27 下一页
摘要: 泰勒展开式核心思想是仿照 当我们想要仿造一个东西的时候,即先保证大体上相似,再保证局部相似,再保证细节相似,再保证更细微的地方相似……不断地细化下去,无穷次细化以后,仿造的东西将无限接近真品。真假难辨。 由来 一位物理学家,把这则生活经验应用到他自己的研究中,则会出现下列场景: 一辆随意行驶的小车, 阅读全文
posted @ 2019-07-26 11:19 下路派出所 阅读(1272) 评论(1) 推荐(0) 编辑
摘要: 导数 对于定义域和值域都是实数域的函数f : R → R,若f(x) 在点x0 的某个邻域Δx 内,极限 存在,则称函数f(x) 在点x0 处可导,f′(x0) 称为其导数,或导函数,也可以记为 给定一个连续函数,计算其导数的过程称为微分(Differentiation)。微分的逆过程为积分(Int 阅读全文
posted @ 2019-07-26 09:39 下路派出所 阅读(5789) 评论(0) 推荐(0) 编辑
摘要: ℓ1 范数ℓ1 范数为向量的各个元素的绝对值之和。 ℓ2 范数ℓ2 范数为向量的各个元素的平方和再开平方。 ℓ2 范数又称为Euclidean 范数或者Frobenius 范数。从几何角度,向量也可以表示为从原点出发的一个带箭头的有向线段,其ℓ2 范数为线段的长度,也常称为向量的模。 ℓ∞ 范数ℓ∞ 阅读全文
posted @ 2019-07-25 10:31 下路派出所 阅读(922) 评论(0) 推荐(0) 编辑
摘要: def noam_scheme(global_step, num_warmup_steps, num_train_steps, init_lr, warmup=True): """ decay learning rate if warmup > global step, the learning rate will be global_step/num_warmup_st... 阅读全文
posted @ 2019-07-22 16:53 下路派出所 阅读(2514) 评论(0) 推荐(0) 编辑
摘要: #asyncio 没有提供http协议的接口 aiohttp import asyncio import socket from urllib.parse import urlparse async def get_url(url): #通过socket请求html url = urlparse(url) host = url.netloc path = ur... 阅读全文
posted @ 2019-07-21 19:22 下路派出所 阅读(1656) 评论(0) 推荐(1) 编辑
摘要: import asyncio def callback(loop, i): print("success time {} {}".format(i, loop.time())) async def get_html(url): print("start get url") await asyncio.sleep(1) print("end get url") ... 阅读全文
posted @ 2019-07-21 11:23 下路派出所 阅读(3834) 评论(0) 推荐(0) 编辑
摘要: #使用多线程:在协程中集成阻塞io import asyncio from concurrent.futures import ThreadPoolExecutor import socket from urllib.parse import urlparse def get_url(url): #通过socket请求html url = urlparse(url) ... 阅读全文
posted @ 2019-07-21 11:16 下路派出所 阅读(2527) 评论(0) 推荐(0) 编辑
摘要: 1. call_soon, 协程一运行就马上运行 2. call_later 3. call_at 阅读全文
posted @ 2019-07-21 10:55 下路派出所 阅读(1939) 评论(0) 推荐(1) 编辑
摘要: import asyncio async def compute(x, y): print("Compute %s + %s ..." % (x, y)) await asyncio.sleep(1.0) return x + y async def print_sum(x, y): result = await compute(x, y) print... 阅读全文
posted @ 2019-07-20 16:50 下路派出所 阅读(1499) 评论(0) 推荐(0) 编辑
摘要: import asyncio import time async def get_html(sleep_times): print("waiting") await asyncio.sleep(sleep_times) print("done after {}s".format(sleep_times)) if __name__ == "__main__": ... 阅读全文
posted @ 2019-07-20 16:36 下路派出所 阅读(2537) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 27 下一页