fix wide&deep dropout set strategy

This commit is contained in:
yao_yf 2020-08-21 09:21:58 +08:00
parent b69b1ca8a8
commit 1e60cef198
2 changed files with 5 additions and 5 deletions

View File

@ -93,8 +93,6 @@ class Dropout(Cell):
self.dropout_do_mask = P.DropoutDoMask()
self.cast = P.Cast()
self.is_gpu = context.get_context('device_target') in ["GPU"]
if self.is_gpu:
self.dropout = P.Dropout(keep_prob)
def construct(self, x):

View File

@ -128,8 +128,10 @@ class EmbeddingLookup(Cell):
vocab_size (int): Size of the dictionary of embeddings.
embedding_size (int): The size of each embedding vector.
param_init (str): The initialize way of embedding table. Default: 'normal'.
target (str): Specify the target where the op is executed. Default: 'CPU'.
slice_mode (str): The slicing way in semi auto parallel/auto parallel. Default: 'batch_slice'.
target (str): Specify the target where the op is executed. The value should in
['DEVICE', 'CPU']. Default: 'CPU'.
slice_mode (str): The slicing way in semi auto parallel/auto parallel. The value should get through
nn.EmbeddingLookUpSplitMode. Default: 'batch_slice'.
manual_shapes (tuple): The accompaniment array in field slice mode.
Inputs: