Skip to content

Why use CPU instead of Torch? #5

Description

@watate

In the code, ml-act converts z_src_ot and z_dst_ot to CPU before learning the transport map.

It uses these np primitives/functions:

  • np.float64
  • np.mean
  • np.random.randn
  • np.sum
  • np.concatenate

Those primitives/functions have a torch equivalent, so why not just use torch?

np.float64 -> torch.float64 or torch.double
np.mean() -> torch.mean()
np.random.randn() -> torch.randn()
np.sum() -> torch.sum()
np.concatenate() -> torch.cat()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions