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

I think the Bootstrapped Rescaled Activation in the code is not useful #20

Open
3015218116 opened this issue Dec 5, 2018 · 3 comments

Comments

@3015218116
Copy link

def rescale( reward, rollout_num=1.0): reward = np.array(reward) x, y = reward.shape ret = np.zeros((x, y)) for i in range(x): l = reward[i] rescalar = {} for s in l: rescalar[s] = s idxx = 1 min_s = 1.0 max_s = 0.0 for s in rescalar: rescalar[s] = redistribution(idxx, len(l), min_s) idxx += 1 for j in range(y): ret[i, j] = rescalar[reward[i, j]] return ret

I read the code, but I didn't see any sorting behavior, more like scaling by insertion order. If this code is collating, "for s in rescalar," it might be more reasonable to read it in some sort order. Please advise, thank you very much.

@3015218116 3015218116 changed the title the Bootstrapped Rescaled Activation in the code may not useful I think the Bootstrapped Rescaled Activation in the code is not useful Dec 5, 2018
@desire2020
Copy link

The sorting operation is hidden behind the the implementation of the Python ``map'' object. As it is implemented by a binary search tree, which automatically sort the inserted elements, the operation to iterate through its key element (for s in rescalar, if you may notice) would result in a ordered visit of them.
Hope this note helps.

@joonazan
Copy link

joonazan commented Mar 8, 2020

@desire2020 That is not true. dict keys are iterated over in a random order.

@Kljon
Copy link

Kljon commented May 13, 2020

I have the same question. dict keys are iterated over in random order. Is it have any explanation?

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

4 participants