Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensor3 not used #3

Open
Dahll opened this issue Apr 2, 2021 · 0 comments
Open

Tensor3 not used #3

Dahll opened this issue Apr 2, 2021 · 0 comments

Comments

@Dahll
Copy link

Dahll commented Apr 2, 2021

The 3rd tensor where you add previous porfolio repartition is never used. It's not what is explain by the paper.
`

        with tf.variable_scope("Tensor3"):
            #w from last periods
            # trick to have good dimensions
            w_wo_c = self.W_previous[:, 1:]
            w_wo_c = tf.expand_dims(w_wo_c, 1)
            w_wo_c = tf.expand_dims(w_wo_c, -1)
            self.tensor3 = tf.concat([self.conv2, w_wo_c], axis=3)

        with tf.variable_scope("Conv3"):
            #last feature map WITHOUT cash bias
            self.conv3 = tf.layers.conv2d(
                inputs=self.conv2,
                activation=tf.nn.relu,
                filters=1,
                strides=(self.n_filter_2 + 1, 1),
                kernel_size=(1, 1),
                padding='same')

        with tf.variable_scope("Tensor4"):
            #last feature map WITH cash bias
            self.tensor4 = tf.concat([self.cash_bias, self.conv3], axis=2)
            # we squeeze to reduce and get the good dimension
            self.squeezed_tensor4 = tf.squeeze(self.tensor4, [1, 3])

        with tf.variable_scope("Policy_Output"):
            # softmax layer to obtain weights
            self.action = tf.nn.softmax(self.squeezed_tensor4)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant