• python安装深度学习包theano,Pylearn2,scikit-neuralnetwork


    我用的是anaconda环境

    直接用anaconda安装

    下面 两条命令:

    anaconda search -t conda 包名
    conda install -c https://conda.anaconda.org/conda-forge 包名
     

    python2.7

    1. 安装numpy, scipy, theano:

    conda install -c https://conda.anaconda.org/conda-forge numpy

    conda install -c https://conda.anaconda.org/conda-forge scipy

    conda install -c https://conda.anaconda.org/conda-forge theano

     

    2.安装Pylearn2

       conda install -c https://conda.anaconda.org/conda-forge Pylearn2

    3.安装scikit-neuralnetwork

    git clone https://github.com/aigamedev/scikit-neuralnetwork.git

    cd scikit-neuralnetwork

    python setup.py develop

     4.测试

    conda install -c https://conda.anaconda.org/conda-forge nose

    nosetests -v sknn.tests

    结果报错:

     

    ======================================================================
    ERROR: Failure: ImportError (cannot import name downsample)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File"/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, inloadTestsFromName
        addr.filename,addr.module)
      File"/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, inimportFromPath
        returnself.importFromDir(dir_path, fqname)
      File"/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, inimportFromDir
        mod =load_module(part_fqname, fh, filename, desc)
      File"/home/kevin/scikit-neuralnetwork/sknn/tests/__init__.py", line 1,in
        from sknn.backend importlasagne
      File"/home/kevin/scikit-neuralnetwork/sknn/backend/lasagne/__init__.py",line 5, in
        from .mlp importMultiLayerPerceptronBackend
      File"/home/kevin/scikit-neuralnetwork/sknn/backend/lasagne/mlp.py",line 25, in
        import lasagne.layers
      File"/usr/local/lib/python2.7/dist-packages/lasagne/__init__.py", line19, in
        from . import layers
      File"/usr/local/lib/python2.7/dist-packages/lasagne/layers/__init__.py",line 7, in
        from .pool import *
      File"/usr/local/lib/python2.7/dist-packages/lasagne/layers/pool.py",line 6, in
        from theano.tensor.signalimport downsample
    ImportError: cannot import name downsample
    
    ----------------------------------------------------------------------

     

     

    解决办法:

    从开发模式安装lasagne

    git clone https://github.com/Lasagne/Lasagne.git
    cd Lasagne
    python setup.py install
     
    测试通过
  • 相关阅读:
    Spring Boot启动时数据库初始化spring.datasource(转)
    shell脚本中报错dirname:无效选项 b(转)
    java中ftpClient.listFiles()结果为空问题解决方案
    Visual Prompt Tuning AHU
    Weakly AlignmentFree RGBT Salient Object Detection With Deep Correlation Network AHU
    autocad2022中文破解版
    test
    openGauss WDR报告详细解读
    vscode 配置C/C++环境 出现问题 could not find the task 'g++' / 'gcc'
    OceanBase分布式事务剖析
  • 原文地址:https://www.cnblogs.com/xmeo/p/6964613.html
Copyright © 2020-2023  润新知