I am getting :
ipython-input-21-68aa9b8f5815> in
1 # UNIT TEST
----> 2 Encoder_test(Encoder)
~/work/W4A1/public_tests.py in Encoder_test(target)
114 x = np.array([[2, 1, 3], [1, 2, 0]])
115
→ 116 encoderq_output = encoderq(x, True, None)
117
118 assert tf.is_tensor(encoderq_output), “Wrong type. Output must be a tensor”
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in call(self, *args, **kwargs)
1010 with autocast_variable.enable_auto_cast_variables(
1011 self._compute_dtype_object):
→ 1012 outputs = call_fn(inputs, *args, **kwargs)
1013
1014 if self._activity_regularizer:
in call(self, x, training, mask)
47 # Pass input through the Embedding layer
48
—> 49 x = self.embedding.call(x) # (batch_size, input_seq_len, embedding_dim)
50 # Scale embedding by multiplying it by the square root of the embedding dimension
51 x *= np.sqrt(tf.cast(embedding_dim, tf.float32))
/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/layers/embeddings.py in call(self, inputs)
191 if dtype != ‘int32’ and dtype != ‘int64’:
192 inputs = math_ops.cast(inputs, ‘int32’)
→ 193 if isinstance(self.embeddings, sharded_variable.ShardedVariable):
194 out = embedding_ops.embedding_lookup_v2(self.embeddings.variables, inputs)
195 else:
AttributeError: ‘Embedding’ object has no attribute ‘embeddings’