zoukankan      html  css  js  c++  java
  • 关于Tensorflow调试出现问题总结

    • ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory #5343:针对这个问题首先先分析你电脑是否装了cuda8.0,若不是,这可能是你在默认tensorflow配置时没有选择正确的cuda支持版本,这里补充说道,tensorflow用pip安装默认是cuda8.0版本,所以如果是cuda7.0的朋友需要用源码手动设置安装,但是对于cuda9.0,目前tensorflow不支持,如果想要安装,可以采用源码+补丁形式,不过过程相当麻烦,涉及bazel,gcc等。若是正确的cuda8.0,此时出现问题最有可能是因为没有设置环境变量,可在命令行输入export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64,立刻解决。
    • SSD-Tensorflow:TypeError: Can not convert a tuple into a Tensor or Operation:此问题在github有详细解答,具体如下,打开eval_ssd_network.py文件,然后加入以下代码:

    def flatten(x):  
        result = []  
        for el in x:  
             if isinstance(el, tuple):  
                   result.extend(flatten(el))  
             else:  
                   result.append(el)  
        return result  
    # Waiting loop.  
                slim.evaluation.evaluation_loop(  
                    master=FLAGS.master,  
                    checkpoint_dir=checkpoint_path,  
                    logdir=FLAGS.eval_dir,  
                    num_evals=num_batches,  
                    eval_op=flatten(list(names_to_updates.values())), #这里调用flatten  
                    variables_to_restore=variables_to_restore,  
                    eval_interval_secs=60,  
                    max_number_of_evaluations=np.inf,  
                    session_config=config,  
                    timeout=None)  
    # Standard evaluation loop.  
                start = time.time()  
                slim.evaluation.evaluate_once(  
                    master=FLAGS.master,  
                    checkpoint_path=checkpoint_path,  
                    logdir=FLAGS.eval_dir,  
                    num_evals=num_batches,  
                    eval_op=flatten(list(names_to_updates.values())), #这里也调用flatten  
                    variables_to_restore=variables_to_restore,  
                    session_config=config)  

    本问题是在编译tensorflow-ssd源码时遇到的https://github.com/balancap/SSD-Tensorflow,参考链接为https://github.com/balancap/SSD-Tensorflow/issues/154

  • 相关阅读:
    sublime text 3 常用快捷键
    PHP注释-----PHPDOC
    正则表达式
    JavaScript中常用的函数
    网站特效离不开脚本,javascript是最常用的脚本语言,我们归纳一下常用的基础函数和语法:
    ubuntu16.04LTS下安装zookeeper
    HiveQL详解
    ubuntu16.04LTS下安装hive-2.1.0
    Hadoop环境 IDE配置(在eclipse中安装hadoop-eclipse-plugin-2.7.3.jar插件)
    Hadoop 数据节点DataNode异常
  • 原文地址:https://www.cnblogs.com/xlqtlhx/p/7866791.html
Copyright © 2011-2022 走看看