Function
init_zs
(args, device, in_channels, input_size)
Source from the content-addressed store, hash-verified
| 84 | |
| 85 | |
| 86 | def init_zs(args, device, in_channels, input_size): |
| 87 | if is_video(args): |
| 88 | _zs = torch.randn( |
| 89 | args.data.sample_fid_bs, |
| 90 | args.model.params.video_frames, |
| 91 | in_channels, |
| 92 | input_size, |
| 93 | input_size, |
| 94 | device=device, |
| 95 | ) |
| 96 | else: |
| 97 | _zs = torch.randn( |
| 98 | args.data.sample_fid_bs, |
| 99 | in_channels, |
| 100 | input_size, |
| 101 | input_size, |
| 102 | device=device, |
| 103 | ) |
| 104 | return _zs |
| 105 | |
| 106 | |
| 107 | ################################################################################# |
Tested by
no test coverage detected