gpt4 book ai didi

machine-learning - Caffe 在打印数据 -> 标签后挂起

转载 作者:行者123 更新时间:2023-11-30 08:52:22 24 4
gpt4 key购买 nike

我正在尝试根据自己的数据(1024 个类别的 37 x 37 灰度图像)训练 LeNet。

我创建了 lmdb 文件,并将输出层的大小更改为 1024。当我使用解算器文件运行 caffe train 时,程序在打印后卡住了

...
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "score"
bottom: "label"
top: "loss"
}
I0713 17:11:13.334890 9595 layer_factory.hpp:77] Creating layer data
I0713 17:11:13.334939 9595 net.cpp:91] Creating Layer data
I0713 17:11:13.334950 9595 net.cpp:399] data -> data
I0713 17:11:13.334961 9595 net.cpp:399] data -> label

可能是什么问题?
我是咖啡新手,任何帮助将不胜感激。

<小时/>

求解器.prototxt

net: "lenet_auto_train.prototxt"
test_iter: 100
test_interval: 500
base_lr: 0.01
momentum: 0.9
weight_decay: 0.0005
lr_policy: "inv"
gamma: 0.0001
power: 0.75
display: 100
max_iter: 10000
snapshot: 5000
snapshot_prefix: "lenet"

lenet.prototxt

layer {
name: "data"
type: "Data"
top: "data"
top: "label"
transform_param {
scale: 0.00392156862745
}
data_param {
source: "dir/dat/1024_37*37_gray_lmdb"
batch_size: 64
backend: LMDB
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
convolution_param {
num_output: 20
kernel_size: 5
weight_filler {
type: "xavier"
}
}
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv2"
type: "Convolution"
bottom: "pool1"
top: "conv2"
convolution_param {
num_output: 50
kernel_size: 5
weight_filler {
type: "xavier"
}
}
}
layer {
name: "pool2"
type: "Pooling"
bottom: "conv2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "fc1"
type: "InnerProduct"
bottom: "pool2"
top: "fc1"
inner_product_param {
num_output: 500
weight_filler {
type: "xavier"
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "fc1"
top: "fc1"
}
layer {
name: "score"
type: "InnerProduct"
bottom: "fc1"
top: "score"
inner_product_param {
num_output: 1024
weight_filler {
type: "xavier"
}
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "score"
bottom: "label"
top: "loss"
}

最佳答案

在我的例子中,当同一个 LMDB 用于训练和测试时,就会发生这种情况。

关于machine-learning - Caffe 在打印数据 -> 标签后挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38348801/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com