如何计算keras顺序模型的input_dim? [英] How to calculate input_dim for a keras sequential model?

查看:612
本文介绍了如何计算keras顺序模型的input_dim?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Keras Dense层需要指定input_diminput_shape.我在那值多少钱?

Keras Dense layer needs an input_dim or input_shape to be specified. What value do I put in there?

我的输入是1,000,000行且只有3列的矩阵.我的输出是1600个课程.

My input is a matrix of 1,000,000 rows and only 3 columns. My output is 1,600 classes.

我该放在哪里?

  1. 输入(1000000, 1600)

2,因为它是2D矩阵

推荐答案

input_dim是要素的尺寸数(在您的情况下仅为3).input_shape的等效表示法是实际尺寸形状是(3,)

input_dim is the number of dimensions of the features, in your case that is just 3. The equivalent notation for input_shape, which is an actual dimensional shape, is (3,)

这篇关于如何计算keras顺序模型的input_dim?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆