资源简介
基于Cifar数据集,控制对抗神经网络(cgan)的实现,生成图片
代码片段和文件信息
import pickle
import numpy as np
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets transforms
from torch.autograd import Variable
import matplotlib.pyplot as plt
import torchvision
import os
import matplotlib.gridspec as gridspec
class Generator(nn.Module):
def __init__(self):
super(Generator self).__init__()
self.latent_vars = 100
self.g_fc = nn.Linear(self.latent_vars 512)
self.dconv1 = nn.ConvTranspose2d(512 256 kernel_size=3 stride=2)
self.dconv2 = nn.ConvTranspose2d(256 128 kernel_size=3 stride=2)
self.dconv3 = nn.ConvTranspose2d(128 64 kernel_size=3 stride=2)
self.dconv4 = nn.ConvTranspose2d(64 3 kernel_size=3 st
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-04-27 18:54 cgan-master\
文件 22 2017-04-27 18:54 cgan-master\.gitignore
文件 6 2017-04-27 18:54 cgan-master\README.md
文件 4698 2017-04-27 18:54 cgan-master\cgan_cifar.py
文件 4895 2017-04-27 18:54 cgan-master\cgan_cifar10.py
文件 3733 2017-04-27 18:54 cgan-master\cgan_mnist.py
文件 3674 2017-04-27 18:54 cgan-master\wgan.py
文件 7906 2017-04-27 18:54 cgan-master\wgan_cifar.py
- 上一篇:分支限界解决tsp问题
- 下一篇:《软件测试与文档编制》期末考试试卷
评论
共有 条评论