Git Product home page Git Product logo

Comments (4)

WillInvest avatar WillInvest commented on August 17, 2024

I noticed that if I change batch size to 32, then the weird "obs: torch.Size([64])" becomes "obs: torch.Size([32])"

so the error is somehow connected to the batch size

from tianshou.

WillInvest avatar WillInvest commented on August 17, 2024
buffer = PrioritizedVectorReplayBuffer(
    args.buffer_size,
    buffer_num=len(train_env),
    # ignore_obs_next=True,
    # save_only_last_obs=True,
    alpha=args.alpha,
    beta=args.beta,
)

when I comment out those two lines, problem solved.

Can someone help me explain what happens here? Really appreciate.

from tianshou.

dantp-ai avatar dantp-ai commented on August 17, 2024

@WillInvest I can look into it, but can you format your posts above to make the code more readable?

from tianshou.

MischaPanch avatar MischaPanch commented on August 17, 2024
buffer = PrioritizedVectorReplayBuffer(
    args.buffer_size,
    buffer_num=len(train_env),
    # ignore_obs_next=True,
    # save_only_last_obs=True,
    alpha=args.alpha,
    beta=args.beta,
)

when I comment out those two lines, problem solved.

Can someone help me explain what happens here? Really appreciate.

The buffer is currently very complicated, I was working on simplifying it and extending documentation in the last months. Will be merged to master soon.

ignore_obs_next should essentially never be set to True, it means that obs rolled forwards will be used instead of obs_next, which means making errors at the boundaries of episodes and at interrupted collections. It's only an option if one really really needs to save RAM, like maybe with atari envs, where observations are large.

save_only_last_obs should also not be touched.

from tianshou.

Related Issues (20)

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.