github

cropper实现基本的裁剪图片并上传

筅森魡賤 提交于 2021-02-08 20:57:16
使用cropper之前需要先引用 cropper.css 和 cropper.js cropper 官网:https://fengyuanchen.github.io/cropper/ cropper.css下载:https://github.com/fengyuanchen/cropperjs/tree/master/docs/css cropper.js下载:https://github.com/fengyuanchen/cropperjs/tree/master/docs/js 然后我们来了解一下cropper的基本属性及方法 参数options    1. viewMode(定义cropper的视图模式) 类型:number;默认:0;可以使用0,1,2,3; 0:没有限制,3可以移动到2外。 1 : 3只能在2内移动。 2:2图片 不全部铺满1 (即缩小时可以有一边出现空隙) 3:2图片填充整个1    2. dragMode (定义cropper的拖拽模式) 类型: String 默认: ‘crop’ 选项: ‘crop’: 可以产生一个新的裁剪框3 ‘move’: 只可以移动3 ‘none’: 什么也不处理    3. aspectRatio—-裁剪框的宽高比 类型:number;默认:NAN; 在默认的时候。可以随意改变裁剪框的大小;我这里的设置的值为 16/9;

GitHub README.md files are displaying '#' symbols instead of rendering as <headers>

情到浓时终转凉″ 提交于 2021-02-08 19:40:11
问题 github readme.md files are displaying '#' symbols instead of rendering as headers #Please FORK this project ##Visit our descriptive wiki instead of being rendered as: Please FORK this project Visit our descriptive wiki from what i can tell, it just started out of nowhere, it used to be fine - dumb, i know. any advice? 回答1: You need to have a space after the # character before the text. That will give you what you want. Then you will get what you want! In general, Markdown is pretty picky

ICLR2020国际会议精彩演讲抢先看(含源码)!!

試著忘記壹切 提交于 2021-02-08 16:34:53
喜欢我们,点击上方 AINLPer ,关注一下,极品干货即刻送达! 今天天气是真不错~可惜还是不能出去。所以今天 整理了2020年ICLR会议的论文,并给大家分享出了ICLR2020国际会议演讲的主题和主要内容。 引言 2020年的 ICLR会议 将于今年的 4月26日-4月30日 在Millennium Hall, Addis Ababa ETHIOPIA(埃塞俄比亚首都亚的斯亚贝巴 千禧大厅)举行。 2020年ICLR会议(Eighth International Conference on Learning Representations)论文接受结果刚刚出来, 今年的论文接受情况如下: poster-paper共523篇,Spotlight-paper(焦点论文)共107篇,演讲Talk共48篇,共计接受678篇文章,被拒论文(reject-paper)共计1907篇,接受率为: 26.48%。 回复: ICLR2020 获取会议全部列表PDF(方便您的收集整理) ,其中一共有四个文件( 2020-ICLR-accept-poster.pdf 、 2020-ICLR-accept-spotlight.pdf 、 2020-ICLR-accept-talk.pdf 、 2020-ICLR-reject.pdf ),如果你不想下载,也可直接访问官网: https:/

【ICLR2020】Transformer Complex-order:一种新的位置编码方式

旧巷老猫 提交于 2021-02-08 16:34:26
补一下昨天没发完的一篇 文中公式若显示不全可左右滑动~ 比较有意思的论文 [1] ,关注的点也是在序列建模的位置信息编码。先前的方法通过引入额外的位置编码,在 embedding 层将词向量和位置向量通过加性编码融合, 但是该种方式每个位置向量是独立训练得到的,并不能建模序列的 order relationship (例如邻接或优先关系),作者将此称为 the position independece problem 。 针对该问题论文提出了一种新的位置编码方式,将独立的词向量替换成自变量为位置的函数,于是单词表示会随着位置的变化而平滑地移动,可以更好地建模单词的绝对位置和顺序信息。 其中, 表示此表中序号为 的单词在位置 时的单词向量, 表示函数集合, 表示单词到函数的映射,展开即为, 为了达到上述要求,函数应该满足以下两个条件: Property 1. Position-free offset transformation 对于任意位置 pos 和 ,存在变换 Transform Transform 满足, 特别地,论文考虑 Transform 为线性变换 Property 2. Boundedness 函数应该是有界的, 接下去,论文证明了满足上述两个条件的解函数形式为, ❝ 贴一下论文给的证明:(看不看无所谓,能用就行 haha) 假设函数 满足上述两个条件,则对于任意位置

Is there a way to trigger a CircleCI build on a Pull Request?

怎甘沉沦 提交于 2021-02-08 15:32:53
问题 So, the problem I have is that right now CircleCI doesn't trigger builds on PRs, and I have checks that I'd like to run only on PRs. There is this option: Only build pull requests By default, we will build all the commits for this project. Once turned on, we will only build branches that have associated pull requests open. Note: For your default branch, we will always build all commits. However, this is not what I need, because I still need some checks to run on every commit, on all branches,

Is there a way to trigger a CircleCI build on a Pull Request?

一曲冷凌霜 提交于 2021-02-08 15:32:24
问题 So, the problem I have is that right now CircleCI doesn't trigger builds on PRs, and I have checks that I'd like to run only on PRs. There is this option: Only build pull requests By default, we will build all the commits for this project. Once turned on, we will only build branches that have associated pull requests open. Note: For your default branch, we will always build all commits. However, this is not what I need, because I still need some checks to run on every commit, on all branches,

ICLR2020 | 深度自适应Transformer

人盡茶涼 提交于 2021-02-08 14:57:35
作者 | kaiyuan 整理 | NewBeeNLP 一篇来自ICLR2020,facebook人工智能实验室的论文,关于改进Transformer推理速度的。 论文地址: https://arxiv.org/abs/1910.10073 写在前面 大模型在困难任务上表现非常好,而小模型也可以在比较简单的任务上表现出色。但是目前大模型在应用简单任务时的运算量同复杂任务一样,这就导致了不必要的资源浪费,此外还会导致推理速度变慢。对此,提出了一种 depth-adaptive transformer ,可以在推理阶段针对不同的token自动选择在合适的层进行停止并输出,在不损失模型效果的同时大大提高推理速度。 Anytime Prediction 传统的transformer decoder,所有的token都需要经过N个block,且最后的分类器是唯一的。但是一些简单的任务并不需要推理如此多步,可能在第 层模型已经得出结果了,再往上走并没有意义,于是可以选择在第 层就输出,这称为 「动态计算(Dynamic Computation)」 , 并且,每一层的分类器 可以选择不同或者相同。接下去就是怎么去实现上面的想法,即对于每个输入token,如何自动确定其在哪一层退出?文中提出了两种策略: Aligned training 对齐训练会同时优化所有分类器,并假设当前状态之前的所有状态

[NLP-CNN] Convolutional Neural Networks for Sentence Classification -2014-EMNLP

蹲街弑〆低调 提交于 2021-02-08 14:52:08
1. Overview 本文将CNN用于句子分类任务 (1) 使用静态vector + CNN即可取得很好的效果;=> 这表明预训练的vector是universal的特征提取器,可以被用于多种分类任务中。 (2) 根据特定任务进行fine-tuning 的vector + CNN 取得了更好的效果。 (3) 改进模型架构,使得可以使用 task-specific 和 static 的vector。 (4) 在7项任务中的4项取得了SOTA的效果。 思考:卷积神经网络的核心思想是捕获局部特征。在图像领域,由于图像本身具有局部相关性,因此,CNN是一个较为适用的特征提取器。在NLP中,可以将一段文本n-gram看做一个有相近特征的片段——窗口,因而希望通过CNN来捕获这个滑动窗口内的局部特征。卷积神经网络的优势在于可以对这样的n-gram特征进行组合和筛选,获取不同的抽象层次的语义信息。 2. Model 对于该模型,主要注意三点: 1. 如何应用的CNN,即在文本中如何使用CNN 2. 如何将static和fine-tuned vector结合在一个架构中 3. 正则化的策略 本文的思路是比较简单的。 2.1 CNN的应用 <1> feature map 的获取 word vector 是k维,sentence length = n (padded)

Reuse portion of github action across jobs

£可爱£侵袭症+ 提交于 2021-02-08 14:18:13
问题 I have a workflow for CI in a monorepo, for this workflow two projects end up being built. The jobs run fine, however, I'm wondering if there is a way to remove the duplication in this workflow.yml file with the setting up of the runner for the job. I have them split so they run in parallel as they do not rely on one another and to be faster to complete. It's a big time difference in 5 minutes vs. 10+ when waiting for the CI to finish. jobs: job1: name: PT.W Build runs-on: macos-latest steps:

How do I use an env file with GitHub Actions?

混江龙づ霸主 提交于 2021-02-08 13:53:11
问题 I have multiple environments (dev, qa, prod) and I'm using .env files to store secrets etc... Now I'm switching to GitHub Actions, and I want to use my .env files and declare them into the env section of the github actions yml. But from what I've seen so far, it seems that I can not set a file path and I have to manually re-declared all variables. How should I proceed as best practice? 回答1: Edit: You were using Circleci Contexts, so with that you had a set of secrets of each env. I know they