tensorflow

ModuleNotFoundError: No module named 'six.moves.collections_abc'

ⅰ亾dé卋堺 提交于 2020-12-15 05:34:23
问题 i am just starting with machine learning i am following this tutorial from Weights&Bias where they gave us some code and asked to run it i am unable to run the code First I was getting the error Keras requires TensorFlow 2.2 or higher for which I tried this method Following the advice given here, downgrading Keras did the trick for me without having to touch any other packages. Just do: pip install keras==2.3.0 from this link Error "Keras requires TensorFlow 2.2 or higher" then I started

How can I create a dataset in tensorflow with multiple outputs and data sources? [closed]

谁说我不能喝 提交于 2020-12-15 05:32:24
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . Improve this question I have a structure like this: file01,file02... file_output(all dictionaries) structure of files where each file is a dataframe with features as columns and a single file in output with 4 numbers that rapresent the output or y of my network. How can I feed multiple folders like

How can I create a dataset in tensorflow with multiple outputs and data sources? [closed]

情到浓时终转凉″ 提交于 2020-12-15 05:31:30
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . Improve this question I have a structure like this: file01,file02... file_output(all dictionaries) structure of files where each file is a dataframe with features as columns and a single file in output with 4 numbers that rapresent the output or y of my network. How can I feed multiple folders like

How can I create a dataset in tensorflow with multiple outputs and data sources? [closed]

陌路散爱 提交于 2020-12-15 05:31:23
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . Improve this question I have a structure like this: file01,file02... file_output(all dictionaries) structure of files where each file is a dataframe with features as columns and a single file in output with 4 numbers that rapresent the output or y of my network. How can I feed multiple folders like

What does the implementation of keras.losses.sparse_categorical_crossentropy look like?

蓝咒 提交于 2020-12-15 05:05:12
问题 I found tf.keras.losses.sparse_categorical_crossentropy is an amazing class that helps me create a loss function for a neural network that has a large number of output classes. Without this it is impossible to train the model, as I found tf.keras.losses.categorical_crossentropy gave an out-of-memory error because of converting an index into a 1-hot vector of very large size. I, however, have a problem of understanding how sparse_categorical_crossentropy avoids the big memory issue. I took a

What does the implementation of keras.losses.sparse_categorical_crossentropy look like?

本秂侑毒 提交于 2020-12-15 05:04:05
问题 I found tf.keras.losses.sparse_categorical_crossentropy is an amazing class that helps me create a loss function for a neural network that has a large number of output classes. Without this it is impossible to train the model, as I found tf.keras.losses.categorical_crossentropy gave an out-of-memory error because of converting an index into a 1-hot vector of very large size. I, however, have a problem of understanding how sparse_categorical_crossentropy avoids the big memory issue. I took a

How to encode string in tf.data.Dataset?

我们两清 提交于 2020-12-15 01:56:22
问题 So I am trying to encode a string in a tensorflow dataset in order to use it to train a pretrained RoBERTa model. The training_dataset is a tensorflow dataset made from a pandas dataframe that looks like this: I used this dataframe to construct the tf.data.Dataset using: features = ['OptionA', 'OptionB', 'OptionC'] training_dataset = ( tf.data.Dataset.from_tensor_slices( ( tf.cast(train_split[features].values, tf.string), tf.cast(train_split['Answer'].values, tf.int32) ) ) ) Now I want to

How to encode string in tf.data.Dataset?

佐手、 提交于 2020-12-15 01:55:36
问题 So I am trying to encode a string in a tensorflow dataset in order to use it to train a pretrained RoBERTa model. The training_dataset is a tensorflow dataset made from a pandas dataframe that looks like this: I used this dataframe to construct the tf.data.Dataset using: features = ['OptionA', 'OptionB', 'OptionC'] training_dataset = ( tf.data.Dataset.from_tensor_slices( ( tf.cast(train_split[features].values, tf.string), tf.cast(train_split['Answer'].values, tf.int32) ) ) ) Now I want to

How to encode string in tf.data.Dataset?

做~自己de王妃 提交于 2020-12-15 01:54:10
问题 So I am trying to encode a string in a tensorflow dataset in order to use it to train a pretrained RoBERTa model. The training_dataset is a tensorflow dataset made from a pandas dataframe that looks like this: I used this dataframe to construct the tf.data.Dataset using: features = ['OptionA', 'OptionB', 'OptionC'] training_dataset = ( tf.data.Dataset.from_tensor_slices( ( tf.cast(train_split[features].values, tf.string), tf.cast(train_split['Answer'].values, tf.int32) ) ) ) Now I want to

How to make sure that TFLite Interpreter is only using int8 operations?

╄→尐↘猪︶ㄣ 提交于 2020-12-13 18:53:26
问题 I've been studying quantization using Tensorflow's TFLite. As far as I understand it is possible to quantize my model weights (so that they will be stored using 4x less memory) but it doesn't necessary implies that the model won't convert it back to floats to run it. I've also understood that to run my model only using int I need to set the following parameters: converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8] converter.inference_input_type = tf.uint8 converter