AI4Finance-Foundation / AI4Finance-Foundation/ElegantRL

An confusion about sample

Ouverte
#463 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
4.4k
Forks
978
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

def sample(self, batch_size: int) -> Tuple[TEN, TEN, TEN, TEN, TEN, TEN]:
ids = th.randint(self.cur_size - 1, size=(batch_size,), requires_grad=False)
return (
self.states[ids],
self.actions[ids],
self.rewards[ids],
self.undones[ids],
self.unmasks[ids],
self.states[ids + 1],
)
Is this not a good way to deal with it? I think other people use dictionaries to deal with it。

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by reading the sample method shown in the issue and tracing its callers to understand the expected six returned values and the state indexing. Compare that expectation with the project’s existing replay-buffer usage; done means the behavior or intended tuple structure is clarified and any necessary change is covered by the relevant tests, though no test file is named in the issue.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python, pytorch
Domaine
machine-learning
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.