# as first layer in a sequential model: model = Sequential() model.add(Dense(32, input_shape=(16,))) # now the model will take as input arrays of shape (*, 16) # and output arrays of shape (*, 32) # after the first layer, you don't need to specify # the size of the input anymore: model.add(Dense(32))
public class Class1
{
private readonly Action _action;
public Class1(string actionName)
{
switch (actionName)
{
case "1":
_action = Action1;
break;
case "2":
_action = Action2;
break;
default:
throw new Exception($"Unexpected action name {actionName}");
}
}
public void Act()
{
_action.Invoke();
}
private void Action1()
{
// ...
}
private void Action2()
{
// ...
}
}
Python scripts (files with the extension .py) will be executed by python.exe by default. This executable opens a terminal, which stays open even if the program uses a GUI. If you do not want this to happen, use the extension .pyw which will cause the script to be executed by pythonw.exe by default (both executables are located in the top-level of your Python installation directory). This suppresses the terminal window on startup.