【论文复现】steganoGAN项目运行整理

参考链接:
SteganoGAN 项目运行过程

SteganoGAN 项目复现

实验室配置

  • 服务器显卡 RTX 3090 ;内存 62G
  • CUDA 11.2
  • Ubuntu 18.04

开发环境:vscode + python 3.7.0


修改pip源的方法,用everything搜pip.ini进行修改
可选的pip源链接如下:

国内的镜像源
阿里云 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
清华大学 -i  https://pypi.tuna.tsinghua.edu.cn/simple/
国外默认源
默认源 -i https://pypi.org/simple

报错整理

  1. 错误提示
    RuntimeError: CUDA out of memory. Tried to allocate 288.00 MiB (GPU 0; 23.70 GiB total capacity; 2.01 GiB already allocated; 223.56 MiB free; 2.02 GiB reserved in total by PyTorch)
    GPU进程占满了
    解决方案
    在Xshell中输入watch -n 1 nvidia-smi或者nvidia-smi,查看占用GPU的进程
    然后输入sudo kill PID(进程号)

  2. 错误提示
    cuDNN error: CUDNN_STATUS_EXECUTION_FAILED
    可能是因为CUDA和显卡驱动不对应,我重装了显卡驱动,安装了cuDNN,更新了torch和几个库(别的操作不记得了),解决了
    参考链接
    ubuntu安装 anaconda3+cuda11.2+cuDNN+pytorch1.7 这个写的比较详细

  3. 错误提示
    decode时报错,提示bits为bool类型的list,无法转为int类型
    解决方案
    在utils.py中添加下图红框中三行代码(感谢邢同学)
    utils.py修改

  4. 报错:AttributeError: module 'PIL.TiffTags' has no attribute 'IFD'
    解决方案 :更新pillow包到7.1.2 pillow的下载地址

成功运行,但是decode方法中没写输出message,自己在models.py里加一行
print(candidate)就行 (2022.1.4补充:其实命令行有输出,只是之前应该没有解码成功所以没有)
如图

运行结果


虚拟环境导出

通过pip导出虚拟环境
pip freeze>requirements.txt
在新虚拟环境中安装requirements.txt中包列表:
pip install -r requirements.txt

服务器的虚拟环境如下:python 3.7.0

Package Version

argcomplete 1.12.3
backcall 0.2.0
backports.functools-lru-cache 1.6.4
debugpy 1.5.1
decorator 5.1.0
entrypoints 0.3
flake8 4.0.1
imageio 2.4.1
importlib-metadata 4.2.0
ipykernel 6.6.0
ipython 7.30.1
jedi 0.18.1
jupyter-client 7.1.0
jupyter-core 4.9.1
matplotlib-inline 0.1.3
mccabe 0.6.1
mkl-fft 1.3.1
mkl-random 1.2.2
mkl-service 2.4.0
nest-asyncio 1.5.4
numpy 1.21.4
olefile 0.46
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
Pillow 7.1.2
pip 21.3.1
prompt-toolkit 3.0.23
ptyprocess 0.7.0
pycodestyle 2.8.0
pyflakes 2.4.0
Pygments 2.10.0
python-dateutil 2.8.2
pyzmq 22.3.0
reedsolo 0.3
scipy 1.1.0
setuptools 59.4.0
six 1.16.0
steganogan 0.1.3
torch 1.7.1
torchaudio 0.7.0a0+a853dff
torchvision 0.8.2
tornado 6.1
tqdm 4.62.3
traitlets 5.1.1
typing_extensions 4.0.1
wcwidth 0.2.5
wheel 0.37.0
yapf 0.31.0
zipp 3.6.0


2022.6.17 更新
Windows电脑上会报错,但ubuntu可以用下面评论中上传的模型跑通
跑通的环境如下

backcall==0.2.0
certifi==2022.5.18.1
debugpy==1.6.0
decorator==5.1.1
entrypoints==0.4
imageio==2.4.1
ipykernel==6.9.1
ipython==7.34.0
jedi==0.18.1
jupyter-client==7.3.4
jupyter-core==4.10.0
matplotlib-inline==0.1.3
nest-asyncio==1.5.5
numpy==1.21.6
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==6.2.2
prompt-toolkit==3.0.29
ptyprocess==0.7.0
Pygments==2.12.0
python-dateutil==2.8.2
pyzmq==23.1.0
reedsolo==0.3
scipy==1.1.0
six==1.16.0
steganogan==0.1.3
torch==1.7.1
torchvision==0.2.1
tornado==6.1
tqdm==4.64.0
traitlets==5.3.0
typing_extensions==4.2.0
wcwidth==0.2.5
  • 5
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 41
    评论
作为AI语言模型,我无法直接为您SCI论文,但我可以提供以下有关电力负荷预测的SCI论文及其实的参考: 1. Li, X., Yang, L., & Zhang, Q. (2017). Short-term load forecasting using extreme learning machine and a hybrid approach. Electric Power Systems Research, 142, 11-20. 该论文采用极限学习机和混合方法进行短期负载预测。极限学习机是一种基于单个隐含层前向反馈神经网络的快速学习算法。混合方法结合了时序分解和回归方法,通过分析负载数据的季节性和趋势性变化来预测负载。 2. Wang, J., Wang, Q., Lu, X., Huang, Z., & Wu, Y. (2016). A new short-term load forecasting method based on extreme learning machine and multi-objective optimization algorithm. Energy, 114, 1141-1149. 该论文提出了一种基于极限学习机和多目标优化算法的新型短期负载预测方法。该方法使用多目标优化算法对模型进行调优,并采用交叉验证和残差分析来验证模型的预测性能。 3. Chen, J., Hong, T., & Pinson, P. (2018). Probabilistic load forecasting using deep learning feed-forward neural networks. IEEE Transactions on Smart Grid, 9(2), 770-779. 该论文采用深度学习前馈神经网络技术进行随机负载预测。该方法将负载数据看作是随机变量,通过训练神经网络来学习每个随机变量的概率分布,从而实概率负载预测。 4. Akter, M., & Mahmud, M. A. (2019). Electrical load forecasting using artificial neural network and particle swarm optimization: A comparative study. Alexandria Engineering Journal, 58(3), 997-1006. 该论文对比了采用人工神经网络和粒子群优化的电力负载预测方法。研究表明,采用粒子群优化的方法可以提高预测精度,并降低误差率。 以上是一些常见的电力负荷预测SCI论文及其方法介绍,您可以结合自己的研究方向和需求进行选择和参考。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 41
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

岁月漫长_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值