clownw / reinforcement-learning-with-pytorch Goto Github PK
View Code? Open in Web Editor NEWReinforcement learning with PyTorch, inspired by MorvanZhou, change the framework from Tensorflow to PyTorch
Reinforcement learning with PyTorch, inspired by MorvanZhou, change the framework from Tensorflow to PyTorch
在莫烦的网课里使用了 tensorboard来展示网络结构,想请教一下pytorch如何使用tensorboard来展示网络结构(看过很多教程,都是在add_graph方法中传入module,但DQN类并不是一个module,而是由两个module组成的,所以想请教一下有无解决方案)
I didn't change anything about 8_Actor_Critic_Advantage/AC_CartPole.py
. I just ran it, but I got this
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [20, 1]], which is o
utput 0 of TBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gr
adient, with torch.autograd.set_detect_anomaly(True).
So, I add torch.autograd.set_detect_anomaly(True)
to code, but I got this
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [20, 1]], which is o
utput 0 of TBackward, is at version 2; expected version 1 instead. Hint: the backtrace further above shows the operation that failed to compute its g
radient. The variable in question was changed in there or anywhere later. Good luck!
my pytorch version is 1.7.0.
my numpy version is 1.18.5
RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.增加了detach()也一样报错,输出loss图异常
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.