Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion torchbenchmark/models/drq/drq.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def forward_conv(self, obs):
conv = torch.relu(self.convs[i](conv))
self.outputs['conv%s' % (i + 1)] = conv

h = conv.view(conv.size(0), -1)
# Changed view to reshape here to support channels last input
# TODO: upstream this change to https://github.com/denisyarats/drq/blob/master/drq.py#L48
h = conv.reshape(conv.size(0), -1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add one-line comment mention that this is an improvement that doesn't exist in the upstream code (with link to the upstream code at https://github.com/denisyarats/drq/blob/master/drq.py#L48)?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xuzhao9 We can submit a PR to upstream too. Does it sound good to you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xuzhao9 We can submit a PR to upstream too. Does it sound good to you?

Sure, if you can submit a PR to upstream and get accepted, we don't need the comment line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added one-line comment as suggested for now.
I'll submit a PR to upstream this. If it is accepted, let me submit a following-up PR later to this benchmark repo to remove the one-line comment. Is it okay?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that shoulds perfect to me!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I've submitted a PR to the upstream drq repo: denisyarats/drq#27.

return h

def forward(self, obs, detach=False):
Expand Down