Steps required to install Paralells Tools on Manjaro Linux
Steps
Install Manjaro Linux on a VM (it’s recommended to take a snapshot before installing Parallels Tools)
Update the OS
1
pacman -Syu
Install the latest LTS kernel and kernel headers (See this)
Note: To install the headers, run uname -r and look at the first two numbers to figure out the package name. For example if the output of uname -r is 4.19.32-1-MANJARO the kernel headers package name for your kernel would be linux419-headers.
Install base-devel package group and DKMS
1
pacman -S base-devel dkms
Connect the Parallels Tools image and run the installer script
1 2 3
mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom /mnt/cdrom/install
set hlsearch set backspace=2 set ruler set showmode set nu setbg=dark set softtabstop=4 set shiftwidth=4 set fileencodings=utf-8,gbk,gb18030,gk2312 syntax on set showcmd set clipboard+=unnamed set cursorline set confirm set autoindent set cindent set expandtab set laststatus=2
(gdb) where #0 _rt0_amd64 () at /usr/lib/go/src/runtime/asm_amd64.s:15 #1 0x0000000000000001 in ?? () #2 0x00007fffffffdd2c in ?? () #3 0x0000000000000000 in ?? ()
# Search search: insight:true# you need to install `hexo-generator-json-content` before using Insight Search swiftype:# enter swiftype install key here baidu:false# you need to disable other search engines to use Baidu search
footer: # Specify the year when the site was setup. If not defined, current year will be used. #since: 2021
# Icon between year and copyright info. icon: # Icon name in Font Awesome. See: https://fontawesome.com/icons name: fa fa-heart # If you want to animate the icon, set it to true. animated: false # Change the color of icon, using Hex Code. color: "#ff0000"
# If not defined, `author` from Hexo `_config.yml` will be used. # Set to `false` to disable the copyright statement. copyright:
# Powered by Hexo & NexT powered: true
# Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn beian: enable: false icp: # The digit in the num of gongan beian. gongan_id: # The full num of gongan beian. gongan_num: # The icon for gongan beian. See: http://www.beian.gov.cn/portal/download gongan_icon_url:
图片懒加载设置
在主题配置文件中启用 lazyload
1
copylazyload: true
设置代码块复制和代码高亮
在主题配置文件中修改 codeblock
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
codeblock: # Code Highlight theme # All available themes: https://theme-next.js.org/highlight/ theme: light: atom-one-dark dark: stackoverflow-dark prism: light: prism dark: prism-dark # Add copy button on codeblock copy_button: enable: true # Available values: default | flat | mac style: # Fold code block fold: enable: false height: 500
# Sidebar Avatar avatar: # Replace the default image and set the url here. url: /images/avatar.png # If true, the avatar will be displayed in circle. rounded: true # If true, the avatar will be rotated with the cursor. rotated: true
侧边栏社交链接
修改主题配置文件
1 2 3 4 5 6 7 8 9 10
social: GitHub: https://github.com/Qeuroal || fab fa-github #E-Mail: mailto:yourname@gmail.com || fa fa-envelope #Weibo: https://weibo.com/yourname || fab fa-weibo #Twitter: https://twitter.com/yourname || fab fa-twitter #FB Page: https://www.facebook.com/yourname || fab fa-facebook #StackOverflow: https://stackoverflow.com/yourname || fab fa-stack-overflow #YouTube: https://youtube.com/yourname || fab fa-youtube #Instagram: https://instagram.com/yourname || fab fa-instagram #Skype: skype:yourname?call|chat || fab fa-skype
在文章底部增加版权信息
编辑 主题配置文件,修改如下配置:
1 2 3 4 5 6 7 8 9 10
creative_commons: # Available values: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | cc-zero license: by-nc-sa # Available values: big | small size: small sidebar: false post: true # You can set a language value if you prefer a translated version of CC license, e.g. deed.zh # CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org language:
开启缓存
1 2 3
# Allow to cache content generation. Introduced in NexT v6.0.0. cache: enable: true
压缩
1 2
# Remove unnecessary files after hexo generate. minify: true
侧边栏显示分类条数
1 2
# Posts / Categories / Tags in sidebar. site_state: true
友链
1 2 3 4 5 6 7 8 9 10
# Blog rolls 友链 links_settings: icon: fa fa-link # 设置icon title: 友情链接 # 设置标题 # Available values: block | inline layout: block # css样式,是一行一条,还是自动换行
# Local Search # Dependencies: https://github.com/next-theme/hexo-generator-searchdb local_search: enable: true # If auto, trigger search by changing input. # If manual, trigger search by pressing enter key or search button. trigger: auto # Show top n results per article, show all results by setting to -1 top_n_per_article: 1 # Unescape html strings to the readable one. unescape: false # Preload the search data when the page loads. preload: false
A tensor is the primary data structure used by neural networks.
官方定义2
A PyTorch Tensor is conceptually identical to a numpy array: a Tensor is an n-dimensional array, and PyTorch provides many functions for operating on these Tensors.
通俗理解
多维数组(Tensors and nd-arrays are the same thing! So tensors are multidimensional arrays or nd-arrays for short.)
Indexes required
Computer science
Mathematics
n
nd-array
nd-tensor
A scalar is a $0$ dimensional tensor
A vector is a $1$ dimensional tensor
A matrix is a $2$ dimensional tensor
A nd-array is an $n$ dimensional tensor
拓展
We often see this kind of thing where different areas of study use different words for the same concept.
索引
obvious: 访问一个多维数组, 需要几个索引
秩
即维数,或者说在张量中访问一个元素,需要的索引数
A tensor’s rank tells us how many indexes are needed to refer to a specific element within the tensor.
轴
An axis of a tensor is a specific dimension of a tensor.
tensor 属性
torch.dtype
Data type
dtype
CPU tensor
GPU tensor
32-bit floating point
torch.float32
torch.FloatTensor
torch.cuda.FloatTensor
64-bit floating point
torch.float64
torch.DoubleTensor
torch.cuda.DoubleTensor
16-bit floating point
torch.float16
torch.HalfTensor
torch.cuda.HalfTensor
8-bit integer (unsigned)
torch.uint8
torch.ByteTensor
torch.cuda.ByteTensor
8-bit integer (signed)
torch.int8
torch.CharTensor
torch.cuda.CharTensor
16-bit integer (signed)
torch.int16
torch.ShortTensor
torch.cuda.ShortTensor
32-bit integer (signed)
torch.int32
torch.IntTensor
torch.cuda.IntTensor
64-bit integer (signed)
torch.int64
torch.LongTensor
torch.cuda.LongTensor
torch.device
类型
CPU
GPU
指定GPU
1
device = torch.device('cuda:0')
注意
One thing to keep in mind about using multiple devices is that tensor operations between tensors must happen between tensors that ==exists on the same device==.
To backpropagate the error all we have to do is to loss.backward(). You need to clear the existing gradients though, ==else gradients will be accumulated to existing gradients.==