[DL]Efficient Graph-Based Image Segmentation

2022-6-29 写技术

import os import math import torch import matplotlib.pyplot as plt from PIL import Image from torchvision import transforms from torchvision.transforms import ToPILImage MAX_VAL = 65535 means = [0.485, 0.456, 0.406] stds = [ 0.229, 0.224, 0.225] def cost_edge(a, b): ret = 0 ...

阅读全文>>

标签: neural network linux python machine_learning DL

评论(0) 浏览(1178)

[DL]SRGAN

2022-6-9 写技术

import os import sys import torch import torch.nn as nn import torch.nn.functional as F from PIL import Image,ImageFilter import matplotlib.pyplot as plt import numpy as np import torchvision from torchvision import transforms from torchvision.transforms import ToTensor from torchvision.t...

阅读全文>>

标签: python machine_learning DL

评论(0) 浏览(792)

[DL]ESPCN

2022-6-9 写技术

import os import sys import torch import torch.nn as nn import torch.nn.functional as F from PIL import Image,ImageFilter import matplotlib.pyplot as plt import numpy as np import torchvision from torchvision import transforms from torchvision.transforms import ToTensor from torchvision.t...

阅读全文>>

标签: python machine_learning DL

评论(0) 浏览(630)

[DL]DRRN

2022-6-9 写技术

import os import sys import torch import torch.nn as nn import torch.nn.functional as F from PIL import Image,ImageFilter import matplotlib.pyplot as plt import numpy as np import torchvision from torchvision import transforms from torchvision.transforms import ToTensor from torchvision.t...

阅读全文>>

标签: python machine_learning DL

评论(0) 浏览(702)

[DL]ESRT: Transformer for Single Image Super

2022-5-31 写技术

""" Author: Nicholas Xiao Blog: log.anycle.com """ import os import sys import torch import torch.nn as nn import torch.nn.functional as F from PIL import Image,ImageFilter import matplotlib.pyplot as plt import numpy as np import torchvision from torchvision import transforms from tor...

阅读全文>>

标签: python machine_learning DL

评论(0) 浏览(720)

[DL] Transformer: Attention Is All You Need

2022-5-26 写技术

import os import sys import torch import torch.nn as nn import math from torch.autograd import Variable import spacy import random import numpy as np import torch.nn.functional as F import copy d_model = 4 opt = { "vec_dim":512, "heads":8, "N":6, "x_vocab_len":0, ...

阅读全文>>

标签: python machine_learning DL

评论(0) 浏览(665)

[ML]Dataset of Watermellon

2022-1-25 写技术

编号,色泽,根蒂,敲声,纹理,脐部,触感,好瓜 1,青绿,蜷缩,浊响,清晰,凹陷,硬滑,是 2,乌黑,蜷缩,沉闷,清晰,凹陷,硬滑,是 3,乌黑,蜷缩,浊响,清晰,凹陷,硬滑,是 4,青绿,蜷缩,沉闷,清晰,凹陷,硬滑,是 5,浅白,蜷缩,浊响,清晰,凹陷,硬滑,是 6,青绿,稍蜷,浊响,清晰,稍凹,软粘,是 7,乌黑,稍蜷,浊响,稍糊,稍凹,软粘,是 8,乌黑,稍蜷,浊响,清晰,稍凹,硬滑,是 9,乌黑,稍蜷,沉闷,稍糊,稍凹,硬滑,否 10,青绿,硬挺,清脆,清晰,平坦,软粘,否 11,浅白,硬挺,清脆,模糊,平坦,硬滑,否 12,浅白,蜷缩,浊响,模糊,平坦,软粘...

阅读全文>>

标签: machine_learning

评论(0) 浏览(1014)

[ML]Decision Tree

2022-1-25 写技术

class node: def __init__(self): self.subtree = [] class decisionTree: def __init__(self): self.raw_data = [] self.raw_data_lines = 0 self.a = [] self.a_num = 0 def load_data(self, path): fp = open(path, "r") lines = 0...

阅读全文>>

标签: machine_learning

评论(0) 浏览(822)

[python]k-近邻算法

2016-6-7 写技术

书上把kNN抄了一遍,跑起来爽爽的: from numpy import * import operator def createDataSet(): group = array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]]) labels = ['A','A','B','B'] return group,labels def classify0(inX, dataSet, labels, k): dataSetSize = dataSet.shape[0] diffMat = tile(inX, (dataSetSize, ...

阅读全文>>

标签: python machine_learning

评论(0) 浏览(1554)

Powered by anycle 湘ICP备15001973号-1