Hzzone / Precipitation-Nowcasting

pytorch implemention of trajGRU.
547 stars 171 forks source link

The implementation of Encoder-Forecaster is wrong, it's a Seq2Seq strcucture actually. #12

Closed NileZhou closed 4 years ago

NileZhou commented 4 years ago

Look at this file: Precipitation-Nowcasting/nowcasting/models/model.py: ` class EF(nn.Module):

def __init__(self, encoder, forecaster):
    super().__init__()
    self.encoder = encoder
    self.forecaster = forecaster

def forward(self, input):
    state = self.encoder(input) # <--- look here, all communication between encoder and forecaster are the variate: state, it's not right implementation of encoder-forecaster structure
    output = self.forecaster(state)
    return output

` For example, in encoder-forecaster structure, a cell must receive the cell states of left cell (at the same level) as input except the cell states from up/down level, but the code didn't implement it, so it's a seq2seq structure, not a encoder-forecaster structure.

Contact me for more details if the author think it's necessary: Qq: 1 0 three three one 6 1 wu wu si

Hzzone commented 4 years ago

https://github.com/Hzzone/Precipitation-Nowcasting/blob/1e38d21aec77522dcbce9c1ecdd2dab766112788/nowcasting/models/encoder.py#L31