transpose expects a vector of size 0

I created a custom layer in keras with following code: class drawLines(Layer): def __init__(self, output_dim, **kwargs): self.output_dim = output_dim super(drawLines, self, ).__init__(**kwargs) def build(self, input_shape): super(drawLines, self).build(input_shape) def call(self, input): xout = tf.py_function(image_tensor_func, [input], ‘float32’) xout.set_shape([input.shape[0], input.shape[1], input.shape[2], 1]) return xout def compute_output_shape(self, input_shape): output_shape = list(input_shape) c_axis, h_axis, w_axis = 3, 1, 2 output_shape[c_axis]…

Details

Routing for multiple hosts in Cakephp

As cookbook says: Routes can use the _host option to only match specific hosts. You can use the *. wildcard to match any subdomain. But what if I would like set same route for multiple hosts at once? For example: $routes->connect( ‘/images’, [‘controller’ => ‘Images’, ‘action’ => ‘index’] )->setHost(‘images.example.com’); $routes->connect( ‘/images’, [‘controller’ => ‘Images’, ‘action’…

Details

R Shiny Download files from ahref tag created dynamically- Not Found error

Trying to create download links using anchor tags in Shiny. Depending on the number of files the links are created dynamically as below. But the error says file not found. UI uiOutput(“result”) Server fileslist = strsplit(res,”#”)[[1]] #Sample data “output/file1#output/file2#output/file3” tags <- tagList(“Files:”) for (filepath in fileslist){ tags <- tagList(tags, a(“File”, target=”_blank”, href=glue(“{filepath}”))) } output$result <-…

Details

How to use DATE_FORMAT in MS-SQL using DQL/Query Builder

I am using doctrine 2.6, Symfony 3.4, MS-SQL. Using query builder I am getting date column as DateTime object from query builder but I need my column in “y-m-d” format. I tried Doctrine querybuilder DATE_FORMAT not working But it is in no help. My query builder looks like ` $result ->select(“DATE_FORMAT(p.createdAt, ‘%Y-%m-%d’)”) ->innerJoin(‘p.storeid’, ‘o’) ->innerJoin(‘p.warehouseid’,…

Details

Hibernate: how to create and execute sql procedure via jpa.hibernate.ddl-auto option

I have a couple of stored procedures that I want to execute as initial setup. So What I have done, placed that stored procedure in data.sql and set the jpa.hibernate.ddl-auto=create. But on startup of my springboot application, the application is failing with com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException. It means, it is not able to understand the syntax of that…

Details

How to detect how many Rest items is available

I have following issue I need to detect how many objects are available in remote service. For example: url=”https://myapi/”; getPerson(personsId){ return this.http.get<Person[]>(`${this.url}${personsId}`,{headers:this.headers}); } getAllPersons(){ let numberOfPersons // in this variable I want to store how many items are available. const response = […Array(numberOfPersons).keys()].map(i => this.getPerson(i+1)); return forkJoin(response).pipe(map(value=> value),share()); } } Where numberOfpersons is the number…

Details