转自:https://blog.csdn.net/dss_dssssd/article/details/82977170
https://blog.csdn.net/dss_dssssd/article/details/82980222
https://blog.csdn.net/dss_dssssd/article/details/84103834
下面是使用squential来自定义网络层的例子:
自定义损失函数: