- 博客(5)
- 收藏
- 关注
原创 Tensor for argument #2 ‘mat1‘ is on CPU, but expected it to be on GPU (while checking arguments for
Tensor for argument #2 ‘mat1’ is on CPU, but expected it to be on GPU (while checking arguments for addmm)需要将模型和输入数据都移动到 devicemodel=NonLinearRegression().to(device)#模型for batch_idx,(data,target) in enumerate(train_loader): data,target=data.to(device),
2021-07-07 09:49:37 5610
原创 KeyError:‘val_mean_absolute_error‘解决方法
mae_history=history.history[‘val_mean_absolute_error’]改为mae_history=history.history[‘val_mae’]
2021-06-19 14:56:49 635
原创 module ‘tensorflow._api.v2.data‘ has no attribute ‘AUTOTUNE
module ‘tensorflow._api.v2.data’ has no attribute 'AUTOTUNEmodule ‘tensorflow._api.v2.data’ has no attribute 'AUTOTUNE 解决方法AUTOTUNE = tf.data.AUTOTUNE更换为AUTOTUNE = tf.data.experimental.AUTOTUNE
2021-03-28 19:35:26 5076 1
原创 练习2-3 输出倒三角图案(可更改三角形大小)
本题要求编写程序,输出指定的由“*”组成的倒三角图案。输入格式:本题目没有输入。输出格式:按照下列格式输出由“*”组成的倒三角图案。* * * * * * *` * * *#include <stdio.h>#define N 4int main(){ int count=0; for(int i=N;i>0;i--){ int j=i; ...
2020-04-04 17:41:59 208
原创 习题6-3 使用函数输出指定范围内的完数
题目要求本题要求实现一个计算整数因子和的简单函数,并利用其实现另一个函数,输出两正整数m和n(0<m≤n≤10000)之间的所有完数。所谓完数就是该数恰好等于除自身外的因子之和。例如:6=1+2+3,其中1、2、3为6的因子。函数接口定义:int factorsum( int number );void PrintPN( int m, int n );其中函数factorsum...
2020-02-23 13:07:51 385
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人