他的回复:
net_loss = nn.BCELoss(reduction='mean') 作为损失函数在GPU下报错:CPU不报错!ValueError: epoch: 1 step: 128. Invalid loss, terminating training. [WARNING] MD(5785,7fb8e8165740,python):2022-07-01-09:07:49.404.738 [mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc:73] ~DeviceQueueOp] preprocess_batch: 129; batch_queue: 0, 0, 0, 0, 0, 0, 1, 1, 0, 0; push_start_time: 2022-07-01-09:07:42.458.070, 2022-07-01-09:07:43.081.295, 2022-07-01-09:07:43.732.158, 2022-07-01-09:07:44.442.533, 2022-07-01-09:07:45.133.851, 2022-07-01-09:07:45.765.521, 2022-07-01-09:07:46.364.052, 2022-07-01-09:07:46.978.847, 2022-07-01-09:07:47.577.356, 2022-07-01-09:07:48.415.993; push_end_time: 2022-07-01-09:07:42.458.192, 2022-07-01-09:07:43.081.383, 2022-07-01-09:07:43.732.246, 2022-07-01-09:07:44.442.617, 2022-07-01-09:07:45.133.934, 2022-07-01-09:07:45.765.641, 2022-07-01-09:07:46.364.133, 2022-07-01-09:07:46.978.925, 2022-07-01-09:07:47.577.442, 2022-07-01-09:07:48.486.117.