vp_suite.model_blocks.traj_gru
- class Activation(act_type, negative_slope=0.2, inplace=True)
 Bases:
objectThis class implements a customizable activation function, as used by the TrajGRU RNN introduced in Shi et al. (https://arxiv.org/abs/1706.03458) and implemented in https://github.com/Hzzone/Precipitation-Nowcasting.
- __init__(act_type, negative_slope=0.2, inplace=True)
 
- class BaseConvRNN(device, num_filter, in_h, in_w, h2h_kernel=(3, 3), h2h_dilate=(1, 1), i2h_kernel=(3, 3), i2h_stride=(1, 1), i2h_pad=(1, 1), i2h_dilate=(1, 1), act_type=torch.tanh, prefix='BaseConvRNN')
 Bases:
vp_suite.base.base_model_block.VPModelBlockThis class implements a base class for the TrajGRU RNN, as introduced in Shi et al. (https://arxiv.org/abs/1706.03458) and implemented in https://github.com/Hzzone/Precipitation-Nowcasting.
- __init__(device, num_filter, in_h, in_w, h2h_kernel=(3, 3), h2h_dilate=(1, 1), i2h_kernel=(3, 3), i2h_stride=(1, 1), i2h_pad=(1, 1), i2h_dilate=(1, 1), act_type=torch.tanh, prefix='BaseConvRNN')
 Initializes internal Module state, shared by both nn.Module and ScriptModule.
- class TrajGRU(device, in_c, enc_c, state_h, state_w, zoneout=0.0, L=5, i2h_kernel=(3, 3), i2h_stride=(1, 1), i2h_pad=(1, 1), h2h_kernel=(5, 5), h2h_dilate=(1, 1), act_type=Activation('leaky', negative_slope=0.2, inplace=True))
 Bases:
vp_suite.model_blocks.traj_gru.BaseConvRNNThis class implements the TrajGRU RNN, as introduced in Shi et al. (https://arxiv.org/abs/1706.03458) and implemented in https://github.com/Hzzone/Precipitation-Nowcasting.
- CODE_REFERENCE = 'https://github.com/Hzzone/Precipitation-Nowcasting'
 The code location of the reference implementation.
- MATCHES_REFERENCE: str = 'Yes'
 A comment indicating whether the implementation in this package matches the reference.
- PAPER_REFERENCE = 'https://arxiv.org/abs/1706.03458'
 The publication where this model was introduced first.
- __init__(device, in_c, enc_c, state_h, state_w, zoneout=0.0, L=5, i2h_kernel=(3, 3), i2h_stride=(1, 1), i2h_pad=(1, 1), h2h_kernel=(5, 5), h2h_dilate=(1, 1), act_type=Activation('leaky', negative_slope=0.2, inplace=True))
 Initializes internal Module state, shared by both nn.Module and ScriptModule.
- forward(inputs, states, seq_len)
 Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.