Caffe2 - Python API
A deep learning, cross platform ML framework
Packages
Classes
Files
C++ API
Python API
GitHub
File List
caffe2
python
helpers
dropout.py
1
## @package dropout
2
# Module caffe2.python.helpers.dropout
3
from
__future__
import
absolute_import
4
from
__future__
import
division
5
from
__future__
import
print_function
6
from
__future__
import
unicode_literals
7
8
9
def
dropout
(model, blob_in, blob_out, use_cudnn=False, **kwargs):
10
"""dropout"""
11
if
use_cudnn:
12
kwargs[
'engine'
] =
'CUDNN'
13
else
:
14
kwargs[
'engine'
] =
'DEFAULT'
15
assert
'is_test'
in
kwargs,
"Argument 'is_test' is required"
16
return
model.net.Dropout(
17
blob_in, [blob_out,
"_"
+ blob_out +
"_mask"
], **kwargs)[0]
dropout
Module caffe2.python.helpers.dropout.
Generated on Thu Mar 21 2019 13:06:36 for Caffe2 - Python API by
1.8.11