上一页 1 ··· 329 330 331 332 333 334 335 336 337 ··· 345 下一页
摘要: # multinput and multioutput from numpy import arrayfrom keras.models import Sequentialfrom keras.layers import Densefrom keras.l... 阅读全文
posted @ 2018-10-16 16:55 luoganttcc 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 1. 不去路边垃圾小店,聚类算法,多去那种地方,身上将具那些人的特征,不去茅台路面馆,2. 外出就餐简单最好,牛奶面包就好3. 在公司,牛奶,面包,水果就好,路边小店多为低端小店,脏乱差 阅读全文
posted @ 2018-10-16 13:07 luoganttcc 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 一对一的LSTM# one input and one outputfrom numpy import arrayfrom keras.models import Sequentialfrom keras.layers import Densefrom ke... 阅读全文
posted @ 2018-10-13 14:23 luoganttcc 阅读(122) 评论(0) 推荐(0) 编辑
摘要: super() 的入门使用在类的继承中,如果重定义某个方法,该方法会覆盖父类的同名方法,但有时,我们希望能同时实现父类的功能,这时,我们就需要调用父类的方法了,可通过使用 super 来实现,比如:class Animal(object): def _... 阅读全文
posted @ 2018-10-07 16:38 luoganttcc 阅读(68) 评论(0) 推荐(0) 编辑
摘要: super的作用是降低多继承时的算法复杂度,和什么父类没有关系class A: def __init__(self): print("Enter A") print("Leave A")class B(A): def __init__(sel... 阅读全文
posted @ 2018-10-07 16:31 luoganttcc 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 在OOP程序设计中,当我们定义一个class的时候,可以从某个现有的class继承,新的class称为子类(Subclass),而被继承的class称为基类、父类或超类(Base class、Super class)。class Animal(object)... 阅读全文
posted @ 2018-10-06 21:37 luoganttcc 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 如果要让内部属性不被外部访问,可以把属性的名称前加上两个下划线__,在Python中,实例的变量名如果以__开头,就变成了一个私有变量(private),只有内部可以访问,外部不能访问class Student(object): def __init_... 阅读全文
posted @ 2018-10-06 21:28 luoganttcc 阅读(93) 评论(0) 推荐(0) 编辑
摘要: class Student(object): def __init__(self, name, score): self.name = name self.score = score def print_score(s... 阅读全文
posted @ 2018-10-06 21:20 luoganttcc 阅读(181) 评论(0) 推荐(0) 编辑
摘要: import torchimport torch.nn as nnimport torchvision.datasets as normal_datasetsimport torchvision.transforms as transformsfrom to... 阅读全文
posted @ 2018-10-06 20:46 luoganttcc 阅读(215) 评论(0) 推荐(0) 编辑
摘要: import torchfrom torch.autograd import *from torch import nn,optimfrom torch.utils.data import DataLoaderfrom torchvision imp... 阅读全文
posted @ 2018-10-06 19:16 luoganttcc 阅读(360) 评论(0) 推荐(0) 编辑
上一页 1 ··· 329 330 331 332 333 334 335 336 337 ··· 345 下一页