入门指南
教程笔记本
Brain
modules
opt_class
hparams
run_opts
checkpointer
fit()
make_dataloader
on_fit_start
on_stage_start
on_stage_end
evaluate()
!new:
!name:
!ref
!copy
DynamicBatchSampler
speechbrain.dataio.samplers.DynamicBatchSampler
EndoderDecoderASR
.yaml
train.py
StreamingASR
提示与技巧
2.x
API
AMPConfig
create_experiment_directory()
parse_arguments()
Stage
make_deprecated_redirections()
load_hyperpyyaml()
RefTag
Placeholder
dump_hyperpyyaml()
resolve_references()
deref()
recursive_resolve()
parse_arithmetic()
recursive_update()
TestThing
TestThing.from_keys()
实现dropout的库。
Mirco Ravanelli 2020
类:
Dropout2d
此函数实现了2d dropout。
基础:Module
Module
此函数实现了dropout 2d。它会随机将整个通道置为零。
drop_rate (float) – 这是丢弃因子(介于0和1之间)。
inplace (bool) – 如果为True,则使用原地操作。
Example
>>> drop = Dropout2d(drop_rate=0.5) >>> inputs = torch.rand(10, 50, 40) >>> output=drop(inputs) >>> output.shape torch.Size([10, 50, 40])
对输入张量应用2d dropout。
x (torch.Tensor (batch, time, channel1, channel2)) – 输入以进行归一化。期望为4维张量。
x_drop – 被零化的张量。
torch.Tensor