|
|
@@ -1,6 +1,7 @@ |
|
|
import mindspore.nn as nn |
|
|
import mindspore.nn as nn |
|
|
import mindspore.ops.operations as ops |
|
|
import mindspore.ops.operations as ops |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DecoderLayer(nn.Cell): |
|
|
class DecoderLayer(nn.Cell): |
|
|
def __init__(self, self_attention, cross_attention, d_model, d_ff=None, |
|
|
def __init__(self, self_attention, cross_attention, d_model, d_ff=None, |
|
|
dropout=0.1, activation="relu"): |
|
|
dropout=0.1, activation="relu"): |
|
|
|