Closed tallamjr closed 3 years ago
This has potentially been fixed with:
- for train_index, val_index in skf.split(X_train, y_train.argmax(1)):
+
+ print(type(y_train))
+ if tf.is_tensor(y_train):
+ y_train = np.array(y_train)
+ print(type(y_train))
+ y_train_split = y_train.argmax(1)
+ print(y_train_split)
+ else:
+ y_train_split = y_train.argmax(1)
+ print(y_train_split)
+
+ for train_index, val_index in skf.split(X_train, y_train_split):
X_train_cv, X_val_cv = X_train[train_index], X_train[val_index]
y_train_cv, y_val_cv = y_train[train_index], y_train[val_index]
When #56 is closed, then this can be properly tested with a new PLAsTiCC analysis being able to be run
Closed with #59
This is well summarised here https://github.com/tensorflow/tensorflow/issues/45079 where someone is trying to do essentially the same as is done in
astronet
i.e. define a custom loss function and use this to optimise for.When running a test function such as:
the follow error occurs from commit 403fcdde7121739239bdaac166426c405fa883f6 onwards (discoverd with
git bisect
and the test defined above)As this is so closely related to the tensorflow issue linked above and many avenues exhausted, it is felt best to hold off until there is further updates in the thread of a solution is posted.