- 博客(3)
- 收藏
- 关注
原创 numpy和tensorflow的一些用法与联系
tensorflow和numpy值的差别在numpy中生成的np.array可以直接在 debug中看到产生的具体数字;而在tensorflow中却只是一个tensor类型,需要调用tf.Session().run(XX)才行,tensorflow中是图操作import tensorflow as tfimport numpy as npdef t1(): #这个说明Var...
2019-07-26 15:04:07 2936
原创 二叉树三种遍历以及创建
#from link_tree import create_treedef inorder(ptr): #中序遍历,顺序:左-->根-->右 if ptr!=None: inorder(ptr.left) print('[%2d]'%ptr.data,end='') inorder(ptr.right)def pos...
2019-07-10 08:33:56 110
原创 tensorflow中对图像的softmax层求导数
img = cv2.imread("./3.jpg")img = cv2.cvtColor(img,cv2.COLOR_RGB2GRAY)img = np.reshape(img,(-1,28,28,1))#print(img.shape)label = tf.one_hot(2,10)label = np.zeros((1,10))label[0,2]=1#print(label)...
2019-05-27 14:53:14 414
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人