3&4.numpy.array基础,创建numpy数组和矩阵
摘要:3.numpy.array基础 导入numpy import numpy numpy.__version__ '1.16.5' 也可以将numpy这个包命名 import numpy as np np.__version__ '1.16.5' python 中 list 的的特点 格式自由 list
阅读全文
posted @
2022-03-31 21:42
饮冰未
阅读(112)
推荐(0) 编辑
2.Jupyter Notebook 高级命令
摘要:2.Jupyter Notebook 高级命令 %run 命令 %run myscripts/printhello.py MachineLearning 同时也把printhello这个函数也加载了进来 printhello('MachineLearning') Hello MachineLearn
阅读全文
posted @
2022-03-31 21:11
饮冰未
阅读(128)
推荐(0) 编辑
1.Jupyter Notebook初级命令
摘要:1.Jupyter Notebook初级命令 1 + 2 3 for i in range(3): print('hello world') hello world hello world hello world 5 + 8 * 2 21 5 + 6 11 运行当前单元格 Ctrl + Enter
阅读全文
posted @
2022-03-31 21:00
饮冰未
阅读(87)
推荐(0) 编辑
Siamese-pytorch连体网络训练(平台:Colab)
摘要:项目使用GPU加速训练,在Colab界面点击“修改->笔记本设置->硬件加速器选择GPU”,保存后需要重新连接 1 首先从github克隆项目 !git clone https://github.com/ClarkGableWang/Siamese-pytorch.git 2 下载数据集 impor
阅读全文
posted @
2022-03-18 16:25
饮冰未
阅读(138)
推荐(0) 编辑
少样本学习(Few-shot Learning)
摘要:一 1 与传统的监督学习不同,few-shot leaning的目标是让机器学会学习;使用一个大型的数据集训练模型,训练完成后,给出两张图片,让模型分辨这两张图片是否属于同一种事物。比如训练数据集中有老虎、大象、汽车、鹦鹉等图片样本,训练完毕后给模型输入两张兔子的图片让模型判断是否是同一种事物,或者
阅读全文
posted @
2022-03-18 15:08
饮冰未
阅读(1407)
推荐(0) 编辑
最大均值差异MMD实现(pytorch)
摘要:import torch import random import matplotlib.pyplot as plt from torch.autograd import Variable def rbf_kernel(source, target, kernel_mul=2.0, kernel_n
阅读全文
posted @
2022-03-18 14:57
饮冰未
阅读(1947)
推荐(2) 编辑
基于SVM的鸢尾花数据集不同特征的分类
摘要:import numpy as np from matplotlib import colors from sklearn import svm from sklearn.svm import SVC from sklearn import model_selection import matplo
阅读全文
posted @
2022-03-18 10:09
饮冰未
阅读(394)
推荐(0) 编辑