10 2018 档案

摘要:# univariate cnn-lstm examplefrom numpy import arrayfrom keras.models import Sequentialfrom keras.layers import LSTMfrom keras.mo... 阅读全文
posted @ 2018-10-31 13:10 luoganttcc 阅读(379) 评论(0) 推荐(0) 编辑
摘要:""" This script demonstrates the use of a convolutional LSTM network.This network is used to predict the next frame of an artific... 阅读全文
posted @ 2018-10-30 11:58 luoganttcc 阅读(2352) 评论(2) 推荐(0) 编辑
摘要:git链接 阅读全文
posted @ 2018-10-30 11:43 luoganttcc 阅读(85) 评论(0) 推荐(0) 编辑
摘要:文章链接如下链接 阅读全文
posted @ 2018-10-30 11:41 luoganttcc 阅读(167) 评论(0) 推荐(0) 编辑
摘要:import numpy as np, scipy.ndimage, matplotlib.pyplot as pltfrom scipy import statsfrom keras.models import Sequentialfrom keras.l... 阅读全文
posted @ 2018-10-30 11:37 luoganttcc 阅读(535) 评论(0) 推荐(0) 编辑
摘要:model = Sequential()# define CNN modelmodel.add(TimeDistributed(Conv2D(...))model.add(TimeDistributed(MaxPooling2D(...)))model.a... 阅读全文
posted @ 2018-10-29 15:39 luoganttcc 阅读(93) 评论(0) 推荐(0) 编辑
摘要:# univariate cnn-lstm examplefrom numpy import arrayfrom keras.models import Sequentialfrom keras.layers import LSTMfrom keras.la... 阅读全文
posted @ 2018-10-29 15:36 luoganttcc 阅读(128) 评论(0) 推荐(0) 编辑
摘要:import kerasfrom keras.models import Sequentialfrom keras.layers import Denseimport numpy as npfrom sklearn.model_selection impor... 阅读全文
posted @ 2018-10-29 11:32 luoganttcc 阅读(93) 评论(0) 推荐(0) 编辑
摘要:版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011026329/article/details/79190347 ... 阅读全文
posted @ 2018-10-28 17:37 luoganttcc 阅读(571) 评论(0) 推荐(0) 编辑
摘要:#listL = [x * x for x in range(10)]#generraterg = (x * x for x in range(10))gOut[4]: at 0x7f3d143048e0>LOut[5]: [0, 1, 4, 9, 16,... 阅读全文
posted @ 2018-10-28 11:26 luoganttcc 阅读(106) 评论(0) 推荐(0) 编辑
摘要:import numpy as npimport tensorflow as tfa=np.reshape(range(24),(4,2,3))sess=tf.InteractiveSession()b= tf.split(a,1,0)c=sess.run(... 阅读全文
posted @ 2018-10-26 19:18 luoganttcc 阅读(80) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf; import numpy as np; x = tf.constant([[1, 2, 3], [4, 5, 6]])cc=tf.transpose(x)init = tf.initialize_all_va... 阅读全文
posted @ 2018-10-26 10:51 luoganttcc 阅读(97) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Thu Oct 25 15:29:59 2018@author: lg"""import tensorflow as tfimport nu... 阅读全文
posted @ 2018-10-25 19:28 luoganttcc 阅读(88) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Thu Oct 25 13:41:35 2018@author: lg"""import numpy as npimport pandas ... 阅读全文
posted @ 2018-10-25 19:22 luoganttcc 阅读(364) 评论(0) 推荐(0) 编辑
摘要:import numpy as np import tensorflow as tf import tensorflow.contrib.rnn as rnn import matplotlib.pyplot as plt import matplotlib... 阅读全文
posted @ 2018-10-25 19:20 luoganttcc 阅读(114) 评论(0) 推荐(0) 编辑
摘要:网上看到很多tf.pad的文章,很多都语焉不详,需自己动手操作才能真正理解,pad,一言以蔽之,就是在矩阵的周围补0。 1. 对于二维矩阵,就是在 上 ,下,左,右补0#pad1 = np.array([[‘上’,‘下’], [‘左’,‘右’ ]])impo... 阅读全文
posted @ 2018-10-23 10:50 luoganttcc 阅读(201) 评论(0) 推荐(0) 编辑
摘要:在登录远程服务器的时候使用命令:ssh -L 16006:127.0.0.1:6006 name@server_ipnohup python file_name.py >p1.log >tensorboard --logdir=./log在本机浏览器输入:h... 阅读全文
posted @ 2018-10-22 14:33 luoganttcc 阅读(97) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Mon Oct 22 13:04:34 2018@author: lg"""#!/usr/bin/env python3# -*- codi... 阅读全文
posted @ 2018-10-22 14:27 luoganttcc 阅读(95) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tfimport numpy as np## prepare the original datawith tf.name_scope('data'): x_data = np.random.rand(100)... 阅读全文
posted @ 2018-10-22 14:26 luoganttcc 阅读(75) 评论(0) 推荐(0) 编辑
摘要:原文链接 阅读全文
posted @ 2018-10-20 19:21 luoganttcc 阅读(89) 评论(0) 推荐(0) 编辑
摘要:手机上有太多低级的东西,会使人愚蠢低效。这是我自己给自己定的法律必须执行 1. 工作的时候,手机放在抽屉里2. 睡觉的前后手机放在包里3. 闲的时候不玩手机多看书4.上网时候不要被某条信息的影响,忘记你为什么上网http://www.aqd111.com/v... 阅读全文
posted @ 2018-10-20 09:18 luoganttcc 阅读(1780) 评论(0) 推荐(0) 编辑
摘要:from matplotlib import pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D#p是你的胜率#b是你的赔率def caly(p,b): ... 阅读全文
posted @ 2018-10-19 17:26 luoganttcc 阅读(153) 评论(0) 推荐(0) 编辑
摘要:链接 阅读全文
posted @ 2018-10-18 19:26 luoganttcc 阅读(112) 评论(0) 推荐(0) 编辑
摘要:import numpy as npimport tensorflow as tffrom keras.callbacks import TensorBoardfrom keras.layers import Input, Densefrom keras.m... 阅读全文
posted @ 2018-10-18 18:26 luoganttcc 阅读(448) 评论(0) 推荐(0) 编辑
摘要:参考1参考2train_on_batchn_epoch = 12batch_size = 16for e in range(n_epoch): print("epoch", e) batch_num = 0 loss_sum=np.arra... 阅读全文
posted @ 2018-10-18 18:16 luoganttcc 阅读(164) 评论(0) 推荐(0) 编辑
摘要:多层感知机#Lesson 03: MLP for Time Series Forecasting# univariate mlp examplefrom numpy import arrayfrom keras.models import Sequentia... 阅读全文
posted @ 2018-10-17 19:15 luoganttcc 阅读(240) 评论(0) 推荐(0) 编辑
摘要:sudo apt-get purge mongodb或者sudo apt-get purge --auto-remove mongodb 阅读全文
posted @ 2018-10-16 18:08 luoganttcc 阅读(881) 评论(0) 推荐(0) 编辑
摘要:# multinput and multioutput from numpy import arrayfrom keras.models import Sequentialfrom keras.layers import Densefrom keras.l... 阅读全文
posted @ 2018-10-16 18:08 luoganttcc 阅读(194) 评论(0) 推荐(0) 编辑
摘要:# multinput and multioutput from numpy import arrayfrom keras.models import Sequentialfrom keras.layers import Densefrom keras.l... 阅读全文
posted @ 2018-10-16 16:55 luoganttcc 阅读(301) 评论(0) 推荐(0) 编辑
摘要:1. 不去路边垃圾小店,聚类算法,多去那种地方,身上将具那些人的特征,不去茅台路面馆,2. 外出就餐简单最好,牛奶面包就好3. 在公司,牛奶,面包,水果就好,路边小店多为低端小店,脏乱差 阅读全文
posted @ 2018-10-16 13:07 luoganttcc 阅读(185) 评论(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 阅读(126) 评论(0) 推荐(0) 编辑
摘要:super() 的入门使用在类的继承中,如果重定义某个方法,该方法会覆盖父类的同名方法,但有时,我们希望能同时实现父类的功能,这时,我们就需要调用父类的方法了,可通过使用 super 来实现,比如:class Animal(object): def _... 阅读全文
posted @ 2018-10-07 16:38 luoganttcc 阅读(69) 评论(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 阅读(94) 评论(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 阅读(186) 评论(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 阅读(219) 评论(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 阅读(364) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Sun Sep 30 17:12:12 2018这是用keras搭建的vgg16网络这是很经典的cnn,在图像和时间序列分析方面有很多的应用... 阅读全文
posted @ 2018-10-05 15:07 luoganttcc 阅读(182) 评论(0) 推荐(0) 编辑
摘要:12 阅读全文
posted @ 2018-10-05 14:25 luoganttcc 阅读(113) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Sun Sep 30 18:00:30 2018这是用keras搭建的简单的cnn 网络@author: lg"""##import ker... 阅读全文
posted @ 2018-10-05 14:07 luoganttcc 阅读(391) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tftemp = [0., 0., 1., 0., 0., 0., 1.5, 2.5]# Reshape the tensor to be 3 dimensions.values = tf.reshape(temp,... 阅读全文
posted @ 2018-10-02 08:36 luoganttcc 阅读(281) 评论(0) 推荐(0) 编辑
摘要:max pooling是CNN当中的最大值池化操作,其实用法和卷积很类似有些地方可以从卷积去参考【TensorFlow】tf.nn.conv2d是怎样实现卷积的?tf.nn.max_pool(value, ksize, strides, padding, n... 阅读全文
posted @ 2018-10-01 21:32 luoganttcc 阅读(148) 评论(0) 推荐(0) 编辑
摘要:链接 阅读全文
posted @ 2018-10-01 20:54 luoganttcc 阅读(88) 评论(0) 推荐(0) 编辑
摘要:为了取回操作的输出内容, 可以在使用 Session 对象的 run() 调用 执行图时,传入一些 tensor, 这些 tensor 会帮助你取回结果. 在之前的例子里,我们只取回了单个节点 state, 但是你也可以取回多个 tensor:import ... 阅读全文
posted @ 2018-10-01 10:46 luoganttcc 阅读(99) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf# 创建一个常量 op, 产生一个 1x2 矩阵. 这个 op 被作为一个节点# 加到默认图中.## 构造器的返回值代表该常量 op 的返回值.matrix1 = tf.constant([[3., 3.]])#... 阅读全文
posted @ 2018-10-01 10:35 luoganttcc 阅读(98) 评论(0) 推荐(0) 编辑
摘要:CPUwith tf.Session() as sess: ...: with tf.device("/cpu:0"): ...: m1=tf.constant([[3,3]]) ...: m2=tf... 阅读全文
posted @ 2018-10-01 10:17 luoganttcc 阅读(92) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示