v2ray+wordpress参考博客 准备工作vpsvultr购买vps,选择New York,3.5$/mo。 freenomfreenom申请域名,不用开vpn,Edit Account Details中修改Country、City和所在城市匹配即可。 My Domains -> Manage Domain -> Manage Freenom DNS,添加对应的A记录,如下图,Target中填写购买的vps地址 v2ray配置通过一键安装脚本,脚本github 按提示操作即可,如果v2ray内核版本较低,注意选择兼容模式 wordpress环境安装 安装lrzsz,传输两个 ...
git操作
命令 查看远程所有分支 git branch -a * dev master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/release/caigou_v1.0 新建分支并切换到指定分支 git checkout -b dev origin/release/caigou_v1.0 该命令可以将远程git仓库里的指定分支拉取到本地,这样就在本地新建了一个dev分支,并和指定的远程分支release/caigou_v1.0关联了起来。 Switched to a new branch ...
Paddle目标检测
Paddle目标检测V1.8paddlepaddle 1.8.3paddlehub 1.8.3 预测测试图像: 代码(calParams可以计算参数量): import osimport paddlehub as hubimport numpy as npdef calParams(model): Total_params = 0 Trainable_params = 0 NonTrainable_params = 0 _, _, main_prog = model.context() for block in main_prog.blocks: ...
Paddle图像分类
Paddle图像分类V1.8paddlepaddle 1.8.3paddlehub 1.8.3 预测import paddlehub as hubimport osdef run(img_name): classifier = hub.Module(directory="vgg19_imagenet") path = './images/' input_dict = {"image": [os.path.join(path, img_name)]} result = classifier.classification(data=input_dict) ...
docker操作
构建镜像commit 新建容器 在容器内安装所需的环境 通过commit命令建立新的image docker commit container_id image_name:tag Dockerfile 将项目代码拷贝到主机某一路径下(可以通过docker cp,并保证路径下没有其他文件) 在同一路径下创建Dockerfile文件 FROM fasttext:1.0ADD ./docker_file /home/FasttextWORKDIR /home/FasttextCMD ["python3", "/home/Fasttext/api.py" ...
机器学习复习
一、机器学习介绍&线性、逻辑回归什么是机器学习 要学什么—决策函数 从哪里学—训练数据 怎样学习—求解机器学习模型 针对某个任务 (Task ),利用训练数据 (Experience ),求解一个学习模型,从而提高该任务的性能 (Performance) 机器学习要素: 任务、目标(Task) 使用经验数据(Experience) 提高学习性能(Performance) 线性、逻辑回归多元线性回归 损失函数几何意义:试图找到一个超平面,使所有样本到超平面上的欧式距离之和最小 梯度下降法求解 随机梯度下降法 正规方程 比较 MSE (mean square error) ...
tfidf-ldada文本分类
Tfidf为了统计词频,将分词后的字符串分割成词 X_train = [[word for word in line.split()] for line in X_train]X_test = [[word for word in line.split()] for line in X_test] def tfidf(X_train): # print(X_train[:3]) dict = corpora.Dictionary(X_train) # dict.save('dict1.dict') corpus = [dict.doc2bow(text) for tex ...
fasttext文本分类
fastText1Install如果直接用 pip install fasttext会报一堆错误,所以用以下方法安装: $ git clone https://github.com/facebookresearch/fastText.git$ cd fastText$ pip install . 这样安装后会出现在powershell中可以import fasttext,但在Anaconda Prompt中或者pycharm中无法import的问题。报错:ImportError:DLL load failed 解决方案是conda中activate 另一个环境,pip install fast ...
image-caption-papers_202004_Oscar
Oscar: Object-Semantics Aligned Pre-training for Vision-Language TasksOscar: Object-Semantics Aligned Pre-training The code and pre-trained models are released: https://github.com/microsoft/Oscar We pre-train an Oscar model on the public corpus of 6.5 million text-image pairs, and fine-tune it on d ...
image caption综述
image caption综述AttentionSoft AttentionK. Xu, J. Ba, K. Ryan et al., “Show, attend and tell: neural image caption generation with visual attention,” in Proceedings of the IEEE Conference on Computer Vision andPattern Recognition, pp. 2048–2057, Boston, MA, USA, June 2015. Hard AttentionK. Xu, J. Ba, ...