From eb55d80fe504ed99f69dd8016dfdfbe728e084a7 Mon Sep 17 00:00:00 2001 From: Leona Odole Date: Tue, 15 Jul 2025 11:00:42 +0200 Subject: [PATCH 1/2] added citation for resnet --- bayesflow/experimental/resnet/resnet.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bayesflow/experimental/resnet/resnet.py b/bayesflow/experimental/resnet/resnet.py index 862e0ac98..ad2e985e2 100644 --- a/bayesflow/experimental/resnet/resnet.py +++ b/bayesflow/experimental/resnet/resnet.py @@ -12,10 +12,14 @@ @serializable("bayesflow.networks", disable_module_check=True) class ResNet(keras.Sequential): """ - Implements the ResNet architecture. + Implements the ResNet architecture, from [1] Note that we still apply dropout and activation to the output and do not flatten it, so you will need to flatten it yourself and apply at least one linear layer after this network. + + [1]He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. + In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 770-778). + arXiv:1512.03385 """ def __init__( From 5445822864100f409d4ff64ad19f15cbb2ba0728 Mon Sep 17 00:00:00 2001 From: Valentin Pratz Date: Tue, 15 Jul 2025 11:49:52 +0000 Subject: [PATCH 2/2] minor formatting --- bayesflow/experimental/resnet/resnet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bayesflow/experimental/resnet/resnet.py b/bayesflow/experimental/resnet/resnet.py index ad2e985e2..d92cef30a 100644 --- a/bayesflow/experimental/resnet/resnet.py +++ b/bayesflow/experimental/resnet/resnet.py @@ -12,12 +12,12 @@ @serializable("bayesflow.networks", disable_module_check=True) class ResNet(keras.Sequential): """ - Implements the ResNet architecture, from [1] + Implements the ResNet architecture, from [1]. Note that we still apply dropout and activation to the output and do not flatten it, so you will need to flatten it yourself and apply at least one linear layer after this network. - [1]He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. + [1] He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 770-778). arXiv:1512.03385 """