Coder Social home page Coder Social logo

Some questions on about iqn-and-extensions HOT 5 CLOSED

844015539 avatar 844015539 commented on May 28, 2024
Some questions on

from iqn-and-extensions.

Comments (5)

BY571 avatar BY571 commented on May 28, 2024

hey @844015539 ,

thank you for your feedback!
First, munchausen is a new concept that recently was published. I wrote a medium article about it: Article or you can check out the original Paper.
when you start a normal experiment just let munchausen set at 0.

IQN-DQN.ipynb is just a simple notebook for the base algorithm. you probably don't need it but if you want to open it you need to open jupyter notebook

from iqn-and-extensions.

844015539 avatar 844015539 commented on May 28, 2024

Hello,Dittert
I'm sorry to disturb you .I wanna ask you some questions about your code on "agent". And my doubts are mainly result in "def learn_per(self, experiences):"
1.Q_targets_next = Q_targets_next.gather(2, action_indx.unsqueeze(-1).expand(self.BATCH_SIZE, self.N, 1)).transpose(1,2)
Q_expected = Q_expected.gather(2, actions.unsqueeze(-1).expand(self.BATCH_SIZE, self.N, 1))
I want to ask "action_indx", is it wrong? I didn't see your any defination about it in the former code. Moreover, in the " Q_expected ",it turns to be "actions".
2."assert td_error.shape == (BATCH_SIZE, self.N, self.N), "wrong td error shape" " ,Why does "self.N" appear 2 times?
I am looking foraward to your reply.

from iqn-and-extensions.

844015539 avatar 844015539 commented on May 28, 2024

OH,I am sorry ,it is my fault . I am too careless to see action_indx.

from iqn-and-extensions.

844015539 avatar 844015539 commented on May 28, 2024

Hello,Dittert
I want to know what is "self.layer_size = layer_size" mean? Does it mean the size of convolution layer's output? I see some code in 《deep reinforcement learning hands on》,Is 'layer_size ' means 'conv_out_size'? I think the following defination will be more prudent and clear.
I hope you can answer my question.Thank you!

self.conv = nn.Sequential(
        nn.Conv2d(input_shape[0], 32, kernel_size=8, stride=4),
        nn.ReLU(),
        nn.Conv2d(32, 64, kernel_size=4, stride=2),
        nn.ReLU(),
        nn.Conv2d(64, 64, kernel_size=3, stride=1),
        nn.ReLU()
    )

    conv_out_size = self._get_conv_out(input_shape)
    self.fc_adv = nn.Sequential(
        nn.Linear(conv_out_size, 256),
        nn.ReLU(),
        nn.Linear(256, n_actions)
    )
    self.fc_val = nn.Sequential(
        nn.Linear(conv_out_size, 256),
        nn.ReLU(),
        nn.Linear(256, 1)
    )

def _get_conv_out(self, shape):
    o = self.conv(torch.zeros(1, *shape))
    return int(np.prod(o.size()))

from iqn-and-extensions.

BY571 avatar BY571 commented on May 28, 2024

hey @844015539,

layer_size is the number of neurons in a linear layer. In the readme you can read about it as well... :
Size of the hidden layer, default=512

from iqn-and-extensions.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.