Coder Social home page Coder Social logo

Issue about youtube-code-repository HOT 3 OPEN

philtabor avatar philtabor commented on August 23, 2024
Issue

from youtube-code-repository.

Comments (3)

Zaibali9999 avatar Zaibali9999 commented on August 23, 2024

(array([ 0.0047165 , -0.04676152, -0.03735694, -0.0472385 ], dtype=float32), {})
D:\AI\PPO\torch\ppo_torch.py:137: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_new.cpp:233.)
state = T.tensor([observation], dtype=T.float).to(self.actor.device)
Traceback (most recent call last):
File "D:\AI\PPO\torch\main.py", line 31, in
action, prob, val = agent.choose_action(observation)
File "D:\AI\PPO\torch\ppo_torch.py", line 137, in choose_action
state = T.tensor([observation], dtype=T.float).to(self.actor.device)
ValueError: expected sequence of length 4 at dim 2 (got 0)

from youtube-code-repository.

Zaibali9999 avatar Zaibali9999 commented on August 23, 2024

same issue with torch agent

from youtube-code-repository.

RAFAY-AAMIR-GULL avatar RAFAY-AAMIR-GULL commented on August 23, 2024

Hey Hi ,
I'm getting the same error:

state = T.tensor([observation], dtype=T.float).to(self.actor.device)
Traceback (most recent call last):
File "/home/rafay/RL/ReinforcementLearning/PolicyGradient/PPO/torch/main.py", line 33, in
action, prob, val = agent.choose_action(observation)
File "/home/rafay/RL/ReinforcementLearning/PolicyGradient/PPO/torch/ppo_torch.py", line 142, in choose_action
state = T.tensor([observation], dtype=T.float).to(self.actor.device)
ValueError: expected sequence of length 4 at dim 2 (got 0)

@Zaibali9999 if you have solved the issue, can you please help me out?
@philtabor please guide.

Thanks

from youtube-code-repository.

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.