Giter Site home page Giter Site logo

Comments (7)

chuagh74 avatar chuagh74 commented on June 9, 2024

This is the error msg I got:


TypeError Traceback (most recent call last)
in
6 validation_data = ValAugmentGenerator(),
7 validation_steps = validation_steps,
----> 8 epochs=num_epochs, callbacks=callbacks)
9 model.save_weights("camvid_model_150_epochs.h5", overwrite=True)

/cm/shared/apps/tensorflow2-py37-cuda10.2-gcc/2.2.0/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py in new_func(*args, **kwargs)
322 'in a future version' if date is None else ('after %s' % date),
323 instructions)
--> 324 return func(*args, **kwargs)
325 return tf_decorator.make_decorator(
326 func, new_func, 'deprecated',

/cm/shared/apps/tensorflow2-py37-cuda10.2-gcc/2.2.0/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
1477 use_multiprocessing=use_multiprocessing,
1478 shuffle=shuffle,
-> 1479 initial_epoch=initial_epoch)
1480
1481 @deprecation.deprecated(

/cm/shared/apps/tensorflow2-py37-cuda10.2-gcc/2.2.0/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in _method_wrapper(self, *args, **kwargs)
64 def _method_wrapper(self, *args, **kwargs):
65 if not self._in_multi_worker_mode(): # pylint: disable=protected-access
---> 66 return method(self, *args, **kwargs)
67
68 # Running inside run_distribute_coordinator already.

/cm/shared/apps/tensorflow2-py37-cuda10.2-gcc/2.2.0/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
846 batch_size=batch_size):
847 callbacks.on_train_batch_begin(step)
--> 848 tmp_logs = train_function(iterator)
849 # Catch OutOfRangeError for Datasets of unknown size.
850 # This blocks until the batch has finished executing.

/cm/shared/apps/tensorflow2-py37-cuda10.2-gcc/2.2.0/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py in call(self, *args, **kwds)
578 xla_context.Exit()
579 else:
--> 580 result = self._call(*args, **kwds)
581
582 if tracing_count == self._get_tracing_count():

/cm/shared/apps/tensorflow2-py37-cuda10.2-gcc/2.2.0/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py in _call(self, *args, **kwds)
609 # In this case we have created variables on the first call, so we run the
610 # defunned version which is guaranteed to never create variables.
--> 611 return self._stateless_fn(*args, **kwds) # pylint: disable=not-callable
612 elif self._stateful_fn is not None:
613 # Release the lock early so that multiple threads can perform the call

TypeError: 'NoneType' object is not callable

from multiclass-semantic-segmentation-camvid.

nikithanair95 avatar nikithanair95 commented on June 9, 2024

Did you get a solution to this error?

from multiclass-semantic-segmentation-camvid.

chuagh74 avatar chuagh74 commented on June 9, 2024

yes. That's because I was not using right version of TF

from multiclass-semantic-segmentation-camvid.

nikithanair95 avatar nikithanair95 commented on June 9, 2024

Which version did you use to get it right?

from multiclass-semantic-segmentation-camvid.

chuagh74 avatar chuagh74 commented on June 9, 2024

According to my technical support, we were using keras ....we should use tf keras....so he removed keras and use tf keras

from multiclass-semantic-segmentation-camvid.

nikithanair95 avatar nikithanair95 commented on June 9, 2024

We are importing tenserflow.keras everywhere still we are getting error. Could you please tell me where did you exactly change in the code ?

from multiclass-semantic-segmentation-camvid.

chuagh74 avatar chuagh74 commented on June 9, 2024

It was very long ago and i can't remember exactly. But what i remembered is we removed keras and reinstalled tensorflow and change import of keras to tensorflow.keras

from tensorflow.keras.models import Model
from tensorflow.keras.regularizers import l2
from tensorflow.keras.layers import *
#from tensorflow.keras.engine import Layer
from tensorflow.keras.applications.vgg16 import *
from tensorflow.keras.models import *
#from tensorflow.keras.applications.imagenet_utils import _obtain_input_shape
import tensorflow.keras.backend as K
import tensorflow as tf
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.layers import Convolution2D, ZeroPadding2D, MaxPooling2D, Cropping2D, Conv2D
from tensorflow.keras.layers import Input, Add, Dropout, Permute, add
from tensorflow.compat.v1.layers import conv2d_transpose
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.python.keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping, ReduceLROnPlateau

from multiclass-semantic-segmentation-camvid.

Related Issues (13)

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.