THUHoloLab / Holo-encoder

High-speed computer-generated holography (CGH) using autoencoder-based deep neural network
46 stars 10 forks source link

Cannot use the trained mode #3

Open Alan957 opened 1 year ago

Alan957 commented 1 year ago

When I try to run the 'prediction_code.m', there are some erros as follows: ''' 警告: 加载类 'dlnetwork' 的对象时: 错误使用 dlnetwork/initialize 无效网络。

出错 dlnetwork (第 220 行) net = initialize(net, dlX{:});

出错 dlnetwork.loadobj (第 947 行) net = dlnetwork(in.LayerGraph, exampleInputs{:}, 'Initialize', in.Initialized);

出错 prediction_code (第 4 行) load Trained_4KDMDNet_Fresnel_30cm_520nm.mat

原因: 层 'Fcos': 在层 fft2DLayer 中使用预测函数时出错。该函数引发了错误,无法执行。 Output argument "varargout{3}" (and possibly others) not assigned a value in the execution with "nnet.layer/Layer/forward" function. 层 'Fsin': 在层 fft2DLayer 中使用预测函数时出错。该函数引发了错误,无法执行。 Output argument "varargout{3}" (and possibly others) not assigned a value in the execution with "nnet.layer/Layer/forward" function.

位置:prediction_code (第 4 行) 函数 'validateForwardInputs' 的输入或输出的数目或类型不正确。

出错 dlnetwork/forward (第 757 行) doForwardExampleInputs = validateForwardInputs(net.PrivateNetwork, x, "forward");

出错 prediction_code (第 13 行) dlY = forward(dlnet,dlX,'Outputs','tanh'); '''

hanbin123123123 commented 11 months ago

你好,我遇到了一样的问题,请问你有没有解决这个问题,能不能分享一下解决方法 @Alan957 @THUHoloLab

Alan957 commented 5 months ago

你好,我遇到了一样的问题,请问你有没有解决这个问题,能不能分享一下解决方法 @Alan957 @THUHoloLab

可以重新训练一下模型