摘要:
函数定义 函数声明 枚举类型定义 宏定义 定义的结构体名 变量声明或定义 常量 阅读全文
posted @ 2019-11-20 17:26
Parallax
阅读(226)
评论(0)
推荐(0)
摘要:
1 # coding: utf-8 2 3 """张量的基本运算""" 4 5 # In[9]: 6 7 A = tf.constant([[1., 2.], [3., 4.]]) 8 B = tf.constant([[5., 6.], [7., 8.]]) 9 10 # output: 11 1 阅读全文
posted @ 2019-11-20 16:24
Parallax
阅读(150)
评论(0)
推荐(0)
摘要:
1 import tensorflow as tf 2 import numpy as np 3 """ 4 tf.keras.datasets 获得数据集 并预处理 5 """ 6 class MNISTLoader(): 7 def __init__(self): #加载类的构造函数 8 mni 阅读全文
posted @ 2019-11-20 15:46
Parallax
阅读(590)
评论(0)
推荐(0)
摘要:
1 import numpy as np 2 np.random.seed(123) 3 a = np.random.randint(0,5,[3,3,2]) 4 print(a) 5 6 print(a[-1,:,:]) # -1 就是 2 7 #Output: 8 9 [[[2 4] 10 [2 阅读全文
posted @ 2019-11-20 11:33
Parallax
阅读(318)
评论(0)
推荐(0)
摘要:
关联conda环境和jupyter notebook:conda install nb_conda 文件夹下有xx.py格式的python文件,想要在Jupyter Notebook中运行该文件。 解决办法:魔法方法 #方法1.利用 %run xx.py 直接运行得出结果。 #方法2:利用 %loa 阅读全文
posted @ 2019-11-20 01:55
Parallax
阅读(116)
评论(0)
推荐(0)

浙公网安备 33010602011771号