摘要:
前提:代理选“德国”,稳定一点 ~ 1. 将Colab与Good Drive关联起来 from google.colab import drive drive.mount('/content/drive') 2.定位到Drive的根目录,并查看根目录下的文件 import os os.chdir(" 阅读全文
摘要:
Pytorch使用CPU运行“Torch not compiled with CUDA enabled” https://blog.csdn.net/demo_jie/article/details/107358836 AttributeError: 'Tensor' object has no a 阅读全文
摘要:
1. 均方误差MSE 归一化的均方误差(NMSE) 2. 平均绝对误差MAE # true: 真目标变量的数组 # pred: 预测值的数组 def mse(true, pred): return np.sum((true - pred)**2) def mae(true, pred): retur 阅读全文
摘要:
Example: 1 clc;clear;close all; 2 x=0:10; 3 y1 = x.^2 + 2 ; 4 y2 = x.^2 + x + 2; 5 plot(x,y1,'m-p',x,y2,'b-s','linewidth',2);% 原始大图 6 legend('y1','y2' 阅读全文
摘要:
1.准备数据 import torch from torch.autograd import Variable # 构造0-100之间的均匀数字作为时间变量x x = Variable(torch.linspace(0,100).type(torch.FloatTensor)) # 时间点上的历史房 阅读全文
摘要:
1. 打开Anaconda Prompt 2. 输入命令添加清华源 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ 3.安装0.4.1的pytorch conda ins 阅读全文
摘要:
主要内容: 1. 4位流水线乘法器 2. 8位流水线乘法器 3. 16位流水线乘法器 1. 4位流水线乘法器 1 module multi_4bits_pipelining(mul_a, mul_b, clk, rst_n, mul_out); 2 3 input [3:0] mul_a, mul_ 阅读全文
摘要:
题目描述: 编写程序计算10个正整数的平均数,找出这10个数中雨平均值的距离最近的三个数(差值的绝对值)。以距离的大小对这三个数进行排序并输出(距离小的先输出) 输入:[33,44,61,2,36,42,56,81,11,17] 输出:[36,42,33] 思路: 1. 算平均值。 2. 用hash 阅读全文