ZhengyaoJiang / PGPortfolio

PGPortfolio: Policy Gradient Portfolio, the source code of "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem"(https://arxiv.org/pdf/1706.10059.pdf).
GNU General Public License v3.0
1.74k stars 750 forks source link

Depth of EIIE_Dense layer #60

Closed WojciechMigda closed 6 years ago

WojciechMigda commented 6 years ago

Hi, EIEE_Dense layer specification in net_config.json has depth hard coded as 10. Unless my understanding is fundamentally wrong, this value is directly related to the number of traded assets. Hence, should it be dynamically determined in learn/network.py from the input tensor dimension instead?

dexhunter commented 6 years ago

Unless my understanding is fundamentally wrong, this value is directly related to the number of traded assets.

The filter number of EIIE_Dense is not related to the number of traded assets. The number of traded assets (exclude cash) is determined by coin number (or self._rows at network.py) .

edit: And the filter number 10 is tuned automatically rather than manually.

edit2: possible related to #54

dlacombejr commented 6 years ago

EIEE_Dense layer specification in net_config.json has depth hard coded as 10.

The number that you refer to (10) is the number of filters in that layer, not the depth. Depth is calculated automatically based on the number of filters in the first convolutional layer (default to 3). The other filter dimensions are set as [1, width], where width is the resulting length of the tensor on the 2nd dimension after the first convolutional layer.