ICode9

精准搜索请尝试: 精确搜索
  • pytorch自定义不可导激活函数2021-03-20 18:32:23

    今天自定义不可导函数的时候遇到了一个大坑。 首先我需要自定义一个函数:sign_f import torch from torch.autograd import Function import torch.nn as nn class sign_f(Function): @staticmethod def forward(ctx, inputs): output = inputs.new(inputs.

  • 推荐系统-DeepCrossing2021-03-16 23:59:15

    这是一个把深度学习架构应用于推荐系统中的模型, 2016年由微软提出, 完整的解决了特征工程、稀疏向量稠密化, 多层神经网络进行优化目标拟合等一系列深度学习再推荐系统的应用问题。 这个模型涉及到的技术比较基础,在传统神经网络的基础上加入了embedding,残差连接等思想,且结构比

  • label smoothing2021-03-09 14:04:10

      An overconfident model is not calibrated and its predicted probabilities are consistently higher than the accuracy. For example, it may predict 0.9 for inputs where the accuracy is only 0.6. Notice that models with small test errors can still be overcon

  • 2021美赛C题赛后记录2021-02-24 15:31:30

    2021美赛C题赛后记录 原题与翻译: Problem C: Confirming the Buzz about Hornets 问题C:确认关于大黄蜂的传言 In September 2019, a colony of Vespa mandarinia (also known as the Asian giant hornet) was discovered on Vancouver Island in British Columbia, Canada.

  • 深度学习:构建神经网络并识别手写数字2021-02-08 12:33:10

    转自我自己的blog blog.laclic.ink. github链接 Github. 效果 可以看出(10个数据,分别是认为该数字为0-9的程度,最后取最高的那个即为结果)基本能正确识别 但是1和7,4和9还是不太容易识别的 全代码(ipynb) 引入库 import numpy # scipy.special for the sigmoid function expit() impor

  • 神经网络代码2021-02-07 17:05:58

    import numpy as np import matplotlib.pyplot import scipy.special class neuralNetwork: # initialise the neural network def __init__(self, inputnodes, hiddennodes, outputnodes, learningrate): # 输入层节点数量 self.inodes = input

  • PyTorch迁移学习2021-02-07 06:32:12

    PyTorch迁移学习 实际中,基本没有人会从零开始(随机初始化)训练一个完整的卷积网络,因为相对于网络,很难得到一个足够大的数据集[网络很深, 需要足够大数据集]。通常的做法是在一个很大的数据集上进行预训练,得到卷积网络ConvNet, 然后,将这个ConvNet的参数,作为目标任务的初始化参数,或者

  • BindsNET学习系列——Network2021-01-30 17:33:14

    相关源码:bindsnet/bindsnet/network/network.py   class Network(torch.nn.Module): # language=rst """ Central object of the ``bindsnet`` package. Responsible for the simulation and interaction of nodes and connections. **Exam

  • 2021-01-172021-01-17 09:57:57

    ‘numpy.ndarray’ object has no attribute ‘append’ def rank_generator(gen): target=[] inputs_=np.array([1, 2, 3,4,5,6]) for inputs, targets in gen: target.append(targets) inputs_=np.vstack((inputs_, inputs[0])) #prin

  • vue中将页面打印成pdf文件以及遇到的2021-01-13 17:04:00

    很常见的会遇到打印pdf的操作 我使用的是print.js 使用方法如下: // 打印类属性、方法定义 /* eslint-disable */ const Print =function(dom, options) { if (!(this instanceof Print)) return new Print(dom, options); this.options = this.extend({ 'noPri

  • 基于tensor2tensor的注意力可视化2020-12-27 04:01:06

    根据训练好的Transformer模型,得到注意力矩阵,并对注意力进行可视化 首先安装:tensorflow 1.13.1 + tensor2tensor 1.13.1   # coding=utf-8 # Copyright 2020 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use

  • 机器数据采集工具:telegraf的介绍安装2020-12-01 08:35:58

    前言 Telegraf 是一个用 Go 编写的用于收集机器数据的代理程序。它可部署到机器上收集系统和服务的统计数据,并通过配置写入到 InfluxDB 数据库,然后在通过Grafana或者Chrongraf用于数据展示。 核心功能 完全由GO编写,编译产物仅为一个二进制程序,安装运行无需外部依赖 运行时内存

  • 原生js打印插件Print.js2020-11-30 15:03:19

    网页打印功能在很多的网站系统中都会使用到。比如说报表打印功能等。 以下是在Jquery插件库中找到的一款原生js打印插件,代码清洁简单,封装的代码也很好理解。 index.html页面代码 <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Print.js 演示</title> <style>

  • javaScript点击更改内容2020-11-28 22:32:11

    <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8" />     <title>Document</title> </head> <body> <div id='frm'>  <input type="button" name=&quo

  • jq判断5个input如果全部为空 , 就alert2020-11-27 10:02:46

    <div id="form"> <input type="text" value=""> <input type="text" value=""> <input type="text" value=""> <input type="text" value=&quo

  • Keras学习之:如何写多模型神经网络2020-11-26 22:59:58

    文章目录 1. 单个模型的神经网络2. 包含多个模型的神经网络创建3. 多模型神经网络的训练 1. 单个模型的神经网络 以 CNN 网络为例 def cnn(input_shape,classes): model = Sequential() model.add(Conv2D(input_shape=input_shape,filters=25,kernel_size=(3,3),

  • javascript2020-09-12 17:33:07

      Javascript 1、全选、全不选、反选的js实现: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <ti

  • 【Azure DevOps系列】使ASP.NET Core应用程序托管到Azure Web App Service2020-09-11 13:00:20

    使用Azure DevOps Project设置ASP.NET项目 我们需要先在Azure面板中创建一个Azure WebApp服务,此处步骤我将省略,然后点击部署中心如下图所示: 此处我选择的是Azure Repos,当然大家也可以选择Github、Local Git、FTP 我们需要提前在Azure DevOps中提前创建好应用程序,我这边已经提前

  • JS---案例:大量字符串拼接效果实现2020-08-19 08:33:30

    案例:大量字符串拼接效果实现 按钮点击,字符串拼接,最后效果字符串,str input有很多,type来分就有button和text,需要找出inputs[i].value是text的 所以用!="button",满足条件就push进str,所以是str.push(inputs[i].value) console.log显示,用str.join就可拼接,加个|清楚一点   简而言之,遍历

  • 【第一周】附:猫狗大战2020-07-25 15:02:11

    第五部分 猫狗大战(Colab) 5.1 基础知识储备 1.Pytorch:transforms的二十二个方法,推荐博客链接: 5.2 代码详解 1.导入相关库,检查是否在使用GPU设备(Colab) import numpy as np import matplotlib.pyplot as plt import os import torch import torch.nn as nn import torchvision from t

  • 【NLP-2017】代码解读Transformer--Attention is All You Need2020-07-18 19:31:12

    目录代码结构 调用模型前的设置模块(hparams.py,prepro.py,data_load.py,utils.py) transformer代码解析(modules.py , model.py ) 训练和测试(train.py,eval.py和test.py ) 一、代码结构论文主题模块 该实现【1】相对原始论文【2】有些许不同,比如为了方便使用了IWSLT 2016德英翻译的数据集,

  • 神经网络简易的框架2020-07-15 14:32:04

    最近学习了神经网络的原理,以下是学习的成果,分享出来 1 import numpy 2 #scipy.special for the sigmoid function expit() 3 import scipy.special #专用扩展函数 4 #libray for plotting arrays 5 import matplotlib.pyplot #用于绘制数组的libray 6 #ensure the p

  • Rocket - subsystem - HasTiles2020-06-20 14:04:23

    https://mp.weixin.qq.com/s/8W2CSwMqjJxZ-jCy2uR0Vg   简单介绍HasTiles的实现。     1. ClockedTileInputs   包含时钟输入的tile inputs:   tile inputs指如下两个输入输入端口:   clocked则是指:   2. HasTiles   HasTiles特征提供了Tiles需要的节点和方法:

  • Exploring Adversarial Attack in Spiking Neural Networks with Spike-Compatible Gradient2020-06-07 21:56:09

    郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布!   arXiv:2001.01587v1 [cs.NE] 1 Jan 2020   Abstract   Keywords:   I. INTRODUCTION   II. PRELIMINARIES A. Spiking Neural Networks   B. Gradient-based Adversarial Attack FGSM.   BIM.   III. CHALLENGES I

  • 机器学习代码实战——决策树(预测泰坦尼号船员生存情况)2020-04-07 16:37:49

    文章目录1.实验目的2.数据预处理3.导入必要模块4.训练+计算模型得分 1.实验目的 1、建立决策树模型以根据某些参数预测泰坦尼克号人是否得以生存 2、在泰坦尼克数据中,使用以下各列构建一个模型来预测人是否可以生存 (1)Pclass (2)Sex (3)Age (4)Fare 3、计算模型得分 泰坦尼克数据

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有