Coder Social home page Coder Social logo

推断 about w-net-pytorch HOT 3 OPEN

arctanxy avatar arctanxy commented on September 5, 2024
推断

from w-net-pytorch.

Comments (3)

Arctanxy avatar Arctanxy commented on September 5, 2024

你在推断的时候out = wnet(src_tensor, target_tensor),输入了target的tensor,这是不是影响结果了。
正常推断不是只有src么

推断的时候,需要提供两个信息,一个是字体,一个是字,所以是两个输入

from w-net-pytorch.

Crescentz avatar Crescentz commented on September 5, 2024

你的target_tensor是

target_img = generate_img(target_word, target_font_file, font_size=60)
target_tensor = totensor(target_img).unsqueeze(0)

这么得到的,送入到网络forward

def forward(self, lx, rx):
    rout = self.right(rx)
    ...
    de_0 = self.deconv1(torch.cat([lout_5, rout_5], dim=1))
    ...
    return de...

这里网络就加载了tgt_tensor

from w-net-pytorch.

Arctanxy avatar Arctanxy commented on September 5, 2024

你的target_tensor是

target_img = generate_img(target_word, target_font_file, font_size=60)
target_tensor = totensor(target_img).unsqueeze(0)

这么得到的,送入到网络forward

def forward(self, lx, rx):
    rout = self.right(rx)
    ...
    de_0 = self.deconv1(torch.cat([lout_5, rout_5], dim=1))
    ...
    return de...

这里网络就加载了tgt_tensor

对,这个地方确实写错了,谢谢指正

from w-net-pytorch.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.