1 import torch 2 import torch.nn as nn 3 import time 4 import math 5 import sys 6 sys.path.append("/home/kesci/input") 7 import d2l_jay9460 as d2l 8 ( ...
分类:
其他好文 时间:
2020-02-14 22:12:59
阅读次数:
96
本篇内容包括,tf.norm(张量的范数)、tf.reduce_min/max(最大最小值)、tf.argmax/argmin(最大最小值的位置)、tf.equal(张量的比较)、tf.unique(张量的独特值) 1.tf.norm · 二范数 ||x||2 = (Σxk2)1/2 · 一范数 | ...
分类:
其他好文 时间:
2020-01-23 00:14:09
阅读次数:
122
argmax是一种函数,是对函数求参数(集合)的函数。 当我们有另一个函数y=f(x)时,若有结果x0= argmax(f(x)),则表示当函数f(x)取x=x0的时候,得到f(x)取值范围的最大值; 若有多个点使得f(x)取得相同的最大值,那么argmax(f(x))的结果就是一个点集。 换句话说 ...
分类:
其他好文 时间:
2020-01-05 18:47:44
阅读次数:
61
import tensorflow as tf from tensorflow import keras from tensorflow.keras import datasets import os # do not print irrelevant information # os.enviro... ...
分类:
其他好文 时间:
2020-01-02 22:23:24
阅读次数:
111
一.图 这两张图片的计算距离 二.计算代码 三.注意点 ...
分类:
其他好文 时间:
2020-01-02 20:57:10
阅读次数:
71
学习pytorch路程之动手学深度学习-3.4-3.7 置信度、置信区间参考:https://cloud.tencent.com/developer/news/452418 本人感觉还是挺好理解的 交叉熵参考博客:https://www.cnblogs.com/kyrieng/p/8694705.h ...
分类:
其他好文 时间:
2020-01-01 23:40:54
阅读次数:
179
1 import numpy as np 2 3 # 创建一个数组 4 arr = np.array([[1, 2],[3, 4]]) 5 print("arr: \n", arr) 6 7 # 对数组进行统计分析 8 # sum mean std var min max argmin argmax ...
分类:
编程语言 时间:
2019-12-29 18:50:55
阅读次数:
90
索引 argmin 最小值索引,argmax 最大值索引 4.736102442527367 258131 4.736102442527367 4.788201736638607 24635 4.788201736638607 排序和索引 array([ 0, 1, 2, 3, 4, 5, 6, 7 ...
分类:
其他好文 时间:
2019-12-12 22:26:39
阅读次数:
148
tf.argmax(input,axis)根据axis取值的不同返回每行或者每列最大值的索引。代码如下: import tensorflow as tfimport numpy as npsess=tf.Session()a = np.array([[1, 2, 3], [2, 3, 4], [5, ...
分类:
其他好文 时间:
2019-12-10 00:51:45
阅读次数:
92
H3:[1,1] #第一个1表示照片数量,第二个1表示0~9的一个数字 one-hot(上图)就没有1<2<3的大小关系了 欧式距离 线性很难识别现实的数字问题,如1的字体、倾斜度等 P(1|x)=0.8 #给定x ,label(也就是y)为1的概率为0.8 argmax(pred) #pred在的 ...
分类:
其他好文 时间:
2019-11-26 19:51:09
阅读次数:
93