Em Andamento

Explain / fix Python TypeError from pylearn2 [url removed, login to view]()

I'm having a difficult time figuring out what is wrong with this python script. There are many dependencies, so hopefully you can help me figure out what is going wrong without having to install them all yourself!

I get the TypeError: Cannot safely cast batch dtype float64 to space's dtype int64

import os

import numpy as np

from [url removed, login to view] import Train

from [url removed, login to view] import softmax_regression, mlp

from pylearn2.training_algorithms import bgd, sgd

from pylearn2.termination_criteria import MonitorBased

from pylearn2.termination_criteria import EpochCounter

from pylearn2.train_extensions import best_params

from [url removed, login to view] import serial

from [url removed, login to view] import Dropout

from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix

from [url removed, login to view] import csv_dataset

from theano import function

from theano import tensor as T

import theano

# load datasets

train = [url removed, login to view]("[url removed, login to view]",expect_labels=True,expect_headers=False,delimiter=',',end_fraction=0.7)

valid = [url removed, login to view]("[url removed, login to view]",expect_labels=True,expect_headers=False,delimiter=',')

test = [url removed, login to view]("[url removed, login to view]",expect_labels=True,expect_headers=False,delimiter=',')

# Simple ANN

h0 = [url removed, login to view](layer_name="h0",dim=400, sparse_init=20)

y0 = [url removed, login to view](n_classes=62,layer_name="y0",sparse_init=20)

layers = [h0, y0]

nn = [url removed, login to view](layers,nvis=1024)

algo = [url removed, login to view](learning_rate=[url removed, login to view],batch_size=100,monitoring_dataset=valid,termination_criterion=EpochCounter(100))

[url removed, login to view](nn,train)

save_best = [url removed, login to view](channel_name="y0_misclass",save_path='[url removed, login to view]')

while True:

[url removed, login to view](dataset=train)

nn.monitor.report_epoch()

[url removed, login to view]()

save_best.on_monitor(nn,train,algo)

if not algo.continue_learning(nn):

break

Habilidades: Python, UNIX

Ver mais: python numpy, numpy all, train, sgd, mlp, c algo, ann, algo, typeerror, fix python, help python, python batch, python function, python setup script, python front end, fix editor joomla end, simple python script, fix python script, python front end css, python test script, python import script, python front end postgresql, python algo, python csv, end dump load brokers

Acerca do Empregador:
( 16 comentários ) United States

ID do Projeto: #6824014

Premiar a:

Alethor

Hello!! Can I get the code and an image from you where it shows the line where you are getting the error? This seems a simple poblem, but maybe a little bit more of information would be helpful. Thank you very Mais

$55 USD em 3 dias
(4 Avaliações)
2.0

3 freelancers estão ofertando em média $48 para este trabalho

mitosistech

Hi, We fully gone through the [url removed, login to view] has type casting error, related to floating point CONVERSION. We can finish it in 1 Day. Thank You.

$40 USD em 1 dia
(1 Comentário)
0.2
raquelcesar

I don't think there's anything very wrong with the script. I believe the real problem lies in the libraries used, namely pylearn2, and I think I can solve it.

$50 USD em 1 dia
(0 Comentários)
0.0