From be4baaf37a1fdfaca47ee487739ba1888a02708f Mon Sep 17 00:00:00 2001 From: grantbuster Date: Fri, 15 Nov 2024 13:19:17 -0700 Subject: [PATCH] docstrings --- phygnn/layers/custom_layers.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/phygnn/layers/custom_layers.py b/phygnn/layers/custom_layers.py index 2ef8dee..aabc9b4 100644 --- a/phygnn/layers/custom_layers.py +++ b/phygnn/layers/custom_layers.py @@ -27,7 +27,8 @@ def __init__(self, paddings, mode='REFLECT', option='tf'): Option for TensorFlow padding ("tf") or numpy ("np"). Default is tf for tensorflow training. We have observed silent failures of tf.pad() with larger array sizes, so "np" might be preferable at - inference time on large chunks. + inference time on large chunks, but it is much slower when it has + to convert tensors to numpy arrays. """ super().__init__() self.paddings = tf.constant(paddings) @@ -490,11 +491,13 @@ def __init__(self, spatial_mult=1, temporal_mult=1, where the feature axis is unpacked into the temporal axis. t_roll : int Option to roll the temporal axis after expanding. When using - temporal_method="depth_to_time", the default (t_roll=0) will - add temporal steps after the input steps such that if input - temporal shape is 3 and the temporal_mult is 24x, the output will - have the original timesteps at idt=0,24,48 but if t_roll=12, the - output will have the original timesteps at idt=12,36,60 + temporal_method="depth_to_time", the default (t_roll=0) will add + temporal steps after the input steps such that if input temporal + shape is 3 and the temporal_mult is 24x, the output will have the + index-0 timesteps at idt=0,24,48 but if t_roll=12, the output will + have the original timesteps at idt=12,36,60. This is no longer + recommended, as a positive roll will move the features of timestep + -1 from the end of the series to the beginning. """ super().__init__()