批量增强
BatchAugmentation
基于指定的最佳传输类型,促进批量增强对象的创建。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
device
|
str
|
用于计算的设备 (例如, 'cpu', 'cuda')。 |
必需 |
num_threads
|
int
|
要利用的线程数。 |
必需 |
源代码在 bionemo/moco/interpolants/batch_augmentation.py
中
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
__init__(device, num_threads)
初始化 BatchAugmentation 实例。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
device
|
str
|
用于计算的设备。 |
必需 |
num_threads
|
int
|
要使用的线程数。 |
必需 |
源代码在 bionemo/moco/interpolants/batch_augmentation.py
中
35 36 37 38 39 40 41 42 43 |
|
create(method_type)
创建指定类型的批量增强对象。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
method_type
|
OptimalTransportType
|
最优传输方法的类型。 |
必需 |
返回
类型 | 描述 |
---|---|
如果类型受支持,则返回增强对象,否则返回 None。 |
源代码在 bionemo/moco/interpolants/batch_augmentation.py
中
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|