ML_Trouble_Shooting

作者: senmonster | 来源:发表于2018-11-23 14:40 被阅读0次

    bug: moudle tensorflow has no attribute set random seed:
    fix:重新安装

    find ~/anaconda3/ -name 'tensorflow*' | xargs sudo rm -rf && cd ~/tensorflow/tensorflow_pkg/ && pip install tensorflow*.whl
    

    bug: maplotlib chinese font error:
    fix:download SimHei.ttf to next path, 终端命令:
    cd /usr/share/fonts/ && wget https://github.com/StellarCN/scp_zh/raw/master/fonts/SimHei.ttf
    cp SimHei.ttf ~/anaconda3/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf
    修改配置文件matplotlibrc 同样在matplotlib/mpl-data/ 目录下面,修改下面三项配置
    font.family : sans-serif
    font.sans-serif : SimHei, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif axes.unicode_minus:False,#作用就是解决负号'-'显示为方块的问题
    python代码

    from matplotlib.font_manager import _rebuild
    
    _rebuild() #reload一下
    plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
    plt.rcParams['axes.unicode_minus']=False # 用来正常显示负号
    

    bug: jupyter download as pdf
    fix: sudo apt-get install texlive texlive-latex-extra pandoc

    相关文章

      网友评论

        本文标题:ML_Trouble_Shooting

        本文链接:https://www.haomeiwen.com/subject/vpejqqtx.html