I have used adaptive loss implementation on a neural network, however after training a model long enough, I am getting negative loss values. Any help/suggestion would be highly appreciated! Please let me know if you need additional info Model definition - hyperparameter_space = {"gru_up": 64, "up_dropout": 0.2, "learning_rate": 0.004} def many_to_one_model(params): input_1 = tf.keras.Input(shape = (1, 53), name = 'input_1') input_2 = tf.keras.Input(shape = (1, 19), name = 'input_2') input_3 = tf.keras.Input(shape = (1, 130), name = 'input_3') input_3_flatten = …
I'm editing my comments.php, and within it I've added a reply button like this: <div class="reply"> <a rel="nofollow" class="comment-reply-link" href=<?php comment_reply_link(array('reply_text' => 'Reply this comment'), comment_ID()); ?> data-commentid="3" data-postid="487" data-belowelement="div-comment-3" data-respondelement="respond" data-replyto="Reply to admin" aria-label="Reply to admin"> Reply </a> </div> When I click on the "reply" button under any comment, the comment form pops up beneath the first comment, and only replies to the first one, rather than the one I clicked on. Can anyone explain the errors in this …
I have built a CNN from scratch in python using Numpy, to tackle the MNIST hand-written digit recognition problem. It's composed out of a convolutional layer (3 3x3 filters), a maxpooling layer (2x2 pooling) and the 10-label output layer. I'm using softmax for the output activation function and cross-entropy as loss function. I've tried running it with a couple of different hyperparameters and so far the best accuracy i've gotten is 97%, when training on the whole train dataset (60000 …
I have a custom post type called "Projects" and for it some categories. I would like to display the category name of the posts in the loop but only once. I am using this but the category is being displayed on top of every post. For example if the 2 posts are in the same cetegory, now I see the category name twice in the same loop. How can I solve it? My code: <?php $category = the_category(); ?> <h2 …
After WordPress update to 6 versions receives an issue. receive duplicated terms on function echo wp_kses_post(get_the_term_list($product->get_id(), 'product_cat', '', ', ', '')); and echo wp_kses_post( get_the_term_list( $product->get_id(), 'pa_material', '<li class="material">', ', ', '</li>' )) ? : ''; All work correctly before the update. I found that get_object_term_cache( $post->ID, $taxonomy ); give me duplicated terms What can cause this issue? Plugin or function change? (unable to find detail WP 6 changelog)
I'm using Create, a WP theme by Themetrust and reached out on their forums with no reply. I'm using the slide menu with smooth scroll, the linking/scrolling is working fine. As of now the slide menu only closes when the "x" icon is clicked. When a menu link is clicked the smooth scroll occurs correctly, but the menu stays visible. I'd like for the menu to slide away in an identical way as it does when the "x" is clicked. …
I have been wanting to manage shipping at vendor level instead of admin level in woocommerce. In plugins like Dokan shipping integration is managed at admin level however it must be different for different vendors. As different vendors want to integrate with different delivery providers. I want to add a code, that shall show shipping integration to each vendor in their dashboard. How can this be achieved?
Good morning, I need your help! I have my wordpress and woocommerce website hosted on azure, and when trying to edit a widget I get this error 'invalid JSON...' help! I already read all the forums with the different solutions, and nothing works. I already installed the classic editor, save the permalinks, it still doesn't work, it only happens with the widgets, and I only have a problem in azure, because I had it in another hosting and it worked …
I have two variables as time series, one a consequent of the other, I would like to find the average time delay it takes the dependent variable to act on the independent variable. Additionally, I would like to find the range of variance that is associated with the lag time and its respective confidence level. I am unsure how to go about this in a statistically valid way, but I am using Python. Currently I have used np.diff(np.sign(np.diff(df))) to isolate …
I'm using the Meta Box plugin to create custom post types and fields. There is a record type teachers, and I'm trying to display the lessons associated with him on the page of a certain teacher. The code looks like this: $queryArgs = array( 'post_type' => 'lessons', 'order' => 'ASC', 'posts_per_page' => -1, 'orderby' => 'meta_value', 'meta_key' => 'lessons_teacher', 'compare' => 'LIKE', 'meta_query' => [ [ 'key' => 'post_name', 'value' => 'john-smith', ] ] ); and here it is not …
My WordPress install (with the following plugins) randomly creates Draft posts whenever I load the posts page. Is there a way to find out which plugin is doing this (aside from deactivating)? Has anyone had this problem? Admin Tree View Advanced Custom Fields ACF: Flexible Content Field ACF: Repeater Field Breadcrumb NavXT Disqus Google Analytics Dashboard for WP Google Analytics for WordPress Gravity Forms Gravity Forms Campaign Monitor Add-On iframe IPU-Chart Simple Sitemap sxss Admin Notes TablePress W3 Total Cache …
There is no multivendor plugin that will integrate Indian shipping partners like Shiprocket - https://www.shiprocket.in/ and Indian payment methods like Razorpay - https://razorpay.com/. This is a big problem, how to solve it?
I have created a custom page which shows the list of Users(Role = 'Subscriber'). I named this page "Reporting" & It is based on wp_list_table. Now I want to show the user details (having custom layout & user meta). I am not sure How to create a link of user detail page or create a detail page. Here is the code which shows User lists Data. class-cisco-connex-core-wp-reporting-table.php class WP_Reporting_Table { /** * Constructor */ public function __construct() { // Hook …
I'm trying to train a model which in my opinion is taking too long compared to other datasets given that it's taking about 9s to complete a step. I think that the problem is because the dataset is not being stored on ram, but I'm not sure of this. The code is the following: def load_data(): train_datagen = ImageDataGenerator(rescale=1./255, shear_range=0.2, zoom_range=0.2, horizontal_flip=True) train_generator = train_datagen.flow_from_directory(path1, target_size=(200, 200), batch_size=32, class_mode="binary") test_datagen = ImageDataGenerator(rescale=1./255) test_generator = test_datagen.flow_from_directory(path2, target_size=(200, 200),batch_size=32, class_mode="binary") return train_generator, …
I'm trying to rewrite my search.php to search only for the post titles because I have a ton of posts published to my site (around 400k), which slows down the search speed to about 20s per search. <?php get_header(); $search_term = $_GET['s']; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $posts = new WP_Query( array( 's' => "$search_term", 'ep_integrate' => true, 'post_type' => 'post', 'posts_per_page' => 21, 'orderby' => 'date', 'order' => 'DESC', 'paged' => $paged, ) ); ?> <?php if …
I'm quite new to Gutenberg and Wordpress and facing some issues with my attribute. When I'm trying to output the attribute data it is returning an empty object. Not quite sure why the default values aren't being applied? Thanks in advance! registerBlockType("mt/product-listing", { title: "Product", icon: "edit-page", category: "design", attributes: { content: { type: 'string' } }, ..., And when trying to access in edit: edit: (props) => { // Accessing props console.log("Edit", props); return ( <div> <Products product={props.attributes} /> …
I have two time series (x, y) which have 852 length (same period). x 2020-09-01 0.004342 2020-09-02 -0.000523 2020-09-03 -0.013352 ... 2022-12-29 0.12303 2022-12-30 0.32431 2022-12-31 -0.21311 y (factor) 2020-09-01 0.023423 2020-09-02 0.034566 2020-09-03 -0.005465 ... 2022-12-29 -0.43533 2022-12-30 0.345367 2022-12-31 0.0004563 When I made the code to deconvolve x and y (Getting residual x by removing x which get effects from y), I had the error as below. ValueError : BUG : filter coefficient a[0]==0 not supported yet The …
I have 2 ddbb with around 60,000 samples each. Both have the same features (same column names) that represent particular things with text or categories (turned into numbers). Each sample in a ddbb is assumed to refer to a different particular thing. But there are some objects that are represented in both ddbb, yet with somewhat different values in the same-name column (like different open descriptions, or classified as another category). The aim is to train a machine learning model …
I would like to use ENTER button to insert line break, not SHIFT + ENTER by default. I added this code into function.php. It works but the problem is the text-align buttons are not working. When I click on any text align button, nothing happens. The text align buttons in Both Wordpress editor and TinyMCE Advance plugin editor are not working. But when I remove the code, it comes back normal. How can I solve this issue? /* Filter Tiny …
I must create new feature based on number of likes and release date. Is it good idea to estimate likes per day? And after It make some range for video popularity. I think that if our video was released a long time ago and this video has 5 likes. Like per day coeff will be high. How can I calculate this coeff properly?
I am using a dataset (from literature) to build an MLP and classify real-world samples (from wetlab experiment) using this MLP. The performance of MLP on the literature dataset are well enough. I am following standard preprocessing procedure, where, after splitting, I firstly standardize my training data with fit_transform and then the testing data with transform so that I ensure I use only training data statistics (mean and std) to standardize unseen data against those mean and std. However, when …
Is it possible to perform str_replace inside an enqueue stylesheet? i can do str_replace on inline style with this function function replace_text($text) { $text = str_replace('background-image', 'background', $text); return $text; } add_filter('the_content', 'replace_text'); is it possible to perform the same action inside style.css file ? wp-content/plugins/assets/style.css
I am learning Plugin Development. My sub menu code is like below. add_submenu_page('weather_info', 'Weather Information', 'Weathers', 'manage_options', 'edit.php?post_type=weather'); But my menu is not kept open after click. Below screenshot is after click on Weathers.
Computer science undergrad here. I am trying to understand Eqn 12 from this paper so that I can implement it in python code. In this paper, the NN model takes a blurred image as input and outputs a sharp (deblurred) image and the kernel that can produce the same blurred image after multiplying with the sharp image. Here - $\widetilde{K_t}$ = kernel predicted matrix $K_t^{train}$ = ground truth kernel (for training) matrix $\widetilde{X_t}$ = predicted sharp image matrix $X_t^{train}$ = …
I am currently using this code to insert Ads after the 5th paragraph and it works just fine. //Insert ads after fifth paragraph add_filter( 'the_content', 'prefix_insert_post_ads' ); function prefix_insert_post_ads( $content ) { $ad_code = '<center>AD CODE</center>'; if ( is_single() && ! is_admin() ) { return prefix_insert_after_paragraph( $ad_code, 5, $content ); } return $content; } // Parent Function function prefix_insert_after_paragraph( $insertion, $paragraph_id, $content ) { $closing_p = '</p>'; $paragraphs = explode( $closing_p, $content ); foreach ($paragraphs as $index => $paragraph) { …
<?php /* * Template Name : Amaizing Inner Page 1 Template from me* * @package WordPress * @subpackage CADENTIC® BUSINESS THEME * @since MY BUSINESS THEME 0.0.1 */ ?> if we would these simple lines in a template file we would use it as a global template but now in WordPress 6.0, there is no such attribute that exists in Gutenberg to select a new page template. I was following a few articles for this wordpress doc clouddera
I have a school project and need to use the embeddings generated by BERT, for example, mBERT, and using a classifier like SVM, CNN... Any help, please. Thank you!
I have a question about performing a very long and resource intensive task within WordPress. Here is the scenario. I have a plugin that allows users to run a task that takes a very long time and once completed will return the result back to the user. The first thing I did was run the task via WordPress AJAX functions. This did not work since the site locked up to that user. Meaning that if the task was started then …
I am currently trying to write a simple multivariate gaussian mixture model using tensorflow probability. Specifically, I have some 2-dimensional input and 2-dimensional output data and am looking to produce a probabilistic model that best fits this data by using a neural network. I am utilizing tfp.layers.MixtureSameFamily to generate this model, which is working perfectly well as expected. Here is my code for doing so: Notes: I am using tensorflow 2.4.1 and tensorflow-probability 0.12.1 x = some 2-d input data …
I am trying to replicate the most basic version of this Google LEAF example. I am having problems loading in the Tensorflow Speech Commands Dataset. I load the datasets in as a TFRecord: tfds.load('speech_commands', download='true', shuffle_files='false') I then map the train, test and eval datasets through this pre-process function: def preprocess(sample): audio = sample['audio'] label = sample['label'] audio = tf.cast(audio, tf.float32) / tf.int16.max return audio, label I then create my model and attempt to train on my train dataset: #Model …
I want to use a transformer model to do classification of fixed-length time series. I was following along this tutorial using keras which uses time2vec as a positional embedding. According to the original time2vec paper the representation is calculated as $$ \boldsymbol{t2v}(\tau)[i] = \begin{cases} \omega_i \tau + \phi_i,& i = 0\\ F(\omega_i \tau + \phi_i), & 1 \leq i \leq k \end{cases} $$ The mentioned tutorial simply concatenates this embedding with the input. Now, I understand the intention of the …
I'm handling an very conventional supervised classification task with three (mutually exclusive) target categories (not ordinal ones): class1 class2 class2 class1 class3 And so one. Actually in the raw dataset the actual categories are already represented with integers, not strings like my example, but randomly assigned ones: 5 99 99 5 27 I'm wondering whether it is requested/recommended to re-assign zero-based sequential integers to the classes as labels instead of the ones above like this: 0 1 1 0 2 …
Let’s say I have a classification model. And my job is to predict the correct class out of 30 different classes. The current accuracy is 60%. The thing is: I have to consume another team’s classification result which is 80% accurate. So I’m using their prediction result as a feature. I’ll call it “golden feature”. Let’s say I’m aiming >80% accuracy with the golden feature. Here is my current approach: (I’m using Deep Learning.) I have several features and each …
I am using WooCommerce in WordPress. I have few categories of products like these, Example: Product 1 Category (//parent) -- Category 1 -- Category 2 -- Category 3 -- Category 4 Product 2 Category (//parent) -- Category 10 -- Category 11 -- Category 12 -- Category 13 If I am in a archive page for Category 2(sub) How can I get all other category name under the parent category (Product 1 Category) as a list. what i'm trying $args = …
I am using this function which works great in case anyone wants to bulk update custom fields for custom post types (just change parameters as necessary). $args=array( 'posts_per_page' => -1, 'post_type' => 'mycptype' ); $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); $testa = get_field('br_type'); $testb = get_field('br_category'); if ($testa === 'Apples') { update_field('br_featured', '0', get_the_ID()); } endwhile; wp_reset_postdata(); endif; How to use: Insert the code inside your functions.php and refresh …