AnswerDotAI / AnswerDotAI/fastprogress
TypeError: Outputs must be theano Variable or Out instances.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 1.1k
- Forks
- 104
- Merge medio
- 1 min
- PR fusionados (30 d)
- 1
Descripción
In custom keras layers, I am trying to get a layer's output which is returning three different tensors in a list.
below is the code:
test_fn = K.function([model.get_layer('sentence_input').input, model.get_layer('sentence2_input').input,
model.get_layer('sentence3_input').input, K.learning_phase()],
[model.get_layer('as_weights').output, model.get_layer('p_t').output,
model.get_layer('as_emb').output])
model.get_layer('as_emb').output is the layer I am getting the error message.
The objective is I want to pass a layer to theano.function's output attribute, which returns multiple tensors in a list. How to do this without the above error?
I am very much happy if someone helps me out in this regard.
Thanks.
Guía de contribución
Línea de trabajo
Comienza reproduciendo la llamada mostrada a K.function con las salidas de la capa personalizada de Keras, especialmente as_emb, e inspecciona cómo devuelve sus tensores la capa. Se considera completado cuando se haya identificado una forma compatible de pasar las múltiples salidas de la capa sin el TypeError indicado; en el issue no se menciona ningún archivo del repositorio ni ninguna prueba.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- keras, python
- Área
- machine-learning
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100