Comments (2)
您好,我是一名研二学生,想通过您的代码学习convLSTM,但是在进行训练的时候,运行“train_model('nox',model_nox)”总是出现如下错误:"Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead."可以向您请教一下是什么原因吗,谢谢您啦
你好,我想问一下你前面的问题解决了么
from air_pollutants_prediction_lstm.
这个错误是由于你试图将一个带有梯度信息的Tensor类型变量转换为numpy数组导致的
如果你有一个带梯度信息的Tensor类型变量t,你希望将其转换为ndarray,可以通过以下代码实现
array = t.detach().numpy()
from air_pollutants_prediction_lstm.
Related Issues (2)
- N/A HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from air_pollutants_prediction_lstm.