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

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

Multi-content GAN, with a small amount of font conversion

Article download link: https://arxiv.org/pdf/1712.00516.pdf 

Code address: https://github.com/azadis/MC-GAN

First, the source code

Data set

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.bias, 'data'):
            m.bias.data.fill_

Guess you like

Origin blog.csdn.net/yql_617540298/article/details/105403772