dependabot[bot] on pip
dependabot[bot] on pip
build(deps): bump numpy from 1.… (compare)
dependabot[bot] on pip
build(deps): bump numpy from 1.… (compare)
dependabot[bot] on pip
dependabot[bot] on pip
build(deps): bump tensorflow-gp… (compare)
dependabot[bot] on pip
Hello everyone!
I have been experiencing with (https://github.com/DLTK/DLTK/tree/master/examples/applications/IXI_HH_sex_classification_resnet), I made all the changes necessary in both reader.py and train.py in order to run both my .csv and my .nii images and it was going great.
Then I realized I had the option 'extract_examples' as True in reader_params in train.py, since I want my 3D network to be trained on the full images I switched it to False and now I am having a "dimensions problem".
I have CT scans with dimensions [X, 512,512] where X, the number of slices, can be any number between 400 and 800.
The message preceding code exit 1 is the following:
It is my understanding that the network only takes some defined image sizes, problem is, even after reading the 2 papers referenced in the documentation, I still can't find this sizes. Can anyone help?
Hi everyone, I am very new to DLTK, and I tried to run the tutorial on my local machine, for 02_reading_data_with_dltk_reader.ipynb (https://github.com/DLTK/DLTK/blob/master/examples/tutorials/02_reading_data_with_dltk_reader.ipynb), I can run it on jupyter without any problem. But when I saved it as a .py file and ran on the local machine, it threw out an error:
File "C:/Users/yjin1/Downloads/Software/dltk/examples/Brats/test.py", line 144, in <module>
features, labels = input_fn()
....
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3401, in _create_op_internal
self._check_not_finalized()
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\framework\ops.py", line 2998, in _check_not_finalized
raise RuntimeError("Graph is finalized and cannot be modified.")
RuntimeError: Graph is finalized and cannot be modified.
Could anybody please tell me why the error occurred and how do I fix that? I really get stuck here. What is wrong with the line " features, labels = input_fn()"? Thanks!
Dear Concern,
I am following the dltk ResNet architecture for binary classification. My dataset is highly imbalanced. I tried your Sparsed_balanced_cross_entropy which did not help in my case.
So, I want to use tf.nn.weighted_cross_entropy_with_logits to assign class weight. I am using the following code:labels = tf.reshape(labels['y'], [-1, NUM_CLASSES])
labels = tf.cast(labels, tf.float32)
loss = tf.nn.weighted_cross_entropy_with_logits(
targets = labels,
logits = net_output_ops['logits'],
pos_weight = 1,
name=None)
Using this, I get the following error:
File "D:\Classi\code\Train.py", line 409, in <module>
train(args)
File "D:\Classi\code\Train.py", line 312, in train
steps = EVAL_EVERY_N_STEPS)
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 358, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1124, in _train_model
return self._train_model_default(input_fn, hooks, saving_listeners)
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1154, in _train_model_default
features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1112, in _call_model_fn
model_fn_results = self._model_fn(features=features, **kwargs)
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow_estimator\contrib\estimator\python\estimator\replicate_model_fn.py", line 225, in single_device_model_fn
local_ps_devices=ps_devices)[0] # One device, so one spec is out.
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow_estimator\contrib\estimator\python\estimator\replicate_model_fn.py", line 566, in _get_loss_towers
**optional_params)
File "D:\Classi\code\Train.py", line 226, in model_fn
eval_metric_ops = {"accuracy": acc(labels['y'], net_outputops['y']),
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow\python\ops\array_ops.py", line 618, in _slice_helper
_check_index(s)
File "C:\Users\Interne\Anaconda3\envs\3dclassification\lib\site-packages\tensorflow\python\ops\array_ops.py", line 516, in _check_index
raise TypeError(_SLICE_TYPE_ERROR + ", got {!r}".format(idx))
TypeError: Only integers, slices (:
), ellipsis (...
), tf.newaxis (None
) and scalar tf.int32/tf.int64 tensors are valid indices, got 'y'
And, If I use one_hot_labels, I get the same error. I suppose for weighted_cross_entropy_with_logits, I am supposed to use normal labels, not one_hot_labels. Please correct me If I am wrong.
Looking forward to hearing the reason and if possible, the solution of the error.
Thank you.