- Working : PaddlePaddle
- Languages : Python, C++, C#.
- Skills : Computer Vision, Machine Learning, Model Compression.
Last Edited on: 19/09/2022
Credits: this is modified from Isha Gupta
Reproduction process of AlexNet
License: Apache License 2.0
Last Edited on: 19/09/2022
Credits: this is modified from Isha Gupta
torch2paddle.py提示错误
torch2paddle.py中
def transfer():
input_fp = "resnet50-0676ba61.pth"
output_fp = "model.pdparams"
# torch_dict = torch.load(input_fp)['model']
提示
Traceback (most recent call last):
File "H:/论文复现0814/ResNet50-livingbody/torch2paddle.py", line 71, in <module>
transfer()
File "H:/论文复现0814/ResNet50-livingbody/torch2paddle.py", line 31, in transfer
torch_dict = torch.load(input_fp)['model']
KeyError: 'model'
亲,能提供下requirements.txt嘛?
我运行老出问题。
parser.add_argument(
'--data-path', default='/paddle/data/ILSVRC2012_torch', help='dataset')
想本地把程序跑起来作比对
我在使用您给的服务端部署示例中,已经走通了全部流程,可是只能输出一个结果
输出如下:
{'err_no': 0, 'err_msg': '', 'key': ['class_id', 'confidence', 'left_top', 'right_bottom'], 'value': ['[0]', '[0.92535084]', '[[283.15506, 8.095686]]', '[[636.6692, 391.48724]]'], 'tensors': []}
我做的任务是目标检测,在 infer 中,输出有 4 个 boxes,这里只显示了第一个,我换了一张图也是一样,只会输出第一个 boxes 的结果,输出的这个结果是完全和 infer 对的上的,只是还有几个没有输出。
于是,我打印了 fetch_dict 结果如下:
{'concat_5.tmp_0': array([100], dtype=int32), 'concat_6.tmp_0': array([[ 0. , 0.92535084, 283.15506 , 8.095686 , 636.6692 , 391.48724 ]], dtype=float32)}
“concat_5.tmp_0” 中的 100 表示预测的结果有 100 个 boxes,“concat_6.tmp_0” 按理说应该有 100 个结果。
在 AlexNet-paddle / train.py中有语句from apex import amp
但在aistudio中运行代码:
from apex import amp会出错。
应该怎么用paddle复现:
from apex import amp ?
fake_data数据在不同网络中前向传播即step1中,diff_threshold默认为1e-6,可否视情况(网络、数据因素)更改为1e-5等
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.