What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-19 11:06:16
Encoder LSTM
class Encoder(nn.Module): def __init__(self, vocab_len, embedding_dim, hidden_dim, n_layers, dropout_prob): super().__init__() s... Add solution -
Python 2021-11-17 17:58:08
what is the purpose of super keyword in python
class Parent: def __init__(self, txt): self.message = txt def printmessage(self): print(self.message) class Child(Parent): def __init__(self, txt): super().__init__(txt) x = Child("Hello, and welcome!") x.printmessage() Add solution -
Python 2021-11-16 11:23:18
Dynamic Variable declaration in Python
#1st example user_input = raw_input("Enter a variable name : ") Enter a variable name: number globals()[user_input] = 25 # you can use locals to assign local variable # This is dynmic variable declaration #2nd example Class Table: def __init... Add solution