摘要:
def try_gpu(i=0): #@save """如果存在,则返回gpu(i),否则返回cpu()""" if torch.cuda.device_count() >= i + 1: return torch.device(f'cuda:{i}') return torch.device('c 阅读全文
摘要:
class test(nn.Module): def __init__(self,name): super(test,self).__init__() self.name = name def forward(self,x): return str(x)+self.name net = test(" 阅读全文
摘要:
#include<stdio.h>int main(){ int age=1; int san=0; int si=0; int sum=0; while(age>0) { san=age*age*age; si=age*age*age*age; int t1,t2,t3,t4; int f1,f2 阅读全文