MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / __call__

Method __call__

utils/common.py:847–855  ·  view source on GitHub ↗
(self, coord, coord1=None)

Source from the content-addressed store, hash-verified

845 self.p = p
846
847 def __call__(self, coord, coord1=None):
848 if np.random.rand() < self.p:
849 angle_z = np.random.uniform(-self.rot, self.rot)
850 cos_z, sin_z = np.cos(angle_z), np.sin(angle_z)
851 R = np.array([[cos_z, -sin_z, 0], [sin_z, cos_z, 0], [0, 0, 1]])
852 coord = np.dot(coord, R)
853 if coord1 is not None:
854 coord1 = np.dot(coord1, R)
855 return coord, coord1
856
857class Compose(object):
858 def __init__(self, transforms):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected