摘要: 打印网络结构 打印训练过程 从测试数据中打印10个预测 END 阅读全文
posted @ 2019-02-26 21:47 YangZhaonan 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 超参数设置 数据 4种优化器的训练过程的loss变化,下降的越快越好 END 阅读全文
posted @ 2019-02-26 20:48 YangZhaonan 阅读(337) 评论(0) 推荐(0) 编辑
摘要: BATCH_SIZE = 8 , 所有数据利用三次 END 阅读全文
posted @ 2019-02-26 20:20 YangZhaonan 阅读(1678) 评论(0) 推荐(0) 编辑
摘要: 训练网络,并用两种方式保存网络 加载第一种(含所有信息的)网络:torch.load('net.pkl') 加载第二种(只含有参数的)网络:net3.load_state_dict(torch.load('net_params.pkl')) 运行上面的函数 三个网络绘制的图片 END 阅读全文
posted @ 2019-02-26 20:02 YangZhaonan 阅读(515) 评论(0) 推荐(0) 编辑
摘要: easy and fast way to build your network 两种方法使用效果完全相同 END 阅读全文
posted @ 2019-02-26 19:38 YangZhaonan 阅读(257) 评论(0) 推荐(0) 编辑
摘要: END 阅读全文
posted @ 2019-02-26 19:28 YangZhaonan 阅读(2318) 评论(0) 推荐(0) 编辑
摘要: END 阅读全文
posted @ 2019-02-26 19:24 YangZhaonan 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 2.3 Activation Function END 阅读全文
posted @ 2019-02-26 19:21 YangZhaonan 阅读(923) 评论(0) 推荐(0) 编辑
摘要: details about math operation in torch can be found in: http://pytorch.org/docs/torch.html math operations convert numpy to tensor or vise versa abs 绝对 阅读全文
posted @ 2019-02-26 19:20 YangZhaonan 阅读(1120) 评论(0) 推荐(0) 编辑
摘要: END 阅读全文
posted @ 2019-02-26 19:20 YangZhaonan 阅读(382) 评论(0) 推荐(0) 编辑
摘要: concatenating join, ('inner', 'outer') join_axes append END 阅读全文
posted @ 2019-02-26 14:56 YangZhaonan 阅读(450) 评论(0) 推荐(0) 编辑
摘要: Series 构造1列数据,data.plot() DataFrame 构造4列数据,data.plot() data.plot.scatter(x='A', y='C') END 阅读全文
posted @ 2019-02-26 14:55 YangZhaonan 阅读(239) 评论(0) 推荐(0) 编辑
摘要: ` pd.Series() 构造数据 pd.date_range() 生成数据 pd.DataFrame() 构造数据 pd.DataFrame() 构造数据 pd.DataFrame() 构造数据 属性 df2.dtypes df2.index df2.columns df2.values df2 阅读全文
posted @ 2019-02-26 14:55 YangZhaonan 阅读(211) 评论(0) 推荐(0) 编辑
摘要: select by label: loc 属性值 select by position: iloc 属性编号 mixed selection: ix 标签值+标签标号 Boolean indexing 布尔 下面是所有的输出结果: END 阅读全文
posted @ 2019-02-26 14:55 YangZhaonan 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 赋值,新增列数据 df.iloc[2,2], df.loc['2013 01 03', 'D'] df.A[df.A 0], df['F'] 以下是所有的运行结果: END 阅读全文
posted @ 2019-02-26 14:55 YangZhaonan 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 以下是所有的输出结果: END 阅读全文
posted @ 2019-02-26 14:55 YangZhaonan 阅读(302) 评论(0) 推荐(0) 编辑
摘要: "官网The pandas I/O API" pickle格式是python自带的 END 阅读全文
posted @ 2019-02-26 14:55 YangZhaonan 阅读(224) 评论(0) 推荐(0) 编辑
摘要: pd.merge( df1, df2, on=['key1', 'key2'], left_index=True, right_index=True, how=['left', 'right', 'outer', 'inner'], indicator='indicator_column', suf 阅读全文
posted @ 2019-02-26 14:29 YangZhaonan 阅读(637) 评论(0) 推荐(0) 编辑