<jupyter_start><jupyter_text>Keras基础模块![image.png](attachment:image.png)<jupyter_code># 导入序列化模型
from keras.models import Sequential
# 定义模型对象
model = Sequential()
# t添加层
model.add()
from keras.layers import  Dense<jupyter_output><empty_output><jupyter_text>```pythonDense(units, activation=None, use_bias=True, kernel_initializer='glorot_uniform', bias_initializer='zeros', kernel_regularizer=None, bias_regularizer=None, activity_regularizer=None, kernel_constraint=None, bias_constraint=None, **kwargs)```<jupyter_code># 导入优化器
from keras import optimizers
# 随机梯度下降法
optimizers.SGD(lr=0.01, momentum=0.0, decay=0.0, nesterov=False)
# lr : learn rate, momentum : 冲量, decay : 衰减函数, netsterov:是否使用牛顿动量<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12774725274725274, 'fraction_numerical': 0.009615384615384616, 'mean_word_length': 10.950819672131148, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '632797', 'license': 'MIT', 'n_tokens_mistral': 305, 'n_tokens_neox': 313, 'n_words': 43, 'path': 'Keras/Keras_IMooc/start.ipynb', 'repo_name': 'hehuanlin123/DeepLearning', 'size': '728'}