Python shell中使用自己写的model

简介: ***`只需要将我们写的model文件夹拷贝到对应的python环境下的lib/下的对应python版本的site-packages目录下:`***我们这里以anconda里的虚拟环境做示范: 需要在pyth...
***`只需要将我们写的model文件夹拷贝到对应的python环境下的lib/下的对应python版本的site-packages目录下:`***

我们这里以anconda里的虚拟环境做示范:
需要在python命令行使用如下命令:
Step 1:

from autoencoder_models.DenoisingAutoencoder import AdditiveGaussianNoiseAutoencoder

所以我们需要将 autoencoder_models拷贝到对应的目录下:
Step2:

cp -r /home/zkpk/autoencoder_models /home/bymain/anaconda3/envs/tensor/lib/python2.7/site-packages/目录下即可

Step3:执行步骤1命令即可成功使用。

相关文章
|
4月前
|
Shell Python
python 和shell 变量互相传递
python 和shell 变量互相传递
48 0
|
4月前
|
人工智能 Shell 程序员
[oeasy]python005_退出游乐场_重启游乐场_系统态shell_应用态_quit
[oeasy]python005_退出游乐场_重启游乐场_系统态shell_应用态_quit
42 0
|
1月前
|
Unix Shell Python
在Shell中转换Python正则表达式
结合以上提到的注意事项与差异点,就能在Shell环境中巧妙地转换并使用Python正则表达式了。务实和节省时间的做法是,将一些常见Python正则模式记在手边,随时查阅并对照POSIX标准进行调整。同时,借助在线正则表达式测试器和文档也能有效地提升在Shell环境中处理正则表达式的能力。
32 5
|
1月前
|
Python
【Python】解决Can‘t find model ‘en‘. It doesn‘t seem to be a shortcut link, a Python package or a valid
在使用以下代码时,报错Can’t find model ‘en’. It doesn’t seem to be a shortcut link, a Python package or a valid path to a data directory.
43 1
|
26天前
|
API C++ Python
【Azure Function】示例运行 python durable function(model V2)
【Azure Function】示例运行 python durable function(model V2)
|
1月前
|
机器学习/深度学习 测试技术 API
【Python-Keras】Keras搭建神经网络模型的Model解析与使用
这篇文章详细介绍了Keras中搭建神经网络模型的`Model`类及其API方法,包括模型配置、训练、评估、预测等,并展示了如何使用Sequential模型和函数式模型来构建和训练神经网络。
25 1
|
28天前
|
存储 Shell 数据安全/隐私保护
minio一键安装脚本分享(shell和python)
minio一键安装脚本分享(shell和python)
40 0
|
28天前
|
关系型数据库 Shell 数据库
postgres14一键安装脚本分享(shell和python)
postgres14一键安装脚本分享(shell和python)
21 0
|
2月前
|
Python
费德勒权变模型(Fiedler Contingency Model)详解与Python代码示例
费德勒权变模型(Fiedler Contingency Model)详解与Python代码示例
|
4月前
|
运维 Shell Python
Shell和Python学习教程总结
Shell和Python学习教程总结