天天看點

MC-GAN:Multi-Content GAN for Few-Shot Font Style TransferMC-GAN:Multi-Content GAN for Few-Shot Font Style Transfer一、源碼

MC-GAN:Multi-Content GAN for Few-Shot Font Style Transfer

多内容GAN,可進行少量字型轉換

MC-GAN:Multi-Content GAN for Few-Shot Font Style TransferMC-GAN:Multi-Content GAN for Few-Shot Font Style Transfer一、源碼

文章下載下傳連結:https://arxiv.org/pdf/1712.00516.pdf 

代碼位址:https://github.com/azadis/MC-GAN

一、源碼

1. 資料集

MC-GAN:Multi-Content GAN for Few-Shot Font Style TransferMC-GAN:Multi-Content GAN for Few-Shot Font Style Transfer一、源碼

2. networks.py

import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
import functools
from torch import index_select, LongTensor



def weights_init(m):
    classname = m.__class__.__name__
    print "classname",classname
    if classname.find('Conv') != -1:
        print "in random conv"
        m.weight.data.normal_(0.0, 0.02)
        if hasattr(m.
           
GAN

繼續閱讀