如果MPSCNNConvolutionDataSource协议的load方法返回false,会发生什么?

时间:2019-06-22 02:29:27

标签: ios metal metal-performance-shaders

如果MPSCNNConvolutionDataSource协议的load方法返回false,会发生什么?系统会抛出错误还是卷积层只是静默失败?如果它无声地失败了,我怎么知道它失败了?

1 个答案:

答案 0 :(得分:2)

它触发断言:

/BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalImage/MetalImage-121.4.3/
MPSNeuralNetwork/Filters/MPSCNNConvolution.mm:1605: failed assertion 
`[MPSCNNConvolution initWithDevice:convolutionDescriptor:weights:] weights.load 
should return YES'