上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 我看过了整个pathlib没有找到重载_div_或者任何操作符的方法,留到以后有缘再解决吧,今天的上海好冷啊 阅读全文
posted @ 2021-01-07 19:26 说分手后还能做炮友? 阅读(202) 评论(0) 推荐(0)
摘要: x = 50000011 s = '${:1.1f}M'.format(x*1e-6) print(s) s = '${:1.0f}K'.format(x * 1e-3) print(s) s = '${:.3f}K'.format(x * 1e-3) print(s) s = '%.3f' % ( 阅读全文
posted @ 2020-12-31 14:25 说分手后还能做炮友? 阅读(1688) 评论(0) 推荐(0)
摘要: import torch.nn as nn import torch # input = torch.randn(20, 5, 10, 10) # # With Learnable Parameters # m = nn.LayerNorm(input.size()[1:]) # # Without 阅读全文
posted @ 2020-12-25 13:48 说分手后还能做炮友? 阅读(880) 评论(0) 推荐(0)
摘要: import tensorflow as tf print(tf.eye(2)) batch_identity = tf.eye(2, batch_shape=[3]) print(batch_identity) print(tf.eye(2, num_columns=3)) E:\新脚本主文件夹\ 阅读全文
posted @ 2020-12-22 15:06 说分手后还能做炮友? 阅读(475) 评论(0) 推荐(0)
摘要: from transformers import pipeline from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('bert-base-cased') # encoded_input 阅读全文
posted @ 2020-12-16 10:17 说分手后还能做炮友? 阅读(131) 评论(0) 推荐(0)
摘要: 如上 阅读全文
posted @ 2020-12-10 10:57 说分手后还能做炮友? 阅读(148) 评论(0) 推荐(0)
摘要: Xavier在tanh中表现的很好,但在Relu激活函数中表现的很差,所何凯明提出了针对于relu的初始化方法。pytorch默认使用kaiming正态分布初始化卷积层参数。 (1)kaiming均匀分布 U(−bound,bound) (2)kaiming正态分布 N(0,std) 阅读全文
posted @ 2020-12-09 13:24 说分手后还能做炮友? 阅读(467) 评论(0) 推荐(0)
摘要: import numpy as np lis = [1, 5, -9, 3, -6, 8, -7, 5, 5, 5, 4, 4, 4, 6, 6, 6, 6] lis = np.array(lis) lis[lis <= 0] = 100 print(lis) [ 1 5 100 3 100 8 1 阅读全文
posted @ 2020-12-07 14:49 说分手后还能做炮友? 阅读(132) 评论(0) 推荐(0)
摘要: import torch import torchvision import torch.nn as nn import torch.nn.functional as F x = torch.randn(3, 4) print(x) print() sorted, indices = torch.s 阅读全文
posted @ 2020-12-07 14:02 说分手后还能做炮友? 阅读(247) 评论(0) 推荐(0)
摘要: import torch import torchvision import torch.nn as nn import torch.nn.functional as F # x = torch.randn(2, 3) x = torch.randn(2, 3,4) print(x) print() 阅读全文
posted @ 2020-12-04 17:17 说分手后还能做炮友? 阅读(249) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 9 下一页