摘要: import numpy as np import tensorflow as tf x = np.array([[1, 0], [0, 1], [1, 1], [0, 0]]) y = np.array([[1], [1], [0], [0]]) model = tf.keras.models.Sequential([ tf.keras.layers.Dense(32, activation=' 阅读全文
posted @ 2019-09-14 17:01 yytxdy 阅读(246) 评论(0) 推荐(1) 编辑
摘要: import numpy as np from sklearn.decomposition import PCA # 训练数据 train_data = np.array([[1, 2, 3], [4, 8, 12], [16, 32, 48]]) # 构造PCA实例,n_components:目标 阅读全文
posted @ 2019-09-14 10:51 yytxdy 阅读(256) 评论(0) 推荐(1) 编辑