摘要: Java实现: 1 class Solution { 2 Integer ans = Integer.MIN_VALUE; 3 public int maxPathSum(TreeNode root) { 4 oneSideMax(root); 5 return ans; 6 } 7 8 publi 阅读全文
posted @ 2021-01-25 19:35 Sempron2800+ 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 6.2 理解循环神经网络 6.2.1 Keras中的循环层: 1 from keras.layers import SimpleRNN 2 3 from keras.models import Sequential 4 from keras.layers import Embedding, Simp 阅读全文
posted @ 2021-01-25 15:05 Sempron2800+ 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 6.1 处理文本数据 6.1.1 单词和字符的one-hot编码 (1)单词级的one-hot编码: 1 # 单词级的one-hot编码 2 import numpy as np 3 4 # 初始数据:每个样本是列表的一个元素(本例中的样本是一个句子,但也可以是一整篇文档) 5 samples = 阅读全文
posted @ 2021-01-25 14:58 Sempron2800+ 阅读(259) 评论(0) 推荐(0) 编辑