11 2020 档案

摘要:criteria = nn.CrossEntropyLoss() loss = criteria(output, target) loss = torch.nn.functional.cross_entropy(output, target) import torch import torchvis 阅读全文
posted @ 2020-11-30 21:20 说分手后还能做炮友? 阅读(375) 评论(0) 推荐(0)
摘要:检查运行文件名称与模块名称是否重复。如果重复,需要将文件名称重新命名。 阅读全文
posted @ 2020-11-30 12:09 说分手后还能做炮友? 阅读(96) 评论(0) 推荐(0)
摘要:a = np.r_[1:4,0,4] print(a) [1 2 3 0 4] 阅读全文
posted @ 2020-11-17 16:57 说分手后还能做炮友? 阅读(139) 评论(0) 推荐(0)
摘要:import tensorflow as tf inputs = tf.random.normal([32, 10, 8]) lstm = tf.keras.layers.LSTM(4) output = lstm(inputs) print(output.shape) lstm = tf.kera 阅读全文
posted @ 2020-11-09 14:30 说分手后还能做炮友? 阅读(342) 评论(0) 推荐(0)
摘要:import numpy as np # from tensorflow import keras X = np.random.randint(100, size=10*1000).reshape(1000, 10) Y = np.random.randint(100, size=15*1000). 阅读全文
posted @ 2020-11-05 14:55 说分手后还能做炮友? 阅读(211) 评论(0) 推荐(0)
摘要:import torch from torch import nn from torch.utils.tensorboard import SummaryWriter '''https://zhuanlan.zhihu.com/p/242086547''' a = torch.Tensor([[1, 阅读全文
posted @ 2020-11-03 16:14 说分手后还能做炮友? 阅读(385) 评论(0) 推荐(0)
摘要:import tensorflow as tf import numpy as np # a = tf.random.uniform([2, 1, 2, 3]) # b = tf.random.uniform([1, 3, 3, 2]) # c = tf.matmul(a, b) '''https: 阅读全文
posted @ 2020-11-03 14:21 说分手后还能做炮友? 阅读(291) 评论(0) 推荐(0)