zoukankan      html  css  js  c++  java
  • PyTorch-->pytorch学习(2)

    IPython

    1.torch.abs? # 查看abs函数文档

    2.torch.abs?? # 查看abs函数源码

    3.%timeit a.sum() # 检测a.sum()执行时间

    4.%hist # 查看输入历史

    5.%paste # 执行粘贴板中的代码

    6.%cat a.py # 查看a.py文件中的内容

    7.%run -i a.py # 执行a.py, -i:在当前命名空间执行,使用当前命名空间中的变量,结果返回至当前命名空间

     jupyter

    pip install jupyter # 安装

    jupyter notebook # 启动

    # 使用密码登录

    ipython

    from notebook.auth import passwd

    passwd() # 设置jupyter密码

    # jupyter_config.py文件内容

    # passwd
    c.NotebookApp.password = u'xxxx'

    # bind ip
    c.NotebookApp.ip = 'xxxx'

    # bind port
    c.NotebookApp.port = xxxx

    # 在jupyter_config.py文件所在文件夹下启动cmd

    jupyter notebook --config=jupyter_config.py # 配置

    http://ip:port # 浏览器启动

    To see I can not see, to know I do not know.
  • 相关阅读:
    超链接导航栏案例
    css中定位功能的特性
    background的使用
    数据库单表查询
    各种算法
    面向对象能做什么和特性及嵌套
    c3算法详解
    面向对象继承
    生成器
    迭代器
  • 原文地址:https://www.cnblogs.com/aluomengmengda/p/14192145.html
Copyright © 2011-2022 走看看