feature=torch.cat#seq_len*
daily_tech_cn_out=self.daily_tech_cn_encoder#seq_len*ticker_len*dimdaily_tech_cn_out=self.pooling).squeeze.repeat#seq_len*dim
daily_fin_cn_out=self.daily_fin_cn_encoder#seq_len*ticker_len*dimdaily_fin_cn_out=self.pooling).squeeze.repeat#seq_len*dim
classDeepPredictor:def__init__:super.__init__self.ticker_encoder=TickerEncoderself.time_encoder=TimeEncoderself.intraday_tech_encoder=FeatureEncoderself.daily_tech_cn_encoder=FeatureEncoderself.daily_tech_us_encoder=FeatureEncoderself.daily_fin_cn_encoder=FeatureEncoderself.pooling=nn.AdaptiveAvgPool1dself.pooling2=nn.AdaptiveMaxPool1dself.classifier=nn.Lineardefforward:time_out=self.time_encoder)#seq_len*dimintraday_tech_out=self.intraday_tech_encoder,intraday_tech_ticker.squeeze)#seq_len*ticker_len*dimintraday_tech_out1=self.pooling).squeeze#seq_len*dimintraday_tech_out2=self.pooling.squeeze#seq_len*dimseq_len=intraday_tech_out.shape[0]
文章为作者独立观点,不代表股票交易接口观点