malizationLayer reluLayer transposedConv2dLayer(2,256,'Stride',2) convolution2dLayer(3,256,'Padding','same') batchNormalizationLayer reluLayer convolution2dLayer(3,256,'Padding','same') batchNormalizationLayer reluLayer transposedConv2dLayer(2,128,'Stride',2) convolution2dLayer(3,128,'Padding','same') batchNormalizationLayer reluLayer convolution2dLayer(3,128,'Padding','same') batchNormalizationLayer reluLayer transposedConv2dLayer(2,64,'Stride',2) convolution2dLayer(3,64,'Padding','same') batchNormalizationLayer reluLayer convolution2dLayer(3,64,'Padding','same') batchNormalizationLayer reluLayer convolution2dLayer(1,numClasses) softmaxLayer pixelClassificationLayer ]; % 定义训练选项 options = trainingOptions('adam', ... 'MaxEpochs', 50, ... 'MiniBatchSize', 16, ... 'InitialLearnRate', 1e-3, ... 'Shuffle', 'every-epoch', ... 'ValidationData', {data.valvol, data.valseg}, ... 'ValidationFrequency', 10, ... 'Verbose', true, ... 'Plots', 'training-progress'); % 训练UNET网络 unet = trainNetwork(data.trainvol, data.trainseg, layers, options);中valvol为验证集文件夹,为什么引用了不存在的字段 'valvol'。
时间: 2023-08-06 20:11:05 浏览: 75
Pytorch.nn.conv2d 过程验证方式(单,多通道卷积过程)
这可能是因为您在定义数据时没有使用正确的字段名。请确保在定义数据时使用了正确的字段名,并将其传递给训练选项中的相应参数。例如,如果您的验证数据集的字段名为“valVol”,则应使用以下代码:
```
'ValidationData', {data.valVol, data.valSeg}
```
阅读全文