【发布时间】:2016-08-14 18:35:46
【问题描述】:
我正在使用作者提供的code 复制作品“用于文本分类的字符级卷积网络”。
当我完成训练过程后,我得到了存储在“sequential_50000_1458876622.t7b”中的转储模型,其可视化图像为sequential_50000_1458876622.png。
我一直试图弄清楚如何在训练后应用转储模型。我不确定如何在新的未分类数据上使用它。这是我在torch7中尝试过的:
th> model=torch.load("sequential_5000_1458675427.t7b")
th> model
它显示:
nn.Sequential {
[input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> (8) -> (9) -> (10) -> (11) -> (12) -> (13) -> (14) -> (15) -> (16) -> (17) -> (18) -> (19) -> (20) -> (21) -> (22) -> (23) -> (24) -> output]
(1): nn.TemporalConvolution
(2): nn.Threshold
(3): nn.TemporalMaxPooling
(4): nn.TemporalConvolution
(5): nn.Threshold
(6): nn.TemporalMaxPooling
(7): nn.TemporalConvolution
(8): nn.Threshold
(9): nn.TemporalConvolution
(10): nn.Threshold
(11): nn.TemporalConvolution
(12): nn.Threshold
(13): nn.TemporalConvolution
(14): nn.Threshold
(15): nn.TemporalMaxPooling
(16): nn.Reshape(8704)
(17): nn.Linear(8704 -> 1024)
(18): nn.Threshold
(19): nn.Dropout(0.000000)
(20): nn.Linear(1024 -> 1024)
(21): nn.Threshold
(22): nn.Dropout(0.000000)
(23): nn.Linear(1024 -> 14)
(24): nn.LogSoftMax
}
我不知道如何使用这个模型来预测新的未分类数据。
【问题讨论】:
标签: deep-learning torch conv-neural-network