Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageClassifier1D #88

Closed
GagaLeung opened this issue Aug 15, 2018 · 4 comments · Fixed by #295
Closed

ImageClassifier1D #88

GagaLeung opened this issue Aug 15, 2018 · 4 comments · Fixed by #295
Assignees

Comments

@GagaLeung
Copy link

Feature Description

CNN structure is becoming more and more widely used in text classification. Unlike image in shape [height, weight, channel], in this case the input will be in shape [1, n, embedding size], where n is the length of the text. Currently such input will cause error in autokeras, since "1 - filter_size" will be less than zero. So I think autokeras should automatically detect such input shape and then apply 1D architecture search like 1D convolution, 1D pooling, etc.

Reason

Autokeras now is mainly for 2D input like image. It could be more flexible.

Solution

Add some codes to detect the shape of the input, and to search specific network structures optimized for 1D, 2D or 3D tensor depending on the shape of the input.

@haifeng-jin
Copy link
Collaborator

Thank you for your request.
This will be supported together with the 3D input.

@ddofer
Copy link

ddofer commented Aug 22, 2018

+1 . Search for a given 1D discrete or continous sequence would be amazing.

@haifeng-jin haifeng-jin changed the title Support network architecture search for 1D input 1dImageClassifier Aug 25, 2018
@haifeng-jin haifeng-jin changed the title 1dImageClassifier ImageClassifier1D Aug 25, 2018
@haifeng-jin haifeng-jin added this to To do in Auto-Keras 0.3 via automation Oct 26, 2018
@haifeng-jin haifeng-jin moved this from To do to In progress in Auto-Keras 0.3 Nov 4, 2018
Auto-Keras 0.3 automation moved this from In progress to Done Nov 5, 2018
@maystroh
Copy link

I'm looking for an autoML that handles 1D vector data. Can ImageClassifier1D be used to classify 1D signals? If yes, what will be the embedding size in this case? I apologize if this is a newbie question. Thanks btw for your great work.

@simgunz
Copy link

simgunz commented May 22, 2019

@maystroh Try to expand the dimension of the X data as follow:

import numpy as np
from autokeras.image.image_supervised import ImageClassifier1D

X = np.random.normal(size=(100000,10)) # 1M examples of 1D signal with 10 samples 
Y = np.random.randint(4, size=(100000,))

model = ImageClassifier1D(verbose=True)

X_train = np.expand_dims(X, axis=2)
model.fit(X_train, Y, time_limit=1 * 60 * 60)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
5 participants