Giter Site home page Giter Site logo

291f's Introduction

291f

  • Run torch version:download pkl file to data/tf_records
cd experiments/chair_unsupervised
python ../../dpc/run/train_eval_torch.py

How to use the pytorch version Net

import torch
from nets.img_encoder_torch import imgEncoder
from nets.pc_decoder_torch import pcDecoder
from nets.pose_net_torch import poseDecoder

enc = imgEncoder(cfg, channel_number=3, image_size=128)
dec = pcDecoder(cfg, afterConvSize=4096)
pos = poseDecoder(cfg)

for batch_idx, (data, target) in enumerate(load_dataset()):
    print (data.size())
    out0 = enc(data, False)
    out1 = dec(out0["ids"], out0, False)
    out2 = pos(out0['poses'])
    break

print ([(key, out0[key].size()) for key in out0.keys()])
# [('conv_features', torch.Size([2, 4096])), ('z_latent', torch.Size([2, 1024])), ('poses', torch.Size([2, 500])), ('ids', torch.Size([2, 500]))]

print ([(key, out1[key].size()) for key in out1.keys()])
# [('xyz', torch.Size([2, 8000, 3])), ('rgb', torch.Size([2, 8000, 3]))]

print ([(key, out2[key].size()) for key in out2.keys()])
# [('poses', torch.Size([2, 4, 4])), ('pose_student', torch.Size([2, 4])), ('predicted_translation', torch.Size([2, 3]))]

291f's People

Contributors

eddie-yz avatar niopeng avatar rationalisa avatar

Watchers

 avatar  avatar

Forkers

eddie-yz

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.