Giter Site home page Giter Site logo

srmaster's People

Contributors

coo1m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kksyw coolmalf

srmaster's Issues

pth 转换到pt

观察到pytorch mobile 使用的是.pt文件的模型格式。

请问,模型转换的地方是如何操作的呢?

我使用的代码如下:

import torch
import torch.utils.data.distributed

# pytorch环境中
model_pth = 'realesr-general-x4v3.pth'  # 模型的参数文件
mobile_pt = 'realesr-general-x4v3.pt'  # 将模型保存为Android可以调用的文件

model = torch.load(model_pth, map_location=torch.device('cpu'))
model.eval()  # 模型设为评估模式
device = torch.device('cpu')
model.to(device)
# 1张3通道224*224的图片
input_tensor = torch.rand(1, 3, 224, 224)  # 设定输入数据格式

mobile = torch.jit.trace(model, input_tensor)  # 模型转化
mobile.save(mobile_pt)  # 保存文件

但是始终报错:AttributeError: 'dict' object has no attribute 'eval'

Provide tensorflow lite version

Hello,

Thank you for your effort to create sample app to this super resolution model.
Could you provide a TFlite version for it model.

Thanks.

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.