Coder Social home page Coder Social logo

clip-mesh-smplx's Issues

TypeError: Not a Tensor type. Got: <class 'list'>.

I ran into this Error in both terminal and colab, sigma is a list, not a tuple:

TypeError Traceback (most recent call last)
in
19 set_seed(cfg['seed'])
20
---> 21 single_loop(cfg)

2 frames
/content/CLIPMesh-SMPLX/loops/single.py in single_loop(config)
129 # low pass filter for textures
130 ready_texture = texture.Texture2D(
--> 131 kornia.filters.gaussian_blur2d(
132 kd_map_opt.data.permute(0, 3, 1, 2),
133 kernel_size=config["kernel_size"],

/usr/local/lib/python3.9/dist-packages/kornia/filters/gaussian.py in gaussian_blur2d(input, kernel_size, sigma, border_type, separable)
56 sigma = tensor([sigma], device=input.device, dtype=input.dtype)
57 else:
---> 58 KORNIA_CHECK_IS_TENSOR(sigma)
59 sigma = sigma.to(device=input.device, dtype=input.dtype)
60

/usr/local/lib/python3.9/dist-packages/kornia/core/check.py in KORNIA_CHECK_IS_TENSOR(x, msg)
133 """
134 if not isinstance(x, Tensor):
--> 135 raise TypeError(f"Not a Tensor type. Got: {type(x)}.\n{msg}")
136
137

TypeError: Not a Tensor type. Got: <class 'list'>.
None

I tried changing kernel_size=config["kernel_size"]; sigma=config["blur_sigma"] to kernel_size= tuple(config["kernel_size"]); sigma=tuple(config["blur_sigma"]). Then a new ERROR is obtained:

0%| | 0/1000 [00:00<?, ?it/s]IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (518, 260) to (528, 272) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).
[swscaler @ 0000029e84943fc0] Warning: data is not aligned! This can lead to a speed loss
0%| | 0/1000 [00:04<?, ?it/s]
Traceback (most recent call last):
File "C:\Users...\CLIPMesh-SMPLX\main.py", line 83, in
single_loop(cfg)
File "C:\Users..\CLIPMesh-SMPLX\loops\single.py", line 423, in single_loop
log_str = "CLIP Loss = %.3f | TVL Tex = %.3f" % (clip_loss.item(), t_l.item())
ValueError: only one element tensors can be converted to Python scalars

How do I fix it?

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.