pystiche.misc
¶
- pystiche.misc.get_input_image(starting_point='content', content_image=None, style_image=None)¶
Generates an input image for NST from the given
starting_point
.- Parameters
starting_point (
Union
[str
,Tensor
]) – IfTensor
returns a copy. If"content"
or"style"
returns a copy ofcontent_image
orstyle_image
, respectively. If"random"
returns a white noise image with the dimensions ofcontent_image
orstyle_image
, respectively. Defaults to"content"
.content_image (
Optional
[Tensor
]) – Content image. Only required ifstarting_point
is"content"
or"random"
.style_image (
Optional
[Tensor
]) – Style image. Only required ifstarting_point
is"style"
or"random"
.
- Return type
- pystiche.misc.get_device(device=None)¶
Selects a device to perform an NST on.