Comments (1)
C:/cece/2021/testple2/ple2/run.py:142: UserWarning: Using a target size (torch.Size([2048])) that is different to the input size (torch.Size([1])) is deprecated. Please ensure they have the same size.
Traceback (most recent call last):File "", line 39, in
dev_auc1, dev_auc2, dev_loss1, dev_loss2 = evaluate(config,model, dev_iter)File "C:/cece/2021/testple2/ple2/train_eval_snr.py", line 142, in evaluate
loss1 = config.loss_fn(outputs1.view(-1), label1,reduction='mean')File "C:\software\WinPython-64bit-3.6.2.0Qt5\python-3.6.2.amd64\lib\site-packages\torch\nn\functional.py", line 2106, in binary_cross_entropy
"!= input nelement ({})".format(target.numel(), input.numel()))ValueError: Target and input must have the same number of elements. target nelement (2048) != input nelement (1)
运行报上面错误,但是train_eval_snr.py文件我已经改为 #outputs,regul = model(trains)
outputs = model(trains),还是报错,想不明白
估计shape需要转换一下,你看下尺寸一致啊
from multitask.
Related Issues (6)
- gate 输入的一个问题 HOT 3
- PLE这个可以运行成功吗 HOT 1
- PLE训练效果 HOT 1
- SNR的penalty在算loss的时候没有被使用 HOT 1
- 请教一下,snr模型应该是先过低层子网络,再过transform layer?
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 multitask.