Code Monkey home page Code Monkey logo

Comments (12)

mikkokotila avatar mikkokotila commented on July 17, 2024 1

@x94carbone the error message yes, we no longer swallow the actual error message. Closing here.

from talos.

mikkokotila avatar mikkokotila commented on July 17, 2024

Can you share the whole trace (the list of messages where the error appears) for the error.

from talos.

AswinkarthikeyenAK avatar AswinkarthikeyenAK commented on July 17, 2024

t = ta.Scan(x = x_train_analytical, y = x_train_experimental,
model = AE, grid_downsample = 0.01,
params = p, dataset_name ='model_data' , experiment_no='1', shuffle = False )
The model needs to have Return in format "return history, model"
Traceback (most recent call last):

File "", line 3, in
params = p, dataset_name ='model_data' , experiment_no='1', shuffle = False )

File "C:\ProgramData\Anaconda3\lib\site-packages\talos\scan.py", line 77, in init
self._null = self._run()

File "C:\ProgramData\Anaconda3\lib\site-packages\talos\scan.py", line 93, in _run
self.epoch_entropy.append(epoch_entropy((_hr_out)))

UnboundLocalError: local variable '_hr_out' referenced before assignment

from talos.

mikkokotila avatar mikkokotila commented on July 17, 2024

Thanks. Can you try the latest version:

pip uninstall talos 
pip install git+https://github.com/autonomio/talos.git@dev

You might still get the error after this, but it should be more descriptive and will help to identify what exactly it's wrong (it seems that there some issue in your model). The error message that says _hr_out is referenced before assignment means that 10 times out of 10.

from talos.

AswinkarthikeyenAK avatar AswinkarthikeyenAK commented on July 17, 2024

sorry getting this error when trying to pip install git+https
Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/autonomio/talos.git C:\Users\xxxxxx\AppData\Local\Temp\pip-req-build-7542c4l0
Cannot find command 'git' - do you have 'git' installed and in your PATH?

from talos.

mikkokotila avatar mikkokotila commented on July 17, 2024

how did you install Talos initially on your system?

from talos.

AswinkarthikeyenAK avatar AswinkarthikeyenAK commented on July 17, 2024

Anaconda prompt.
pip install talos

from talos.

mikkokotila avatar mikkokotila commented on July 17, 2024

can you do

conda install git

and then try again.

from talos.

AswinkarthikeyenAK avatar AswinkarthikeyenAK commented on July 17, 2024

Thanks a lot. It worked now.
I ran the program again.
t = ta.Scan(x = x_train_analytical, y = x_train_experimental,
model = AE, grid_downsample = 0.01,
params = p, dataset_name ='model_data' , experiment_no='1', shuffle = False )
Traceback (most recent call last):

File "", line 3, in
params = p, dataset_name ='model_data' , experiment_no='1', shuffle = False )

File "C:\ProgramData\Anaconda3\lib\site-packages\talos\scan.py", line 195, in init
self._null = self._run()

File "C:\ProgramData\Anaconda3\lib\site-packages\talos\scan.py", line 208, in _run
_hr_out, self.keras_model = self._model()

File "C:\ProgramData\Anaconda3\lib\site-packages\talos\scan.py", line 239, in _model
self.params)

File "", line 8, in AE
activity_regularizer=regularizers.l1(regulariser_value))(Input_Experiment)

File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\base_layer.py", line 431, in call
self.build(unpack_singleton(input_shapes))

File "C:\ProgramData\Anaconda3\lib\site-packages\keras\layers\core.py", line 861, in build
constraint=self.kernel_constraint)

File "C:\ProgramData\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)

File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\base_layer.py", line 249, in add_weight
weight = K.variable(initializer(shape),

File "C:\ProgramData\Anaconda3\lib\site-packages\keras\initializers.py", line 209, in call
scale /= max(1., float(fan_in + fan_out) / 2)

TypeError: unsupported operand type(s) for +: 'int' and 'numpy.str_'

from talos.

AswinkarthikeyenAK avatar AswinkarthikeyenAK commented on July 17, 2024

-FYI,

This was the working code which I tried to wrap it with talos.
#Denoising Autoencoder

Input_Experiment = Input(shape=(500,))

encoded = Dense(encoding_dim, activation = activation_function_1,
activity_regularizer=regularizers.l1(regulariser_value))(Input_Experiment)

decoded = Dense(500, activation='tanh')(encoded)

autoencoder = Model(Input_Experiment, decoded)

encoder = Model(Input_Experiment, encoded)

encoded_input = Input(shape=(encoding_dim,))
decoder_layer = autoencoder.layers[-1]

decoder = Model(encoded_input, decoder_layer(encoded_input))

autoencoder.compile(optimizer='adadelta', loss='mean_squared_error')

from keras import callbacks
callback = callbacks.TensorBoard(log_dir=r'C:\Tensor Logs',
histogram_freq=0,
write_graph=True,
write_images=True)

autoencoder_anm_data = autoencoder.fit(x_train_ANM,x_train_EXP, epochs=epoch,
batch_size = batch, shuffle = True,
validation_data=(x_test_ANM,x_test_EXP),
callbacks=[callback])

Data Shape.
It is a time series data with each row containing 500 time stamps
x_train_ANM = [1199,500]
x_train_EXP = [1199,500]

from talos.

mikkokotila avatar mikkokotila commented on July 17, 2024

The issue in your model seems to be here:

File "", line 8, in AE activity_regularizer=regularizers.l1(regulariser_value))(Input_Experiment)

Maybe you can try without that line and see what happens (as that's what's causing the error).

from talos.

matthewcarbone avatar matthewcarbone commented on July 17, 2024

This is resolved in the latest version of master, correct @mikkokotila?

from talos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.